Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Favourite One-liners?

by sfink (Deacon)
on Jun 28, 2005 at 19:18 UTC ( #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
Node Status?
node history
Node Type: note [id://470772]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-07-28 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (203 votes), past polls