package Doodle; use Modern::Perl; sub bop { my( $in ) = @_; my @dark; my @records; while( <$in> ){ next if /<[^>]+>/; if( /^\s*$/ ){ push @records, [ @dark ] if @dark; undef @dark; } else { s/\s+$//; push @dark, [ split ':', $_, 2 ]; } } return @records; }
In reply to Re^2: Perl Module to parse text file
by Anonymous Monk
in thread Perl Module to parse text file
by Gary Yang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |