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

Re: Desperatly seeking the wisdom of the Monks

by earthboundmisfit (Chaplain)
on Oct 26, 2001 at 21:05 UTC ( [id://121666]=note: print w/replies, xml ) Need Help??


in reply to Problem with while loop

Let's take one piece of your code and rewrite it a bit:
open (FILE, "$file") || die "Can't open $file"; $tmp=<FILE>; foreach(split(/\t/,$tmp)){ push(@hashkeys, $_); }
This takes only the first line of the file. I think what you want is:
my @hashkeys; open (FILE, "$file") || die "Can't open $file"; my @lines=<FILE>; foreach my $line (@lines){ my @fields = (split(/\t/,$line){ push(@hashkeys, $fields[0]); # or perhaps it's some ot +her # field you want? }
This isn't meant as a definitive answer but merely a small illustrative example to help you sort out exactly what you want to do

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://121666]
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: (3)
As of 2024-04-26 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found