Mega Code Archive

 
Categories / Perl / Hash
 

Pass key and get value

%hash = (); $hash{fruit} = apple; $hash{sandwich} = hamburger; $hash{drink} = bubbly; print $hash{sandwich};