$ perl -e 'my $var = "test\ntest"; my ($treffer1) = $var =~ /(.*)/; my ($treffer2) = $var =~ /(.*)/s; print ">>$treffer1<<\n<<$treffer2>>"' >>test<< <>