Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: get difference of two arrays

by naturalsciences (Beadle)
on Nov 14, 2013 at 13:49 UTC ( [id://1062580]=note: print w/replies, xml ) Need Help??


in reply to Re: get difference of two arrays
in thread get difference of two arrays

Oh! Thanks. Yes it is Estonian :D. Somehow I posted even a more erroneus code that I have here working - (Probably trying to make it neat or remove some stuff - glad I did not remove the comments as it made it possible to use your lingusitics skill :D)
#!/usr/bin/perl -w use strict; use warnings; use Data::Dumper; #kaks üheveerulist faili, prindib need veerud mis ühes on aga teises p +ole #ehk siis suurem fail miinus väiksem my $num_args = $#ARGV + 1; if ($num_args != 3) { print "\nUsage: ./lahutaja suurem väiksem vahe(output)\n"; exit; } my $fasta=$ARGV[0]; my $quala=$ARGV[1]; my $out=$ARGV[2]; open FA, "< $fasta"or die "Can't open $fasta: $!"; open QA, "< $quala" or die "Can't open $quala: $!"; open OUT,"> $out" or die "Can't open $out: $!"; my @bl = <QA>; my @a = <FA>; my %h; @h{@bl} = @bl; my @output=[grep {!exists $h{$_}} @a]; print Dumper @output ; print OUT @output; close FA; close QA; close OUT;
was the original half-working piece

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-24 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found