How do you Create an array of a struct in perl?  Is this even possible
in perl?

 

So far I have...

 

struct Carrier_Info => {

        name    => '$',

        abbrev  => '$'

};

...

my @carriers = Carrier_Info->new();

 

I have tried several different methods of loading data into the struct
but none have been successful so far.  I've tried:

$carriers{$x} = [$temp1, $temp2];

 

$carriers{$x}->name($temp1);

$carriers{$x}->abbrev($temp2);

 

$carriers[$x]->name($temp1);

$carriers[$x]->abbrev($temp2);

 

Where $x is an incrementing counter and the temp variables are my data I
am trying to load.

 

Thanks,

 

 

Travis Hervey

Reply via email to