Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Please don't use eval for this! (was Re: List Values As Multidimensional Hash Keys)

by ysth (Canon)
on Mar 15, 2004 at 01:07 UTC ( [id://336575]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    eval "\$hash{$key}=\"$val\"";
    __END__
    You have just been cracked!
    
  2. or download this
    use Data::Dumper;
    $Data::Dumper::Terse = 1;
    $Data::Dumper::Useqq = 1;
    
    $key = join '}{', Dumper split /:/, $key, -1;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-19 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found