[ale] Converting C data structures to Perl

Fletch fletch at phydeaux.org
Mon Apr 21 21:40:25 EDT 2003


>>>>> "Chris" == Chris Fowler <cfowler at outpostsentinel.com> writes:

    Chris> Maybe I'm doing something wrong with it, Because even if I
    Chris> simplify down to an array of hashes like this,

    Chris> %device1 = { ip => "192.168.2.231", name => "bubba", pass
    Chris> => "password", }; %device2 = { ip => "192.168.2.231", name
    Chris> => "bubba", pass => "password", }; @unit = (%device1,
    Chris> %device2);

    Chris> print $array[0]{name};

    Chris> I do not get a name displayed.

Aaaaaah, things are clearer now.  Whatever you're reading that perl
can't do nested structures is very wrong.  You want to start with
perldoc perlreftut, and then proceed on through perldoc perlref,
perldoc perldsc, and perldoc perllol.


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 294-0820 (m)      |  scary questions." -- Jules                =(___)=
                      |                                               U
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list