On 2/22/02 10:40 AM, Carlo Sayegh <[EMAIL PROTECTED]> wrote: > Hello All,
Hi Carlo, > I've written a very simple script where the user inputs data, from which > a report is generated. My problem is that some of this data is in rows > and columns and every time the user hits enter to start a new line, the > script thinks they are done and moves on to the next part of the script. > Can anyone tell me How I can have the user start a new line without > terminating this part of the program. Assuming you're using something like $input = <STDIN>; chomp($input); to get your data now, you can do this @input = <STDIN>; chomp(@input); to get an array, with each element corresponding to each line the user entered. Users type ^D (control-d; or their EOF character, if it's not ^D) when they are finished entering data. Note that once you hit return, you can't go back and edit the previous line. Hope that helps, -- Michael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]