in reply to Re: A quit key when no chomp
in thread A quit key when no chomp

Ahh... that makes sense. How can the array eq one thing or another it is a list!
Still I won't know what the input is. And the input won't be chomped for output reasons.
So my first order of business is to get the array scalar(?) and find the 'q\n'?
No wonder Randal didn't write it this way in the book!
--
ellem@optonline.net
There's more than one way to do it, just don't use my way.

Replies are listed 'Best First'.
Re: Re: Re: A quit key when no chomp
by erikharrison (Deacon) on Mar 03, 2002 at 07:46 UTC

    A thing to keep in mind is what chomp really does. chomp is a safe chop. I don't want to give it away, but reconsider whether or not it matters if you chomp the input when you know what character will be removed.

    Cheers,
    Erik
      I thought chomp takes "\n"

      And since I want output that resembles:
      One
      Two
      Red
      347

      I thought that leaving the input (un)chomp(ed) would be a good thing.
      --
      ellem@optonline.net
      There's more than one way to do it, just don't use my way.