in reply to if statement

From the level of code you presented here, I would recommend a book like "Learning Perl" from O'Reilly. It will cover much of the general programming experience that you seem to be lacking as well as all of the other concepts that you need to complete this task.

What follows are a few of the errors in your code.

update: Moved recommendations to the top.

--
IndyZ

Replies are listed 'Best First'.
Re: Re: if statement
by tachyon (Chancellor) on May 08, 2002 at 05:48 UTC

    The while-loop will run forever

    Actually this is a very common idiom for reading a file a line at a time.

    while(<DATA>) { print; } __DATA__ The while loop will finish now!

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      Whoops. I was looking at a copy that I had pasted into my node, sans <code> tags so it disappeared on me.

      --
      IndyZ