**mistakenly u have sent me the same code i sent**
Just to clear this up, chargrill has changed the code you provided by adding:
use strict;
use warnings;
chargrill goes on to say that he fixed the resultant errors and warnings, along with various other issues. So it is not, as you claim, the same. You seem to have neglected to state in your reply what the output is, any errors you are experiencing.
chargrill also states:
"I've also terminated your while and for loops (near the end) which may or may not be the right spot to terminate them"
Which you have failed to comment on. In other words you are not really helping matters by posting a reply like this
Martin | [reply] [d/l] |