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 reply to Re: position of first matching regex
by AnomalousMonk
in thread position of first matching regex
by techtaskers.com
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |