|
|
| The stupid question is the question not asked | |
| PerlMonks |
Re: How can I change the perl program involving if-elsif-else conditional to get correct result?by 2teez (Chaplain) |
| on Apr 23, 2012 at 11:03 UTC ( #966576=note: print w/ replies, xml ) | Need Help?? |
|
You can do the following, but I will also advise you understand how perl works Put all your variable into a subroutine, and then iterate over them getting and returning the largest as done below in case (a) Case a:
Case b: One can also use a module **List::Util** from CPAN http://search.cpan.org/~pevans/Scalar-List-Utils-1.25/lib/List/Util.pm. like this I hope this helps.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||