Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Favourite One-liners?

by sfink (Deacon)
on Jun 28, 2005 at 19:18 UTC ( [id://470772]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -lane 'print $last if ($F[0] ne $lastt); $last = $_; $lastt = $F[
    +0];'
    
  2. or download this
    perl -lane 'print $s += $F[2]'
    
  3. or download this
    find . -name 'Root' -print0 | xargs -0 perl -i -pe '$_=q(:pserver:sfin
    +k@cvs/usr/local/cvs)'
    
  4. or download this
    perl -lne 'print $1 while (/\"(.*?)\"/g)' filename
    
  5. or download this
    perl -lne 'print $1 while (/\"((\\.|[^\"])*)\"/g)' filename
    
  6. or download this
    perl -lne 'print if /(\w+)::\1/ .. /^\}/' *.cpp
    

Log In?
Username:
Password:

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

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

    No recent polls found