ummm... this is a lot different than your original code that I rewrote my working example to coincide with:
sub subroutine { my ($self,$vip) = @_; my @ip = (); my $sql_query = $self->{queryObj}->execute( "select machineIP from 'tablename' where frontend=$vip"); my $records = $self->{queryObj}->result(); foreach my $row (@$records) { push @ip, $row->{machineIP}; } return \@ip; }
As afoken stated above, the query you changed to doesn't even get the right column anymore, so it makes sense my code produces uninit warnings.
In reply to Re^5: regex in perl
by stevieb
in thread regex in perl
by user786
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |