Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Assign multiple scalars the same value

by nobull (Friar)
on Jan 25, 2005 at 12:21 UTC ( [id://424841]=note: print w/replies, xml ) Need Help??


in reply to Assign multiple scalars the same value

Others have told you how to do what you ask but I'd like to point out that at least 90% of the time when people think they want declare three or more scalars in the same place and assign then all the the same value they are wrong.

Usually they are making one or more of the following mistakes:

  • Suffering from premature declaration. (i.e. not declaring all variables in the smallest applicable scope).
  • Using multiple scalar variables where they should be using a hash or array.
  • Representing the concept of undefindness using some value other than undef.
There's just been an almost identical thread over in comp.lang.perl.misc

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-20 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found