sub make_readonly { my %h = @_; sub { $h{$_[0]}; } } my $v = make_readonly(name => 'Scott', shoesize => '9.5'); print $v->('name'),"'s shoes are size ",$v->('shoesize'),"\n";
In reply to Re: read only variable
by sgifford
in thread read only variable
by coldhawk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |