There's more than one way to do things | |
PerlMonks |
regexp searches over array slicesby Reverend Phil (Pilgrim) |
on Nov 09, 2001 at 03:18 UTC ( [id://124229]=perlquestion: print w/replies, xml ) | Need Help?? |
Reverend Phil has asked for the wisdom of the Perl Monks concerning the following question:
Hello folks. I was pulling in a line of data and unpacking it into an array. I was then going to perform some function on the condition that there was any non-space data in two of these array elements. What I had done was:
For some odd reason, this was not working. In order to see if I could do this, I had gone directly into the interpreter (dos prompt, type perl) and populated an array and tried out the code. It all worked as I expected, and that's why I used it. For some reason though, I am unable to do this from a script on another Win2k box. I have to write it out as: That works. That's fine. But I'm not happy either way =) Does anyone know why such a thing would work in the interpreter and not through a script? Awaiting wisdom, -=rev=-
Back to
Seekers of Perl Wisdom
|
|