Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: populate a hash, with limits set by user?

by BastardOperator (Monk)
on Sep 12, 2000 at 05:38 UTC ( [id://32047]=note: print w/replies, xml ) Need Help??


in reply to populate a hash, with limits set by user?

I probably could do a little better if your question was a little more detailed, but...
print "What's the limit?: " chomp($limit = <STDIN>); foreach (1 .. $limit) { print "enter variable $_ : "; chomp($somehash{$_} = <STDIN>); }
If this doesn't do it for ya, I'll try again ;)

Looking at BlaisePascal's post, it kinda does look like a homework assignment, but I'll be nice and leave this here anyway.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-24 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found