programming-examples/perl/Datatype/Exchange reference.pl
2019-11-15 12:59:38 +01:00

15 lines
222 B
Perl

#!/usr/bin/perl
use warnings;
use strict;
my $text1 = "This is a value";
my $text2 = "This is a value";
my $ref1 = \$text1;
my $ref2 = \$text2;
print $ref1 == $ref2;
$$ref1 = 'New value';
print $$ref2;