in reply to Detecting Last line of a file

Use join:
...
chomp @content; print join(', ', @content);
...

-- gam3
A picture is worth a thousand words, but takes 200K.