Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: chr() function

by Laurent_R (Canon)
on Nov 14, 2018 at 23:12 UTC ( [id://1225828]=note: print w/replies, xml ) Need Help??


in reply to Re^3: chr() function
in thread chr() function

I disagree. Suggesting someone to use $a (or $b) special auto-declared (package global) variables for the purpose of avoiding the need of variable declaration with my is really poor practice.

The:

my $alpha = chr(65);
solution suggested earlier by LanX is far better.

There are a few cases where $a and $b package global variables are really useful (especially for a sort subroutine, but not only that, some other functional programming techniques can also make good use of them), please don't use them when simply declaring the variable can make what you want.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-25 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found