in reply to Re^9: How to fetch the value of unix command result
in thread How to fetch the value of unix command result
I dont want to hard code the values like below, because the values may change CHECK, KCHEC to some other values like CHECK1 and KCHEC1, then this will not work, so how can we assign the values without hard coding
The output of dumper
$VAR1 = 'CHECK'; $VAR2 = 7; $VAR3 = 'KCHEC'; $VAR4 = 4;
$c = $count{'KCEHC'}; #4 $c1 = $count{'CHECK'}; #7
foreach $key(%count){ $c = $count{$key}; $c1 = $count{$key}; }
The above code, give the output as
$c = 4; $c1= 4;
but i want out put as CHECK = 4 and KCHEC =7, how can i get this
KCHEC=4 CHECK=7
How can i get this, any suggestion on this
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: How to fetch the value of unix command result
by rajsai28 (Novice) on Jul 02, 2013 at 14:05 UTC |