#!/usr/bin/perl

$head = undef;
$tail = \$head;

while ( <> ) {
    my $line = [ undef, $_ ];
    $$tail = $line;
    $tail = \$line->[NEXT];
}
