Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://473468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-25 23:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found