Rob Dixon <[EMAIL PROTECTED]> wrote:
> 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 = @$_;
> p
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 t
Amit Saxena wrote:
Hi all,
Hello,
I am trying to make a perl code which would read a matrix (basically an
array which contains references to other arrays) and initialize a hash with
the first value of each dereferenced array acting as a key and remaining
elements as values using references.
Amit Saxena wrote:
> Hi all,
>
> I am trying to make a perl code which would read a matrix (basically an
> array which contains references to other arrays) and initialize a hash with
> the first value of each dereferenced array acting as a key and remaining
> elements as values using references.
>