Help for this page

Select Code to Download


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