Perl allocates space automatically, as needed. You can do something like this:
my $tail;
for (1 .. 10) {
my %record = (
title => (1950 + $_),
artist => 'chromatic orchestra',
);
# handle first condition
$tail ||= $record;
$tail->{_prev} = \%record;
$record{_next} = $tail;
$tail = \%record;
}
Untested, but that's generally one way to do it.
Update: Fastolfe pointed out that since I had changed my mind in the middle about the nature of %record, I should have changed the curly braces to parens. Fixed.