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. [...]
>
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
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
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).
>
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>
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