Don't ask to ask, just ask | |
PerlMonks |
Array searching, grep, firstby jimbus (Friar) |
on Sep 01, 2005 at 17:16 UTC ( [id://488430]=perlquestion: print w/replies, xml ) | Need Help?? |
jimbus has asked for the wisdom of the Perl Monks concerning the following question: Brethren when looping through a list of filenames, I need to see is which element of an array of lines from a CSV file it is and append a couple values to it. I was thinking of preprocessing the array, parsing the info I need from each line and creating a hash of the substring and the original string, then I could do a direct lookup to modify the original line and walk the keys to regenerate the file. but I was thinking there had to be a more direct way of doing it I looked at grep and first, but it returns the values and not the element number. Any thoughts? Thanks, Jimbus
Never moon a werewolf!
Back to
Seekers of Perl Wisdom
|
|