use Data::Dumper; my $schema = { 'Daily' => [], 'Monthly' => [], 'Exception' => [] }; LINE: for my $line ( `mminfo etc.` ) { for my $case ( grep !/Exception/, keys %$schema ) { if ( $line =~ /\s$case/ ) { push @{$schema -> { $case }}, $line; next LINE; } } push @{$schema -> { 'Exception' }}, $line; } print Dumper $schema;
^M Free your mind!
In reply to Re: Match into scalar
by Moron
in thread Match into scalar
by gavintokyo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |