Help for this page

Select Code to Download


  1. or download this
    sub increment {
        my ( $number, $incval )  =  @_;
    ...
    while ( my $result  =  $action->() ) {
        print "$result\n";
    }
    
  2. or download this
    sub do_something {
        my $action  =  shift( @_ );
    ...
    while ( my $result  =  $action->() ) { # <-- The error happens here
        print "$result\n";
    }