Re: void context, looping example

2001-04-25 Thread Paul
--- "McCormick, Rob E" <[EMAIL PROTECTED]> wrote: > > I'm trying to understand an example from the Waite Press book (Perl 5 > Interactive Course, a bit dated, '97, Orwant) The example doesn't > have -w or strict; enabled. I ran it with them and the error follows: > > #!c:/perl/bin/perl -w > u

RE: void context, looping example

2001-04-25 Thread Nutter, Mark
E [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 25, 2001 5:47 PM > To: '[EMAIL PROTECTED]' > Subject: void context, looping example > > > > I'm trying to understand an example from the Waite Press book (Perl 5 > Interactive Course, a bit dated, '97

Re: void context, looping example

2001-04-25 Thread Johnathan Kupferer
The void context means that you're doing something that does nothing useful. $num * 3; Takes the value of $num, multiplies it by 3 and then trows the result away, leaving $num unchanged. I think you want *= like this: use strict; print "Please type an integer: "; chomp( my $num = ); while(

void context, looping example

2001-04-25 Thread McCormick, Rob E
I'm trying to understand an example from the Waite Press book (Perl 5 Interactive Course, a bit dated, '97, Orwant) The example doesn't have -w or strict; enabled. I ran it with them and the error follows: #!c:/perl/bin/perl -w use strict; print "Please type an integer: "; chomp ( my $num = )