Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Declaring my $var versus declaring my($var)

by jwkrahn (Abbot)
on Jun 10, 2011 at 14:13 UTC ( [id://909129]=note: print w/replies, xml ) Need Help??


in reply to Declaring my $var versus declaring my($var)

In your example my($a) = 1; the parentheses impose list context on the assignment, which in this case is OK because you are only assigning a list of one element, but it will make a difference on functions that distinguish between scalar and list context (i.e. localtime).

In your example our(%list) = (); the parentheses around %list are redundant because %list by itseft already enforces list context.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2026-04-13 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.