In addition... fantastic for passing named parameters - without concern for their order:
connect(PW=>'poof!', IP=>'10.102.102.13', USER=>'bob'); sub connect { # log in to $args{IP} as "$args{USER}/$args{PW}" # note default IP can be overridden %args = ( IP => '192.168.1.100', @_ ); ... }
In reply to Re: why use a hash instead of an array
by hbm
in thread why use a hash instead of an array
by DarrenSol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |