Do you know where your variables are? | |
PerlMonks |
Re: help manipulating data in an array.by pg (Canon) |
on Nov 12, 2004 at 04:18 UTC ( [id://407269]=note: print w/replies, xml ) | Need Help?? |
First as atcroft pointed out, you most likely wanted to m// an array element, not the array (or the size of the array in fact). Also, what if your array has less than 100 elements, in that case you would get error saying that you used unintialized value in m//. BTW, please use strict. You probably want something like this: (your code indicated that you want to look at the first 100 elemnts only, I assume this is true)
Now a little bit more on m// with array. the m// will actually be performed on scalar(@array), which is the number of elements:
In Section
Seekers of Perl Wisdom
|
|