Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Perl Best Practices for naming variables

by Happy-the-monk (Canon)
on Aug 07, 2005 at 14:07 UTC ( [id://481675]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Best Practices for naming variables
in thread Perl Best Practices for naming variables

There sure is more than one way to name your references.

scnr ;-), Sören

  • Comment on Re^2: Perl Best Practices for naming variables

Replies are listed 'Best First'.
Re^3: Perl Best Practices for naming variables
by Anonymous Monk on Nov 08, 2012 at 12:04 UTC

    There sure is more than one way to name your references.

    $rsReally = \"yes really"; $raReally = [qw"yes really"]; $rhReally = {qw"yes really"};

      In Perl, the prefixes of sv, av, and hv might be more recognizable. Well, at least for people who have seen discussions that touched on internals that used the standard (and ubiquitous) abbreviations that are used internally.

      At least, I have sometimes used names like $sv_xml when I saw a value in calling out "this is a reference (of this type)" in the variable name.

      - tye        

        Maybe, though array-value/hash-value/scalar-value don't sound as good as array-ref/hash-ref/scalar-ref -- but definitely better than ref-array/ref-hash/ref-scalar

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-23 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found