Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Simple perl one-liner for transforming text files (JAWTDI)

by tye (Sage)
on Mar 05, 2003 at 21:37 UTC ( [id://240726]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -ne 'print ++$n,". $1 " if /^name:\s*(.*)/; print $1,$/ if /^date
    +:\s*(.*)/'
    
  2. or download this
    perl -ne "print ++$n,qq(. $1 ) if /^name:\s*(.*)/; print $1,$/ if /^da
    +te:\s*(.*)/"
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found