- or download this
while (match('a')) {
print "- $_\n"; # $_ is undef all the time
}
- or download this
while (my $entry = match('a')) {
print "- $entry\n"; # prints the correct results
}
- or download this
my $matchPos = 0;
sub match {
...
while (match('a')) {
print "- $_\n";
}