Add some parens:
my ($hRef)=@_; [download]
In reply to Re: Passing Reference of a Hash to a method by edan in thread Passing Reference of a Hash to a method by piyush.shourie