in reply to Re^2: How to fetch the value of unix command result
in thread How to fetch the value of unix command result

I want to store the value 4 and 6 in a scalar variable as follows

my $c = 4; my $c1 =6;

Why would you want to go to all the trouble to declare cryptic, arbitrary variables like $c and $c1 when you've already been shown how to dynamically create hash entries that directly map to the keywords in your input file? More to the point, what part of my suggestion was either unacceptable or unclear?

This is my code shown below

my $r = `gunzip -c test.txt.gz|cut -f3 -d'|'|sort|uniq -c`;

This is also the same code you posted in your original node, which makes me wonder how much of an effort you made to either work with my suggestion or continue on your own.