Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Why so strict?

by GrandFather (Saint)
on Nov 12, 2014 at 03:37 UTC ( [id://1106935]=note: print w/replies, xml ) Need Help??


in reply to Why so strict?

I'm guessing that's a mocked up example derived from some "real" code because as it stands it doesn't make sense on a bunch of levels.

1/ say doesn't return much that's useful (true on success, but printing to the console wil pretty much always succeed). Both invocations of say will return the same result so $c gets the same value regardless.

2/ Maybe what you really wanted was to say $c, not the contents of $c. In that case you should either have written "\$c ..." or '$c ...'.

3/ We don't usually use & in function calls now, just write func().

Perl is the programming world's equivalent of English

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-23 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found