note
DigitalKitty
Hi [Anonymous Monk].
<br />
<br />
In an attempt to display the 'syntactically rich' nature of the perl language, I have taken the liberty of including yet another array oriented solution:
<br />
<code>
#!/usr/bin/perl -w
use strict;
my @array = ( 33, 56, 3, 2, 67, 101, 218, 4, 17 );
my @nums = sort { $a <=> $b } @array;
print "The largest number is: $nums[$#nums]\n";
</code>
<br />
Output:
<br />
<code>
C:\>perl pg8.pl
The largest number is: 218
</code>
<br />
C:\>
<br />
<br />
Hope this helps,
<br />
-Katie
343060
343060