Help for this page

Select Code to Download


  1. or download this
    Q:\>perl -wle "my $foo; sub f { $foo = return 'bar' }; f(); print $foo
    +"
    Use of uninitialized value in print at -e line 1.
    ...
    
    Q:\>perl -wle "my $foo='x'; sub f { $foo = return 'bar' }; f(); print 
    +$foo"
    x
    
  2. or download this
    sub f {
        my $position_of_caller = return 3; # f() will be '3', eventually
    ...
    
    f();
    yield; # transfers control to the label CONTINUATION