my $largest_odd; for (@ARGV) { $largest_odd = $_ if $_ % 2 && $_ > $largest_odd; } print $largest_odd ? $largest_odd : 'nothing odd', $/;
In reply to Re: John Guttag's book - 2nd exercise. My attempt in Perl.
by Anonymous Monk
in thread John Guttag's book - 2nd exercise. My attempt in Perl.
by pritesh_ugrankar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |