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