Loading ...
Sorry, an error occurred while loading the content.
 

Re: Res: [PBML] getting informations about a file

Expand Messages
  • merlyn@stonehenge.com
    ... tnas You can test the properties of a file as explained in perldoc -f -e : tnas ------ tnas stat ($filename); You need to test success here. stat
    Message 1 of 2 , Dec 27, 2006
      >>>>> "tnas" == tnas <nascimentothiago@...> writes:

      tnas> You can test the properties of a file as explained in "perldoc -f -e":
      tnas> ------

      tnas> stat ($filename);

      You need to test success here.

      stat $filename or die "stat error: $!";
      print "File is readable\n" if -r _;
      print "File is writable\n" if -w _;
      print "File is executable\n" if -x _;

      --
      Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
      <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
      Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
      See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
    Your message has been successfully submitted and would be delivered to recipients shortly.