$ perl -MO=Deparse -F'"' -lE 'say $F[$_ * 2 + 1] for 0 .. $#F/2' BEGIN { $/ = "\n"; $\ = "\n"; } use feature 'current_sub', 'bitwise', 'evalbytes', 'fc', 'postderef_qq', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; LINE: while (defined($_ = readline ARGV)) { chomp $_; our @F = split(/"/u, $_, 0); say $F[$_ * 2 + 1] foreach (0 .. $#F / 2); } -e syntax OK