in reply to Re: What does this mean
in thread Code explanation needed (was: What does this mean)
andmy @matches = grep { $file[$_] =~ /^\Q$storeline|\E/ } 0..$#file;
are not equivalent. The former grabs the indices of where matches occur, while the latter grabs the matches themselves. Without knowing more about the rest of the program, I'm not going to say which version should be preferred.my @matches = grep { /^\Q$storeline|\E/ } @file;
Abigail
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: What does this mean
by tadman (Prior) on Jun 10, 2002 at 14:08 UTC | |
by Abigail-II (Bishop) on Jun 10, 2002 at 14:18 UTC | |
by tadman (Prior) on Jun 10, 2002 at 14:32 UTC | |
by Abigail-II (Bishop) on Jun 10, 2002 at 14:49 UTC | |
by tadman (Prior) on Jun 10, 2002 at 15:12 UTC | |
| |
Re: Re: What does this mean
by Sifmole (Chaplain) on Jun 10, 2002 at 13:54 UTC |