in reply to Formatted output file with data processing
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; my @values; while (<>) { if (my ($size) = /^pat([0-9])/) { $size == 1 + @values or die "Unexpected $_"; next } my ($register, $value) = /(\S+).*\}([0-9])/; say join "\t", $register, splice @values if 5 == push @values, $value; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Formatted output file with data processing
by Don Coyote (Hermit) on Sep 24, 2019 at 13:32 UTC | |
|
Re^2: Formatted output file with data processing
by kshitij (Sexton) on Sep 24, 2019 at 17:34 UTC | |
by AnomalousMonk (Archbishop) on Sep 24, 2019 at 19:58 UTC | |
by kshitij (Sexton) on Oct 03, 2019 at 04:18 UTC | |
by AnomalousMonk (Archbishop) on Oct 03, 2019 at 17:01 UTC | |
by hippo (Archbishop) on Oct 03, 2019 at 08:18 UTC | |
by kshitij (Sexton) on Oct 03, 2019 at 08:52 UTC | |
|