in reply to Simple Perl, to get me started.

Here is another way to solve the problem, using only basic functions and operators - very little other than what is in your original programs.

use strict; use warnings; my $longest = ''; for my $x (@ARGV) { if(length($x) > length($longest)) { $longest = $x; } } my $length = length($longest); print "longest argument is '$longest' - length = $length\n";

Here are a couple more issues for you to think about:

What should your program do if there are more than one arguments of the same, longest length. For example, what if the arguments were: abc def ghi?

What should your program do if there are no arguments?