in reply to Re^3: Case insensitive string comparison (updated x2)
in thread Case insensitive string comparison

My guess is that the OP has an array of similar lines, not just a ref to a single line. If he wants to send that array info to a sub, then pass a reference to that array. The OP provided nothing in terms of work flow and we are left to guess. With the info given, passing a ref to a single line doesn't appear to make any sense. Passing a ref to the entire array of strings would make sense.

I also don't really understand why some csv lines should be transformed into a single token and others left as they are. This transformation is presumably being done for some future processing. Ok, what processing is that? And why is condensing a subset of lines to a particular single token result necessary?

Maybe what is of interest are the lines that don't match the pattern? Maybe the returned array should be limited to the lines that don't match? I have no idea because this is application specific.

  • Comment on Re^4: Case insensitive string comparison (updated x2)