wsppan has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; use 5.010; use feature qw(say); sub outer_sub { say "Outer Subroutine Start ..."; my $param = 0; say "PARAM: $param"; $param = inner_sub($param); say "PARAM: $param"; say "Outer Subroutine End."; sub inner_sub { my $param = shift; say "Start inner_sub1"; return ++$param; } } # Main outer_sub(); exit(0); __END__ Outer Subroutine Start ... PARAM: 0 Start inner_sub1 PARAM: 1 Outer Subroutine End.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inner subroutines?
by BrowserUk (Patriarch) on Feb 10, 2011 at 22:36 UTC | |
|
Re: Inner subroutines?
by ikegami (Patriarch) on Feb 10, 2011 at 22:34 UTC | |
by bart (Canon) on Feb 11, 2011 at 16:28 UTC | |
by ikegami (Patriarch) on Feb 11, 2011 at 17:39 UTC | |
|
Re: Inner subroutines?
by Anonymous Monk on Feb 10, 2011 at 22:19 UTC | |
|
Re: Inner subroutines?
by 7stud (Deacon) on Feb 10, 2011 at 23:30 UTC | |
|
Re: Inner subroutines?
by blakew (Monk) on Feb 11, 2011 at 04:05 UTC | |
by 7stud (Deacon) on Feb 17, 2011 at 21:08 UTC | |
by blakew (Monk) on Feb 18, 2011 at 00:27 UTC | |
|
Re: Inner subroutines?
by ron7 (Beadle) on Feb 11, 2011 at 06:03 UTC | |
|
Re: Inner subroutines?
by wsppan (Acolyte) on Feb 11, 2011 at 15:28 UTC |