Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Hash Question

by jethro (Monsignor)
on Jan 09, 2013 at 11:17 UTC ( #1012434=note: print w/ replies, xml ) Need Help??


in reply to Hash Question

That's what variables were invented for

my $inp; print "What column do you want ? "; do { $inp= <>; chomp($inp); } until ($inp=~/^\d+$/ and $inp>=11 and $inp<=19); foreach (<$bh>) { my @text=split(/\t/); $bHash{$text[0]} = $text[$inp]; }

In this case the user is asked to type in a column number between 11 and 19


Comment on Re: Hash Question
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-08-01 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls