in reply to Tidier and more efficient parsing code
Update: The 'and' in the code was added. It used to be incorrectly '&&'my $section = 0; my @sections=(undef,[],[]); while(<TEXTFILE>) { $section = $1 and next if /;section([12])/; die "Bad section $section" unless $section; push @{$sections[$section]},$_; }
Yves / DeMerphq
--
When to use Prototypes?
|
|---|