|Do you know where your variables are?|
Getting element of array with a matchby peppiv (Curate)
|on Dec 23, 2002 at 14:28 UTC||Need Help??|
peppiv has asked for the
wisdom of the Perl Monks concerning the following question:
Just seeing who else spent all their time off during the year and are stuck working the holidays. For those of you left, let's see if we can give this descent young fella a hand.
My program fills an array with a text file that looks like this:
The actual amount of elements in this array may vary, so I can't say $array to be sure of getting a sockpuppet. I need to search the array. Fortunately, I know that the data I'm looking for begins with 1006. What I'd like to do is put the value I'm looking for into a string for further use. (info that needs to be sent back through a URL - junk like that).
So, exposing my weak knowledge of grep and search, I tried the following:
I know, I know. Pathetic ain't it?