http://www.perlmonks.org?node_id=473516


in reply to Re^2: How do i extract 3 variables from each line in a file, and print them to a new file
in thread How do i extract 3 variables from each line in a file, and print them to a new file

That would print a comma at the end of the output string, so you would need a way to prevent it, let's say, like this:

for (@matches) { print "$_,"; } print "\b ";

(Sorry about replacing foreach with for - someone mentioned to me earlier that it's faster and works the same way anyways)

Personally, I prefer Transient's way of doing things... although I don't quite understand why it parses split first and then map...

--------------------------------
An idea is not responsible for the people who believe in it...