Reference Counting and Destruction : Array Value « Array « Perl
- Perl
- Array
- Array Value
Reference Counting and Destruction
#!/usr/bin/perl
use warnings;
use strict;
my $ref;
{
my @array = (1, 2, 3);
$ref = \@array;
my $ref2 = \@array;
$ref2 = "Hello!";
}
undef $ref;
Related examples in the same category