Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: $scalar => 'WTF?';

by BrowserUk (Pope)
on Sep 07, 2011 at 00:49 UTC ( #924494=note: print w/ replies, xml ) Need Help??


in reply to $scalar => 'WTF?';

If you enabled warnings, you should have seen:

Useless use of a constant in void context at ...

What you coded is exactly the same as:

my $x, 3;

Which in turn is equivalent to:

my $x; 3;

You declared but did not initialise $x and put a constant in a void context.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: $scalar => 'WTF?';
Select or Download Code
Re^2: $scalar => 'WTF?';
by {}think (Acolyte) on Sep 07, 2011 at 01:05 UTC
    I remember now, that => is simply a syntactical equivalent of the comma operator! This makes sense! Thanks
    {}think; #Think outside of the brackets

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-09-16 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (10 votes), past polls