Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

peg - Perl _expression_ (GNU) grep script

by Clarendon4 (Acolyte)
on Nov 14, 2008 at 18:00 UTC ( [id://723699]=perlnews: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        eg% peg /needle/i haystack
    
        eg% peg "!(/^=\w/ .. /^=cut/) and /whatever/" *pm
    
  2. or download this
        eg% peg  needle  haystack
        eg% peg /needle/ haystack
    
  3. or download this
        eg% peg -inHC1Tm1 FOO words.txt
        words.txt-420-    afloat
        words.txt:421:    afoot
        words.txt-422-    aforementioned
    
  4. or download this
        eg% cat haystack | peg -i needle
    
  5. or download this
        eg% peg -i needle
    
  6. or download this
        eg% peg -p "/\.p[ml]$/i" -M 48h whatever
    
  7. or download this
        $Peg_p{p} = 'pl:pm:t'; # peg_ini.pl
    
  8. or download this
        eg% peg -p p -M 2d whatever
    
  9. or download this
        eg% peg -z "/^sub \w+/" foo *pm
    
  10. or download this
        $Peg_z{p} = '/^(?:\s*sub\s+\w|=head|__(?:END|DATA)__)/'; # peg_ini
    +.pl
    
  11. or download this
        eg% peg chmod Temp.pm -nz p
        **** (331) sub _gettemp {
    ...
        545:    chmod(0700, $path);
        **** (645) sub _force_writable {
        647:  chmod 0600, $file;
    
  12. or download this
        # peg_ini.pl
        $Peg_longopt{'ignore-dir'} = sub {
    ...
            my $dir_name = shift @$argv_ref or die;
            unshift @$argv_ref, "-p", qq{ \$File !~ m:(^|/)$dir_name/: };
        };
    
  13. or download this
        eg% peg foo --ignore-dir CVS
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found