programming-examples/perl/Datatype/Increments Reference.pl

16 lines
358 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use strict;
use warnings;
my $variable = 10;
my $reference = \$variable;
print( "\$variable = $variable\n" );
print( "\$reference = $reference\n" );
print( "\$\$reference = $$reference\n" );
$$reference++;
print( "\$variable = $variable\n" );
print( "\$reference = $reference\n" );
print( "\$\$reference = $$reference\n" );