|
|
| Think about Loose Coupling | |
| PerlMonks |
how to initialize array to null valuesby sharan (Acolyte) |
| on Mar 23, 2009 at 13:22 UTC ( #752580=perlquestion: print w/ replies, xml ) | Need Help?? |
|
sharan has asked for the
wisdom of the Perl Monks concerning the following question:
Hi,
Hi all, I am trying to implement a co-relation problem in perl. I have two arrays i.e. array1 and array2 which contain following values. I want my output as: i tried implementing it with simple for loops as: But its not showing the proper output. It shows some random output in array3 and array4. I guess there is some problem in the step no.2. It shows error stating that 'array3' cannot be null. How can we initialize array to null values?? my @array3=(); #is it correct?? When the second step executes.. it compares the two same value but the value stored in array3 from array1 is not a string infact something like..HASH(0x82e3594), HASH(0x82e35a0). What could be the problem. Please guide me. Thanking you,
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||