No such thing as a small change | |
PerlMonks |
Re^11: Computing results through Arraysby robby_dobby (Hermit) |
on Jun 24, 2015 at 10:02 UTC ( [id://1131780]=note: print w/replies, xml ) | Need Help?? |
Hello yasser8@gmail.com,
The problem here is in this line: print fnd_max %m You see, the fnd_max sub requires a hashref, while you're passing a full hash into it. Also, why are you using prototypes for your subroutine? Unless you're using v5.20, where subroutine signatures were introduced, don't use them. To correct your problem, change the %m to \%m - make it clear that it's a sub call, print fnd_max(\%m). Not really important, this is just my convention.
In Section
Seekers of Perl Wisdom
|
|