Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Syntax error with loops

by adamk (Chaplain)
on Feb 25, 2004 at 06:00 UTC ( [id://331611]=note: print w/replies, xml ) Need Help??


in reply to Syntax error with loops

Let me also just add that the following command is completely invalid
inc $printnumber 1;
'inc' is just not perl command...

Perl CAN, of course, increment a number, using $printnumber++ much like in C.

What actually happened is that perl often interprates 'foo bar' as 'bar->foo', a method call. This lets things like the following work naturally
# Java'ish looking way my $Object = new Some::Class( $arg ); # Simple method call my $Object = Some::Class->new( $arg );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://331611]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-24 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found