in reply to Ending user input

Try reading the input in a loop e.g
my @input; while(<STDIN>) { chomp; last if $_ eq 'done'; push @input, $_; } print join $/, reverse @input;
Also use chomp() instead of chop() as it does what you mean (which is remove the newline ending (which is system dependent (hence the use of $/ in the join() (gee, is this sounding a little Lispish? (Never mind)))))[1].
HTH

_________
broquaint

[1] shamelessly lifted from perlsub ;-)

Replies are listed 'Best First'.
Re: Re: Ending user input
by Anonymous Monk on May 28, 2002 at 17:20 UTC
    thank you