In the program below, I think I end up with an array of array
references.

But I can not get back the @rest from @desc where it is stored.

Is it possible that @rest is just over written? Might have to think
about doing something else. I can't use hashes as data  elements are
sometimes duplicated.

Any clues as to the syntax to get back the data would be appreciated 

TIA

Owen

============================================================
#!/usr/bin/perl

use strict;
use warnings;

my @lat;
my @lon;
my @desc;
my $rest_ref;

while (<DATA>) {
    my ( $lat, $lon, @rest ) = split;
    print "@rest";
    $rest_ref = \@rest;
    push( @desc, $rest_ref );

}



__DATA__
36.97972        148.88564       House post
36.97853        148.87706       Second fence post
36.97847        148.88756       Curve in road
36.98050        148.88569       Delegate side of gate
36.97694        148.88844       Culvert
36.97956        148.88550       Power Pole
36.98150        148.88344       Dam
36.97922        148.88036       Dam wall
============================================================

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to