develooper Front page | perl.perl5.porters | Postings from November 2000

Making the -B and -T file tests safer

From:
Rich Morin
Date:
November 7, 2000 13:26
Subject:
Making the -B and -T file tests safer
Message ID:
p05001906b62e1a203a04@[192.168.168.205]
Page 99 of the Camel book (3e) says:

   "Because Perl has to read a file to do the -T test, you don't want
    to use -T on special files that might hang or give you other kinds
    of grief."

It seems to me that there are two problems here:

   *  The book should explicitly mention that the -B test suffers
      from the same problem.

   *  Perl should be smart enough to do an internal -f test first,
      keeping itself out of trouble.

-r
-- 
--
Rich Morin:          rdm@cfcl.com, +1 650-873-7841, http://www.cfcl.com/rdm
Prime Time Freeware: info@ptf.com, +1 408-433-9662, http://www.ptf.com
MacPerl: http://www.macperl.com, http://www.ptf.com/ptf/products/MPPE
MkLinux: http://www.mklinux.org, http://www.ptf.com/ptf/products/MKLP



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About