in reply to why this function call print 9
sub f1{ my ($a) =@_; $cp=1; $LOCAL_CODEPAGE =10; print "This is $a\n"; print $LOCAL_CODEPAGE; if ($a==1){ $LOCAL_CODEPAGE = $cp; break; } return $LOCAL_CODEPAGE = $a; print "\n"; } @3=(3,10, 13); ## comment this out and see your value come back as 9 print "\$LOCAL_CODEPAGE=$LOCAL_CODEPAGE: f1(@3,9,3,4,5): ".f1(@3,9,3,4 +,5)."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: why this function call print 9
by edwardt_tril (Sexton) on Feb 09, 2006 at 00:57 UTC | |
by GrandFather (Saint) on Feb 09, 2006 at 01:01 UTC | |
by SamCG (Hermit) on Feb 09, 2006 at 18:46 UTC |