in reply to Re^2: how to "rename" a global argument in subroutine?
in thread how to "rename" a global argument in subroutine?
Yes, a reference is a "symbolic link", to point to the value you need to either use the arrow or typecast it. For example:
#!/usr/bin/perl use strict; use warnings; my $red = 23; my $also_red = \$red; ${ $also_red } = 12; # typecast to scalar using ${} print "$red is actually $$also_red"; # this also works
|
|---|