KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In Perl, reference to anything is a simple scalar, and has the $ sigil. It's sometimes hard to say what kind of reference it is. I personally prefix variable names for references with a letter, which indicates ref type. Examples: my $aValues = []; # arrayref my $hValue = {}; # hashref my $oValue = bless {}; # object my $sValue = \(my $s = 'foo'); # scalarref ... I've seen both supporters and opponents to such notation. Do you use it? Does it have any disadvantages?
Tags (comma-separated)
Save Edits
Cancel