Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: perl behavior with print command

by NetWallah (Canon)
on Feb 17, 2016 at 16:59 UTC ( [id://1155479]=note: print w/replies, xml ) Need Help??


in reply to perl behavior with print command

($note +=1) is an "lvalue" - i.e. a value that can be assigned to.

"0" (a constant) cannot be assigned to (It cannot take a different value), so perl complains.

Note "%=" is essentially an assignment operator.

        "Think of how stupid the average person is, and realize half of them are stupider than that." - George Carlin

Replies are listed 'Best First'.
Re^2: perl behavior with print command
by raghuprasad241 (Beadle) on Feb 17, 2016 at 17:19 UTC
    Thank you NetWallah. That explains the problem.
      next error will be print interpreted as a function.. because you have print (..) you can use the strange syntax print +(..) or the ugly print "",(..) one

      L*

      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

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

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

    No recent polls found