my $test,$test2; print "$test\n"; ## print nothing if(not defined $test){ my $test = "GOOD"; print "$test\n"} ## print GO +OD ( I need to define $test becasue I use $test at second "if" functi +on only ) print "$test\n"; ## print nothing ( It is my purpose to print nothing +so I cann't use global function at first "if" function ) if(not defined $test2){ print "$test\n" } # I want to print GOOD. GOOD + is defined on first "if" function. but It print nothing becuase I us +e local function(my)
In reply to local & global function by dideod.yang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |