in reply to Re: array of strings that matched a pattern
in thread array of strings that matched a pattern
i had to do thiswhile (<infile>) { if (my @matches = $_ =~ /exp/) { print join "\t", @matches; } }
I can't see what was wrong with the first version?while (<infile>) { if (my @matches = $_ =~ /exp/) { my $line = join "\t", @matches; print $line; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: array of strings that matched a pattern
by Anonymous Monk on Apr 29, 2011 at 21:13 UTC | |
by Anonymous Monk on Apr 29, 2011 at 21:38 UTC |