in reply to Re: substring search in an array of arrays
in thread substring search in an array of arrays
"ER" is misleading. It implies ER is text while it's really a regex. Use /ER/ instead.
Don't pretend the first argument of split is text.
Don't pretend the RHS of =~ is text.
my @grepnames = grep { $_->[0] =~ /ER/ } @test2; print(join(', ', @$_), "\n") for @grepnames;
Update: Fixed LHS to say RHS.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: substring search in an array of arrays
by BrowserUk (Patriarch) on Feb 14, 2008 at 22:46 UTC | |
by ikegami (Patriarch) on Feb 14, 2008 at 22:53 UTC | |
by BrowserUk (Patriarch) on Feb 14, 2008 at 23:15 UTC | |
by ikegami (Patriarch) on Feb 15, 2008 at 02:24 UTC | |
by BrowserUk (Patriarch) on Feb 15, 2008 at 04:27 UTC | |
|