- or download this
use strict;
use warnings;
use Data::Dumper;
...
print "\n$len \n";
print Dumper $L;
- or download this
ABCD
4
...
'value' => 'A'
};
- or download this
my $L = {
value => "A", next => {
...
}
};
- or download this
my $L;
for ( reverse qw / A B C D E F G/) {
my $pt = { value => $_, next => $L };
$L = $pt;
}
- or download this
$ perl linked_list.pl
ABCDEFG
...
},
'value' => 'A'
};