Don't ask to ask, just ask | |
PerlMonks |
Re: position of first matching regexby AnomalousMonk (Archbishop) |
on May 17, 2014 at 02:25 UTC ( [id://1086408]=note: print w/replies, xml ) | Need Help?? |
Note also the general point that an expression like $startloc = @- evaluates an array in scalar context and thus gives you the number of elements in the array, not the value of any particular element. See Context in perldata, and the tutorials Context tutorial, and Arrays: A Tutorial/Reference, in particular the section "Get count of elements".
In Section
Seekers of Perl Wisdom
|
|