Monday, June 20, 2011

perl array references and hash references


In case of hashes
%ddd=(ddd,ff,ff,fg.dd.ss.aa.sss,xxx,qqq,ccc);
%ddd=(ddd=>ff,ff=>fg,....);
But when it used as hash reference.
$ddd={ddd=>ff,ff=>fg,....};
To create empty hash refernce.
$ddd={};

In case of arrays it is different
@sss=("gghgh","dsdsd","qwqwqw","qqq");
When used as array refernce
$sss=["gghgh","dsdsd","qwqwqw","qqq"];
To create a empty array reference;
$sss=[];

No comments:

Post a Comment