Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Hash/file --> doesn't seem to work

by Crian (Chaplain)
doesn't seem to work NODE.owner = 326482 N.title = monktitlebar sitedoclet N.owner = 17342 -->
on Jun 10, 2009 at 09:37 UTC ( #770264=note: print w/replies, xml ) Need Help??


in reply to Re: Hash/file --> doesn't seem to work
in thread Hash/file --> doesn't seem to work

But this way vou have to read the big file often. As supposed above it would be better, to switch the while loops.

untested:

while(<FILE>) { chomp; my ($objid,$other) = split(/\s+/,$_); while(my ($key,$value)= each (%hash_table)) { if($objid =~ /$key/i) { print "$key is present in $objid\n"; } else { next; } } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://770264]
help
Chatterbox?
[marto]: good morning all
[Corion]: Hi marto ;)
[Corion]: I hope you're well ;)
[marto]: running late today, get to work and people are just sitting around. "can't delete file, quota exceeded"
[Corion]: marto: Oy :-/
[Corion]: Ah, it's only "quota exceeded", not "filesystem full", so it's "merely" an administrative act to up the FS quota resp. inode quota
[Corion]: I've been on databases where I couldn't drop a table or delete rows because the DB was full. Not so much fun...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-01-24 09:53 GMT
Sections?
doesn't seem to work NODE.owner = 326482 N.title = Sections sitedoclet N.owner = 17342 -->
Information?
doesn't seem to work NODE.owner = 326482 N.title = Information sitedoclet N.owner = 17342 -->
Find Nodes?
doesn't seem to work NODE.owner = 326482 N.title = Find Nodes sitedoclet N.owner = 17342 -->
Leftovers?
    doesn't seem to work NODE.owner = 326482 N.title = Leftovers sitedoclet N.owner = 17342 -->
    Voting Booth?
    Do you watch meteor showers?




    Results (203 votes). Check out past polls.