Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Regex negative lookahead

by pvaldes (Chaplain)
on Apr 26, 2014 at 10:02 UTC ( [id://1083914]=note: print w/replies, xml ) Need Help??


in reply to Regex negative lookahead

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

Replies are listed 'Best First'.
Re^2: Regex negative lookahead
by Anonymous Monk on Apr 26, 2014 at 10:24 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1083914]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-03-28 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found