Perl -get_info
#!/usr/bin/perl
use strict;
use warnings;
my %data;
while (<STDIN>) {
chomp;
if (/^sce\s+(.)/) {
my @sce = split(/\s+/, s (@sce) {
data{s}{total} = [];
data{s}{r2r} = [];
}
}
elsif (/^total\s+(.)/) {
my @total = split(/\s+/, i = 0;
for my s (keys %data) {
push @{data{s}{total}}, total[total[total[i += 3;
}
}
elsif (/^r2r (a* & *b) total\s+(.*)/) {
my @r2r = split(/\s+/, i = 0;
for my s (keys %data) {
push @{data{s}{r2r}}, r2r[r2r[r2r[i += 3;
}
}
}
Print out the data
for my s =~ /.S./){
print "sce s\n";
print join("\n", @{data{s}{total}}) . "\n";
print join("\n", @{data{s}{r2r}}) . "\n\n";
}
elsif (s =~ /.S./){
print "sce s\n";
print join("\n", @{data{$s}{total}}) . "\n";
}
}
close (STDIN);