Thursday, July 30, 2009

Are hashes and structs the same in PERL?

Please explain or give a quick example if they are different.





Thanks

Are hashes and structs the same in PERL?
No, perl hashes and c structs are different in several ways. Perl hashes allow you to dynamically assign key/value pairs in a dictionary-like way. Perl hashes allow allow you to store and retrieve complex data sets as well.
Reply:I am assuming you are talking about C to PERL.





For structs, see this linke: http://www.bke.hu/tyby/perl/advprog/ch02...





for hashes see here: http://www.wellho.net/mouth/43_Hash-of-l...


No comments:

Post a Comment