Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Why parens?

by tobyink (Canon)
on Feb 07, 2013 at 17:22 UTC ( [id://1017704]=note: print w/replies, xml ) Need Help??


in reply to Why parens?

When declaring only one variable, it's mostly an aesthetic choice; but consider declaring multiple variables simultaneously...

my ($a, $b, $c); # the good my $a, $b, $c; # the bad (i.e. broken) my $a, my $b, my $c; # and the ugly
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found