#!/usr/bin/perl
#
# eg8: play with scalar references
#
use strict;
use warnings;

my $x = 10;
my $ref = \$x;

print "before: x is $x\n";
print "before: ref refers to x, value $$ref\n";

$$ref++;

print "after: x is $x\n";
