Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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.

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2016-10-26 11:21 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (340 votes). Check out past polls.