i want to parse some data from a file having multiple occurences like below
sample paragraph from the file:
Launching series_name (started Sat Jan 11 7:31:47 PST 2020)
SERIES RESULT (series_name) : Pass: 2/0/0
series_name (finished Sat Jan 11 7:31:58 PST 2020)
series_name Run Duration: 0d 00:00:11
output:
Series   Durationafter i get all the different series name with corresponding duration, i need to sort that in ascending order and write in new file
below is what i have been able to achieve
#!/usr/bin/perl use warnings; use strict; use Data::Dumper; my $filename = 'dfttest.log'; open(FH, '<', $filename) or die $!; my $keyword; while(<FH>){ $keyword = $_; if ($_ =~ /^Launching\s*(.*?)\s*\(.*$/) { print "\n".$1; } } close(FH);
In reply to i am trying to parse set of data from a file, sorting that data and writing to a new file by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |