On Monday 15 August 2005 22.47, Ryan Perry wrote:
> How can I do this correctly?
>
>
> foreach my $col (@columns) {
> my %{$col} = (
> string => "$col",
> number => [EMAIL PROTECTED]
> );
> push (@graph, \%{$col});
> }
How about something like this? :
my $num = 0;
foreach my $col (@columns) {
my %colhash = (
string => $col,
number => ++$num
);
push (@graph, \%colhash);
}
-dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>