Sachin Hegde wrote:
>
> Hi,
Hello,
> I want to add an array as an hash entry e.g.
> %HOA = {one=>"@arr"};
>
> And you're right John I do get the warning
>
> Reference found where even-sized list expected at <program name> line n.
>
> Now how do I remove it?
Like I said in my previous message, use parenthesis () instead of braces
{} to assign to a hash.
%HOA = ( one => "@arr" );
To assign the array @arr to the hash you can copy the array to an
anonymous array.
%HOA = ( one => [ @arr ] );
Or you can use a reference to @arr.
%HOA = ( one => [EMAIL PROTECTED] );
perldoc perldata
perldoc perldsc
perldoc perllol
perldoc perlreftut
perldoc perlref
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]