jdavis wrote:
> >  I have a hash. To use this hash with a module I need it in this form...
> >
> > @data = (
> >     ["12am","1am","2am","3am","4am","5am","6am", "7am", "8am"],  ### key
> >     [   251,   102,  55,   36,   113,  200,    32,    99,   4],   ###val
> > );
> > I confused.. How could I get a hash to the above structure
> >

> I have a hash that i needed to put into a 2d array.
> I wound up doing this...
>
> foreach $key (keys(%temp)){
>         push(@graph_key,$key);
>         push(@graph_value,$temp{$key});
> }
>
> $data[0] = [EMAIL PROTECTED];
> $data[1] = [EMAIL PROTECTED];

Nice!  Very nice!

> Though Im not quite sure why i need to escape the @?
> but it works :)

You don't.  In that context, outside of any string, you are taking a reference to each 
array.  You will profit greatly by reading up on references.  They are one of the keys 
to power programming.

perldoc perlref
perldoc perlreftut

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to