DB<120> $str='xxx@@xx\@xx@abc\@xxx@efg@\xxx' => "xxx\@\@xx\\\@xx\@abc\\\@xxx\@efg\@\\xxx" DB<121> print ( defined $1 ? "$1\t" : "") while ( $str =~ m/ (?: [\\\@]{2} | ( \@\w+ ) | . ) /xg ) @abc @efg DB<122> grep { defined } $str =~ m/ (?: [\\\@]{2} | ( \@\w+ ) | . ) /xg => ("\@abc", "\@efg") #### DB<135> grep {defined} $str =~ m/ (?: [\\\@]{2}+ | ( [\\\@]\w+ ) | [^\\\@]+ ) /xg => ("\@abc", "\@efg")