in reply to Re: How do i extract 3 variables from each line in a file, and print them to a new file
in thread How do i extract 3 variables from each line in a file, and print them to a new file
Check this Data.dat contains the input lines. This is working. open(Spooler, "Data.dat") or die "File does not exists\n"; while($spooler=<Spooler>) { #print "$spooler\n"; chomp($spooler); @matches = $spooler =~ /(\d+)ms/g; foreach $a (@matches){ print $a .","; } print "\n"; } Hope it helps!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: 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 17:59 UTC | |
by Transient (Hermit) on Jul 08, 2005 at 18:12 UTC | |
by bofh_of_oz (Hermit) on Jul 08, 2005 at 18:18 UTC | |
by pbeckingham (Parson) on Jul 08, 2005 at 19:26 UTC | |
Re^3: How do i extract 3 variables from each line in a file, and print them to a new file
by bageler (Hermit) on Jul 08, 2005 at 19:43 UTC | |
Re^3: How do i extract 3 variables from each line in a file, and print them to a new file
by Anonymous Monk on Jul 08, 2005 at 17:50 UTC |
In Section
Seekers of Perl Wisdom