Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Perl Recursion

by jwkrahn (Monsignor)
on Sep 27, 2011 at 00:00 UTC ( #927979=note: print w/replies, xml ) Need Help??


in reply to Perl Recursion

my @a=`awk '\$1 ~ /$_[0]/' useful_dat.tab |cut -f 2,3|sort|uniq`: foreach (@a){ my @b=split(/\t/,$_); if($b[1] eq 'Activation'){

You don't chomp the lines from useful_dat.tab so "Activation\n" will never be equal to 'Activation'.

You should probably store the contents of useful_dat.tab in a hash instead of using an external process to read the same file multiple times.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927979]
help
Chatterbox?
[marioroy]: Is List::Util::XS a core Perl module?
[stevieb]: corelist List::Util::XS says "List::Util::XS was first released with perl v5.10.1"
[stevieb]: so yes, since v5.10.1 :)
[MidLifeXis]: According to [metaperl:// corelist], Perl 5.10.1
Lady_Aleena blurbles. One of her favorite modiles is now in "maintenance mode" in favor of a new fangled module.
[MidLifeXis]: D'oh. Slow out of the gate.
[marioroy]: Thanks stevieb, MidLifeXis.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2017-05-24 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?