mlenz@wvbh074:~$ cat test.pl use strict; use warnings; my $comment = ''; my $statement = ''; while ($statement !~ m{^(/\*.*\*/;)(.*)}s) { $statement .= <DATA> or d +ie "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.p +l line 6, <DATA> line 1. Found type 1 comment:
Here it tells you uninitialized value $1 explicitly.
In reply to Re^2: Capture not working
by moritz
in thread Capture not working
by Rabenschwinge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |