[plug] Perl Monks help required

Patrick Tehvand patrick at carey.wa.edu.au
Thu Sep 4 14:10:22 WST 2003


# less filetest.pl:

print "Doesn't exist\n" unless -e $opt_d; 
print "Exists\n" if -e $opt_d; 
print "File\n" if -f $opt_d;
print system("ls -alh $opt_d");


# perl filetest.pl -d data.20030820 
Doesn't exist 

# ls result:
-rw-r--r--    1 root     root         2.2G Aug 21 16:34 data.20030820

 perl filetest.pl -d data.20030819.gz 
Exists 
File
ls result.
-rw-r--r--    1 root     root         105M Aug 21 13:17 data.20030819.gz

does perl have some size limit for if "-e"

cheers
-- 
Patrick Tehvand
IT Department,
Carey Baptist College
http://www.carey.wa.edu.au

Member - Society of Linux Professionals (WA) 

support running 2.4.20-8 kernel on Red Hat Linux release 9 (Shrike).
14:08:07 up 5 days, 21:32, 5 users, load average: 0.28, 0.31, 0.32
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20030904/78624354/attachment.pgp>


More information about the plug mailing list