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

Making the -B and -T file tests safer

Rich Morin
November 7, 2000 13:26
Making the -B and -T file tests safer
Message ID:
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.

Rich Morin:, +1 650-873-7841,
Prime Time Freeware:, +1 408-433-9662,
MkLinux:, Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About