in reply to position of first matching regex
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".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: position of first matching regex
by techtaskers.com (Novice) on May 17, 2014 at 14:59 UTC | |
by AnomalousMonk (Archbishop) on May 17, 2014 at 17:35 UTC |