Re: (Slightly OT) RE: terminating input

2001-11-04 Thread Paul Johnson
On Sun, Nov 04, 2001 at 12:18:38PM -0800, Dave Storrs wrote: > > > On Sun, 4 Nov 2001, Gary L. Armstrong wrote: > > > I am amazed. How does someone figure out that you can do this sort of thing? > > > > chomp($value[++$i] = ); > > > > I mean, $value[++$i]? That really works? Crazy. [...] >

(Slightly OT) RE: terminating input

2001-11-04 Thread Dave Storrs
On Sun, 4 Nov 2001, Gary L. Armstrong wrote: > I am amazed. How does someone figure out that you can do this sort of thing? > > chomp($value[++$i] = ); > > I mean, $value[++$i]? That really works? Crazy. [...] Well, that's mostly a C-style issue (and yes, it is crazy). C programme

RE: terminating input

2001-11-04 Thread Gary L. Armstrong
I am amazed. How does someone figure out that you can do this sort of thing? chomp($value[++$i] = ); I mean, $value[++$i]? That really works? Crazy. I have six Perl books but somehow I am not yet "getting" this language I guess. But you know what I did, last prog I started just trying stuff t

Re: terminating input

2001-11-02 Thread John W. Krahn
Jason Cruces wrote: > > Hello all, > Probably are really simple one but haven't found the > answer yet. In an interactive program, where a user is > prompted to enter more than one value, I would use > > chomp(@values = ); > > And to terminate the input, enter Ctrl-D (or Ctrl-Z on > windows). >

Re: terminating input

2001-11-02 Thread Maxim Berlin
Hello Jason, Saturday, November 03, 2001, Jason Cruces <[EMAIL PROTECTED]> wrote: JC> Hello all, JC> Probably are really simple one but haven't found the JC> answer yet. In an interactive program, where a user is JC> prompted to enter more than one value, I would use JC> chomp(@values = ); JC>

RE: terminating input

2001-11-02 Thread Wagner-David
Just some minor changes to allow no input to terminate your processing. This will terminate when only enter is depressed. #!perl -w my $i=-1; my @value = (); do{ chomp($value[++$i] = ); }until (! $value[$i]); # print the input foreach ( @value ) { print "$_\n"; } Wags ;) -Ori