in reply to Re: Pattern matching across an array
in thread Pattern matching across an array
But @array isn't interpolated anywhere. The =~ operator doesn't impose any magical interpolation of the LHS. Instead, @array is in scalar context, and @array in scalar context is the length of the array.
Update: Oops, sorry, my bad. Missed the parenthesis in the OP. ihbmy @foo = 1..5; print @foo =~ /5/; # prints '1' for success.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Pattern matching across an array
by tommyw (Hermit) on Feb 06, 2003 at 10:46 UTC |