Thanks RonB
map {"$_\n"} grep {not exists $bhash->{$_}} sort keys %$ahash;
this worked :)
User Profile
Collapse
-
I expect output as following
In A hash but not B hash:
abc
abcdef
abf
In B hash but not A hash:
abco
abcdef9
abf2Leave a comment:
-
a.txt
abc
abcd
abcdef
hkdfg
abf
mklek
b.txt
abco
abcd
abcdef9
hkdfg
abf2
mklek
I am getting output as below,
In A hash but not B hash:
abc
abf
abcdef
In B hash but not A hash:
abf2
abcdef9
abcoLeave a comment:
-
Text file compare output not in order
Hi All,
I am quite new to perl , I want to compare two text files , and output should the unique values in each files.
Using hash I am able to get unique values from each files but the output is not in order.
what should I do to get output in order ?
Code:use warnings; @ARGV == 2 or die "Must specify 2 files!\n"; my $afile = shift; my $bfile = shift; my $ahash =
No activity results to display
Show More
Leave a comment: