> Hi,
> 
> The while loop
> 
> while(<@check_vip_ports>)

In the above you are passing the values in the list @check_vip_ports to
the file globbing operator <>, which is not likely what you want to be
doing (let us know if it is for sure what you want to do). 

> {
> 
> $token=pop(@check_vip_ports);

'pop' also removes the elements from the array which is usually not
necessary, in the case that it is you should probably loop over the
array using indexes instead of the standard 'foreach' idiom, then your
while loop will make a bit more sense.

> ...
> 
> 
> }
> 
> 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
> 
> Anyone familiar with this situation.
> 

See if the common,

foreach my $token (@check_vip_ports) {
  # work on $token here
}

Will work.  If not show us more of what you are doing, what
check_vip_ports contains and what you are doing with $token...

Turn on 'use strict'/'use warnings' if you haven't...

http://danconia.org


-- 
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