Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^10: Hash Question

by perlnoobster (Sexton)
on Jan 09, 2013 at 13:33 UTC ( #1012486=note: print w/replies, xml ) Need Help??


in reply to Re^9: Hash Question
in thread Hash Question

Hello Anonmous monk, I'm making progress:
foreach (<$ah>) { my @text = split(/\t/); for my $value (@text[11, 14, 17]) { if ($bHash{ $text[3] } eq $value) { $bHash{ $text[0] } = $value; last; } print OUT2 join( "\t", @text[1,2,3,4,11,5,6,8,7,11,12]),"\t1\t1\n" +; } } close $ah;
it works however the results seem to be duplicated? Thank you

Replies are listed 'Best First'.
Re^11: Hash Question
by perlnoobster (Sexton) on Jan 09, 2013 at 14:10 UTC
    That's strange, even if I use just the original column i.e. 11 the results are generated but not correctly:
    foreach (<$ah>) { my @text = split(/\t/); for my $value (@text[11]) { if ($bHash{ $text[3] } eq $value) { $bHash{ $text[0] } = $value; last; } print OUT2 join( "\t", @text[1,2,3,4,11,5,6,8,7,11,12]),"\t1\t1\n" +; } } close $ah;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012486]
help
Chatterbox?
[1nickt]: I had an interview couople of weeks ago, heard from a principal engineer that a friend of his who works at The Google told him that the self-teaching software that determines the dynamic pricing for their adverts...
[1nickt]: ... has become so complex that there is no one at the Goole who knows what it does.
[marto]: William Gibson was right
[moritz]: a classical problem with machine learning
[1nickt]: moritz isn;t the difference today that the machine learning algos are in charge of most stuffs?
[moritz]: depends on what you mean by "most stuff"
[1nickt]: I am sure I don't know about most of the stuff that is no longer controlled by humans. I do know that it's past the point of determining consumer pricing and into things that can kill me with blunt force!

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-11-21 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (301 votes). Check out past polls.

    Notices?