Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Declaring and checking content of variables with consecutive names

by haukex (Chancellor)
on Sep 27, 2016 at 08:53 UTC ( #1172728=note: print w/replies, xml ) Need Help??


in reply to Re: Declaring and checking content of variables with consecutive names
in thread Declaring and checking content of variables with consecutive names

This is more of a reply to the OP:

It's important to note that this code will not work when strict is enabled, and strict should always be turned on - in fact, modern versions of Perl turn it on for you if you say use v5.12; or higher at the top of the script. (See also Use strict and warnings)

Disabling strict is something that should only be done if you know what you are doing and why. In this case, others have already explained why there are much better ways to do what you want.

Regards,
-- Hauke D

  • Comment on Re^2: Declaring and checking content of variables with consecutive names
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2019-09-17 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (206 votes). Check out past polls.

    Notices?