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!

In reply to Array searching, grep, first by jimbus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":