note AnomalousMonk <blockquote><i><c> my ($first, $last ) = /(.+",)(.+)/; $last =~ s//"\n$first"/g; </C></I></BLOCKQUOTE> <p> I second [hdb]'s [id://1026473|reply] in general. </P> <p> Let me add that the <br> <c> $last =~ s//"\n$first"/g;</c> <br> statement from the posted code quoted above is very unlikely to do what you want: it will match the <c> // </C> null regex pattern globally and do a substitution against what is matched. If there has been a previous successful regex match (e.g., the match in the preceding line), the <c> // </C> regex matches using the <i>previously matched regex</I>. (If there has been no previous successful regex match, the <c> // </C> regex matches <i>anything!</I>) As it stands, this substitution seems to be a no-op. If it is part of some carefully thought out strategy, I advise you to abandon it immediately: it has 'maintenance nightmare' written all over it! (In the code example below, <c> \x22 </C> stands in for an unbalanced <c> " </C> (double-quote) character.) </P> <c> >perl -wMstrict -le "$_ = qq{\"ABC\",\"DEF\",\"This is a test\",\"Hello\"}; ;; my ($first, $last ) = /(.+\x22,)(.+)/; print qq{'$last'}; ;; $last =~ s//\"\n$first\"/g; print qq{'$last'}; " '"Hello"' '"Hello"' </C> 1026108 1026454