Perl Query Regarding format

Hello people.
I have got the following script
QM=ARGV[0];
open (CHS_OUT, "echo 'DISPLAY QSTATUS(SYSTEM.CLUSTER.MY.QUEUE) all'|runmqsc $qm|");
while (<CHS_OUT>)
{
if ( /QUEUE\(/ )
{
$QueueName = ValueParser("QUEUE", 6);
}
if ( /IPPROCS\(/ )
{
$InpProcs = ValueParser("IPPROCS", 8);
#print ("\nInp Procs : $InpProcs");
}
if ( /OPPROCS\(/ )
{
$OutProcs = ValueParser("OPPROCS", 8);
#print ("\nOut Procs : $OutProcs");
}
if ( /CURDEPTH\(/ )
{
$CurDepth = ValueParser("CURDEPTH", 9);
write;
}
}
format STDOUT =
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>> @>>>> @>>>>>>
$QueueName, $InpProcs, $OutProcs, $CurDepth
The problem is that I am getting a warning while running the script:
Use of uninitialized value at test.pl line 113, <CHS_OUT> chunk 73.
Thius error comes a number of times ... but I have printed the values of every variable and found them to be initialized.
Althoug the script is running fine in one server I am not getting the value of OutProcs in another server. Any idea folks? :confused:

I noticed on this line that the variable QM:

open (CHS_OUT, "echo 'DISPLAY QSTATUS(SYSTEM.CLUSTER.MY.QUEUE) all'|runmqsc $qm|");

Is lower case, but this line

QM=ARGV[0];

is is upper case. That could be a problem.

if that is all supposed to be perl code it looks like should not work. These two lines do not look like perl:

QM=ARGV[0];
open (CHS_OUT, "echo 'DISPLAY QSTATUS(SYSTEM.CLUSTER.MY.QUEUE) all'|runmqsc $qm|");

Sorry bout this ... but the line should look more like:
@JYoung : $qm = $ARGV[0];
@Kevin : It is a perl script that executes a few mq commands ...