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?? |
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
In Section
Seekers of Perl Wisdom
|
|