Date: Tue, 17 Feb 1998 13:07:42 +1100 (EST) From: "Daniel O'Callaghan" <danny@panda.hilink.com.au> To: freebsd-hackers@FreeBSD.ORG Cc: brenda@thereef.com.au Subject: Weird problem with perl5.004 Message-ID: <Pine.BSF.3.91.980217125800.294y-100000@panda.hilink.com.au>
next in thread | raw e-mail | index | archive | help
I have a weird problem under FreeBSD 2.2-980123-SNAP, with perl5. I have a feeling that it must be something to do with resource limits, but I can't figure out what. The program quoted below has two sections, which do the same thing, one using glob() and the other using readdir(). Both sections work fine when run as root, but only readdir() works as a normal user. I've tried increasing various limits of the normal user, to no avail. Any ideas, please? #!/usr/local/bin/perl5.004_04 $filedir = "/home/ftp/pub/"; print "------- Using glob() -----------\n"; @files = glob("$filedir*"); print "There are $#files files\n"; foreach $filename (@files) { $filename =~ s/^\/.*\///; print "$filename\n"; } print "----- Using readdir() -----------\n"; opendir(D, "$filedir"); @files = readdir(D); print "There are $#files files\n"; closedir(D); foreach $filename (@files) { $size = -s $filename; $filename =~ s/^\/.*\///; print "> $filename\n"; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.980217125800.294y-100000>