Tham, Philip wrote:

Hi,

The while loop

while(<@check_vip_ports>)
{

$token=pop(@check_vip_ports);
...


}

It is exiting before traversing the entire array. On running it on debug
I found that a function in the perl library is returning a values which
causes the exit as follows:-

File::Glob::csh_glob(/usr/lib/perl5/5.8.2/sparc-linux/File/Glob.pm:137):
137:        my $pat = shift;
  DB<11> x $_
0  8256
  DB<12> r
scalar context return from File::Glob::csh_glob: undef


It seems you're probably missing what is actualy happening there. (with all the globbing and po()ing ;p) Try this:


for(@check_vip_ports) {
 print "\$_ is $_";
}
# just use $_ instead of $token

# or if you *really* want to use $token:
for my $token(@check_vip_ports) {
 print "\$token is $token";
}

You may want to
 perldoc -f pop
 perldoc perlop
 perldoc -f glob

HTH :)
Lee.M - JupiterHost.Net
Anyone familiar with this situation.

Philip


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to