#!/usr/local/bin/perl %tAssociativeArray=('name'=>'John','age'=>'31','sex'=>'male'); foreach(sort keys %tAssociativeArray) { $tKey=$_; $tValue=$tAssociativeArray{$tKey}; print $tKey.' -> '.$tValue."\n"; }%tAssoc