in reply to Parsing output with a special format
Part 2 is pretty easy so here's one approach.
#!/usr/bin/env perl use strict; use warnings; my %status; while (<DATA>) { next unless /@/; my @fields = split; $status{$fields[1]} = $fields[0]; } use Data::Dumper; print Dumper (\%status); __DATA__ date:17/4/2000 version: 4.1.0 -more info- -more info- ------------------------------------------------------------------ Status id not important info (two columns) name ----------------------------------------------------------------- Run 1234 @ ... foo1 Wait 54123 @ ... foo2 -----------------------------------------------------------------
This should give you enough to work on regarding point 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parsing output with a special format
by ovedpo15 (Pilgrim) on Jun 05, 2018 at 08:42 UTC | |
by haukex (Archbishop) on Jun 05, 2018 at 08:46 UTC |