Frank Bax wrote:
> #!/usr/bin/perl -w
> use strict;
>
> my %aSuit = ();
>
> $aSuit{0}{'a'} = 'A';
> $aSuit{0}{'b'} = 'B';
> $aSuit{0}{'c'} = 'C';
> $aSuit{1}{'a'} = 'D';
> $aSuit{1}{'b'} = 'E';
> $aSuit{1}{'c'} = 'F';
>
> Now I want to make $aSuit{1} a copy of $aSuit{0}
> %aSuit{1} = %aSuit{0};
> This doesn't work (syntax error), what's the proper statement for
> this?
I used this:
%{$aSuit{1}} = %{$aSuit{0}};
Printed out using Data::Dumper and aSuit 1 now had the same elements of ASuit 0
Wags ;)
*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>