Kindly advice I am unable to print value of a ,b &c
my @array = qw($a,$b,$c);
push(@new_array ,@array);
for my $x (@new_array)
{
DEBUG(" DEBUG : $x);
}
It showing me $a,$b,$c instead of there values.
Thanks,
The qw operator creates a list of strings. It quotes words, so it's "qw".
my @array = qw( x y z );
is exactly the same as
my @array = ( 'x', 'y', 'z' );
Your line:
my @array = qw($a,$b,$c);
is saying
my @array = ( '$a,$b,$c' );
What you want is to drop the qw.
my @array = ( $a, $b, $c );
use warningsin your code, you would have been given a clue to the problem. If you had addeduse diagnosticsyou would have got a lot more detail.