Perl Monk, Perl Meditation | |
PerlMonks |
Re: Regex negative lookaheadby pvaldes (Chaplain) |
on Apr 26, 2014 at 10:02 UTC ( [id://1083914]=note: print w/replies, xml ) | Need Help?? |
I am trying to print the files in the current directory that are not perl scripts
Well, in fact not... you are trying to avoid the files in your directory that have a name ending in .pl, and this is a much different history. Your starting design is poor. what about .pm?, or .pl~? or im-a-perlscript? If you want to play seriously you need to look at the contents of the file, either use the program file (or a derivative of file) or read the first characters of your file and look for perl code
In Section
Seekers of Perl Wisdom
|
|