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.

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?
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 making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2016-06-30 13:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (395 votes). Check out past polls.