mlenz@wvbh074:~$ cat test.pl use strict; use warnings; my $comment = ''; my $statement = ''; while ($statement !~ m{^(/\*.*\*/;)(.*)}s) { $statement .= or die "Premature EOF\n"; } print "Found type 1 comment: $1\n"; __DATA__ /* foo */; stuff; mlenz@wvbh074:~$ perl test.pl Use of uninitialized value $1 in concatenation (.) or string at test.pl line 6, line 1. Found type 1 comment: