while( $_ =~ // ) { my $a= `$1`; $a =~ s/\n/
\n/g; $_ =~ s//$a/; } print $_;