Rob Dixon wrote:
> 
> my %h;
> 
> print "Matrix is as follows :- \n";
> foreach $a (@arr) {
>   print "Row = @{$a}\n";
>   my @vals = @$a;
>   my $key = shift @vals;
>   $h{$key} = [EMAIL PROTECTED];
> }

My apologies. There was a mistake in my code in that I was using the special
variable $a for this loop. I should have written something like this:

  my %h;

  print "Matrix is as follows :- \n";
  foreach (@arr) {
    my @vals = @$_;
    print "Row = @vals\n";
    my $key = shift @vals;
    $h{$key} = [EMAIL PROTECTED];
  }



Rob

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to