programming-examples/perl/Datatype/Dereferencing the Pointer.pl
2019-11-15 12:59:38 +01:00

6 lines
184 B
Raku

#!/bin/perl
$num=5;
$p = \$num; # $p gets the address of $num
print 'The address assigned $p is ', $p, "\n";
print "The value stored at that address is $$p\n"; # dereference