Re: why Perl complaints my script
- From: chen_li3@xxxxxxxxx (Chen Li)
- Date: Thu, 28 Sep 2006 08:19:08 -0700 (PDT)
Hi Andriano,
Thank you very much,
Li
--- Adriano Ferreira <a.r.ferreira@xxxxxxxxx> wrote:
On 9/28/06, chen li <chen_li3@xxxxxxxxx> wrote:
Hi all,the
I write a small script for permutation. When I use
version 1) Perl always complaint it although I get
result. If I use version 2) it never says a wordabout
it. Any comments?
Perl always complain (provided you called for that
with -w or "use
warnings") when you do something like that:
$ perl -w -e 'my $a; $a'
Useless use of a variable in void context at -e line
1
This is meant to warn you about a probable mistake:
you may have meant
$a++
a # to invoke a sub
or something like that. As Igor has said the first
statement in the
for is often used for declaring loop variables or,
more generally, for
loop initialization statements. If you don't have
these initialization
statements, you may omit it.
Regards,
Adriano Ferreira
--
To unsubscribe, e-mail:
beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail:
beginners-help@xxxxxxxx
<http://learn.perl.org/>
<http://learn.perl.org/first-response>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
.
- References:
- Re: why Perl complaints my script
- From: Adriano Ferreira
- Re: why Perl complaints my script
- Prev by Date: Re: why Perl complaints my script
- Next by Date: Re: can you pass an array in a form in Perl
- Previous by thread: Re: why Perl complaints my script
- Next by thread: Re: why Perl complaints my script
- Index(es):
Relevant Pages
|