I don't understand the last line of:
And I don't understand the point of:sub account_over_limit { my ($account, $balance) = @_; return exists $LIMITED_ACCOUNTS{$account} && $balance > $LIMIT; }
BEGIN { my $var; sub set_var { $var = shift; } sub var { $var; } }
I've had numerous problems trying to determine where a global was changed, and I have a feeling there's a good anti-global argument around here somewhere, but I can't find it. When a script is doing alot of calculating and outputting just the end result, I don't think it matters how localized things are. You still won't know what affected the output.
Another, barely related thing--I'm just about done with a GNU tar GUI for Windows, and I'm finding good uses for goto all over the place.
Anyway, please make your code examples as simple as possible and explain them properly.
In reply to Re: Global variable vs passing variable from sub to sub
by Wassercrats
in thread Global variable vs passing variable from sub to sub
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |