#!/usr/bin/perl use strict; use warnings; my $txt = q(); while ($txt =~ s/"([^"]+)"//) { print "$1\n"; }