Re: installed modules - faq question 3.4 What am I doing wrong?



Thanks, I just put in use strict and use warnings to make sure.

My os is Redhat 7.3. I ran the script as a regular user and also as
root (in case permission denied). Same output.

My perl is 5.6.1 My @INC is :
/usr/lib/perl5/5.6.1/i386-linux
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i386-linux
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.6.1/i386-linux
/usr/lib/perl5/vendor_perl/5.6.1
/usr/lib/perl5/vendor_perl
..

Under "/usr/lib/perl5/5.6.1/" I have a directory called "ExtUtils" with
a bunch of .pm files in there. (These are standard modules).

I am not getting these listed. (just as an example). I also have
others not being listed. But I have other subdirectories that have .pm
files that are being listed.

Would there be a problem with the "if -f _ " construct. I just copied
it from the FAQ.

Update : I just ran the script without one of the conditions (ie: "-f
_" ) and it works. So I guess "-f _" is causing some problems. It is
a file test operator to see if the file is a plain text file. The
single underscore I don't fully understand except that it saves a
system call. Maybe I can get a better explanation.

thanks,
Roshan

.



Relevant Pages

  • Re: A script to flag commonly misused words
    ... is preferable in general as it allows you to scope warnings. ... use strict; ... I first wrote a script to extract the words to flag from your ... I discovered that at least one of the expressions you ...
    (comp.lang.perl.misc)
  • Re: [PATCH] Speed up "make headers_*"
    ... 'use strict' and 'use warnings' is recommended. ... The parentheses are not needed for most of the built-in functions. ... More or less the same comments would apply to the next script as well. ...
    (Linux-Kernel)
  • Re: Passing vars to a "require"d script
    ... > require'd script didn't seem to pull in the form data, ... >> use strict; ... >> use warnings; # main program ...
    (comp.lang.perl.misc)
  • Re: Regular Expression and file editing.
    ... Goksie wrote: ... If i run the script, the changes could not be effected bcos the files is ... use warnings; ... use strict; ...
    (perl.beginners)
  • Re: Counting column delimiters per row in a text file
    ... Then parse (see the parse method) ... This can't be more than 20 lines or so including use strict and use ... Put the data in the __DATA__ section of your script. ... use warnings; ...
    (comp.lang.perl.misc)