\@test_array and \%test_hash becomes \$test_scalar
@$array_ref and %$hash_ref becomes $$scalar_ref
So,
my $test_scalar = 123; print Dumper($test_scalar); test_hash(\$test_scalar); print Dumper($test_scalar); sub test_scalar { my $scalar_ref = $_[0]; $$scalar_ref = "whatever"; }
In reply to Re: Way to do a "scalar ref"?
by ikegami
in thread Way to do a "scalar ref"?
by ultranerds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |