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

Re: Re: Creating a hash with the same name as the value of $hashref-{y}

by kingman (Scribe)
on Aug 15, 2001 at 23:29 UTC ( [id://105149]=note: print w/replies, xml ) Need Help??


in reply to Re: Creating a hash with the same name as the value of $hashref-{y}
in thread Creating a hash with the same name as the value of $hashref-{y}

The trouble is the values are coming from user input so I can't create a hash of hashes :(
  • Comment on Re: Re: Creating a hash with the same name as the value of $hashref-{y}

Replies are listed 'Best First'.
Re: Re: Re: Creating a hash with the same name as the value of $hashref-{y}
by runrig (Abbot) on Aug 16, 2001 at 00:23 UTC
    The trouble is the values are coming from user input so I can't create a hash of hashes.

    How is that a valid reason? Please don't use symbolic references without a good reason. Processing user input is an ever better reason NOT to use symbolic references. What if you end up trashing a perlvar? Create a HoH and don't live dangerously, here's a snippet that processes input:

    my %HoH; while (<DATA>) { my ($name, $key, $value) = split; $HoH{$name}{$key} = $value; } __DATA__ name key value a b c 1 2 3

Log In?
Username:
Password:

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

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

    No recent polls found