In Perl, which of these is the “better” style?
$hash{"string"} or $hash{string}?
In any case, are they functionality identical?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From perldata perldoc:
So yes fundamentally identical. However beware of gotchas:
Will show:
My preference is for the bareword… but remember those () or a preceding + (see jrockway’s comment and answer) if you’re calling a sub 😉