Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Eval/package question

by haukex (Archbishop)
on Jan 21, 2020 at 19:05 UTC ( [id://11111701]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Eval/package question
in thread Eval/package question

I have a generic configuration in an Excel-file, and move it to several hashes by creating the commands as strings and eval-ing them.

As others have mentioned, stringy eval is often not a good idea. Especially when working with hashes, what's wrong with the following?

our %items; my $item = '3'; my $key = 'Value'; my $value = 2; $items{$item}{$key} = $value;

Log In?
Username:
Password:

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

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

    No recent polls found