in reply to Re: Examing local's stack
in thread Examing local's stack
#!/usr/bin/perl use strict; use warnings; our $x = 3; foo(7); sub foo { my $oldx=$x; local $x = shift; print "localised x = $x\n"; print " old x = $oldx\n"; foo(0) if $x; # recursive call, only 1 time } __END__ localised x = 7 old x = 3 localised x = 0 old x = 7
Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
|
|---|