- or download this
use warnings;
use strict;
...
}
}
close OUT;
- or download this
# split BEFORE a ( or AFTER a )
my @s = split /(?=\()|(?<=\))/;
...
### that even lets you get away with leaving out @s
push @results, [ split /(?=\()|(?<=\))/ ];
- or download this
# display the line if we've never seen the fields
print OUT @$line if not $seen{$line->[1]}++;