in reply to Re^2: How can I change the perl program involving if-elsif-else conditional to get correct result?
in thread How can I change the perl program involving if-elsif-else conditional to get correct result?

If you are going to do it like that, you need a numeric sort, not the default alphabetic sort:
@sorted = sort{$a <=> $b}($x, $y, $z); print $sorted[-1];
Also, $a and $b are special variables reserved for sort and other purposes. Don't uses these for normal user variables.
  • Comment on Re^3: How can I change the perl program involving if-elsif-else conditional to get correct result?
  • Download Code