cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: perl addition problem

From: Georg Horn <horn_at_koblenz-net.de>
Date: Thu, 9 Sep 2004 14:21:33 +0200

On Thu, Sep 09, 2004 at 01:59:31PM +0200, Linus Nielsen Feltzing wrote:
> Siva wrote:
>
> > print (3+4)+7;
> > Answer is : 7
>
> This is interpreted as:
>
> print(3+4) +7;
>
> where the arguments to print are enclosed in parenthesis, and the result
> from the print function is added to 7 and discarded.

And "perl -w" tells you:

print (...) interpreted as function at xy.pl line 3.
Useless use of addition (+) in void context at xy.pl line 3.

So the first three rules of perl programming are:
1: use -w
2: use -w
3: use -w

Bye,
Georg, wondering what this has to do with curl ;-)
Received on 2004-09-09