in reply to Simple Perl, to get me started.

The best way to learn is to do. If we just give you the answer you haven't learned anything.

You know you have to combine these two scripts, because the first uses command line arguments to do something else and the second has a nice loop you could use.

So just do it. Try to take from both scripts the things you need and then add inside the loop some way to remember the longest string that you see. If it doesn't work, show us what you got and we will help you from there.

Replies are listed 'Best First'.
Re^2: Simple Perl, to get me started.
by ww (Archbishop) on Oct 27, 2010 at 21:49 UTC
    jethro's point is well taken... and to take it one (possibly irrelevant) step further (because these snippets to review smell a lot like homework; a take-home quiz; or job interview testing):

    If you get the job because we gave you the answers, you won't keep it for long... deservedly!

    And re your hesitance at introducing warnings and strict, were I still interviewing and handing out code like this for "review," applicants who failed to add strict and warnings would fall far down the preference list.

    Oh, yes; my candidates got extra points off for inability to spell things like "pieces."