Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by bofh_of_oz (Hermit)
on Jul 08, 2005 at 16:14 UTC ( #473468=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $_ =~ /(\d+)ms/g;
    print "$1,$2,$3\n";
    
  2. or download this
    $_ = "3434 34456... 321ms:543ms:45ms";
    ($d, $e, $f) = ($_ =~ /(\d+)ms/g);
    print "$d,$e,$f\n";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2020-05-31 11:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?