#!/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