Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How do i extract 3 variables from each line in a file, and print them to a new file

by Transient (Hermit)
on Jul 08, 2005 at 16:56 UTC ( [id://473498]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    __DATA__
    3434 34456 7788 9999 65444 4 444 444 44443225 12ms:233ms:455ms
    755655 5789 333 666776 5553 353534 33 321ms:543ms:45ms
    
  2. or download this
    perl -pe '$_=join(",",map{s/\D//g;$_} split(":",(split(" ",$_))[-1])).
    +"\n"' < input > output
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-19 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found