output :sub subroutine { my ($self,$vip) = @_; my @ip = (); my $sql_query = $self->{queryObj}->execute( "select primary_ip from buddy_vips where machineIP=$vip"); my $records = $self->{queryObj}->result(); for my $row (@$records){ if (my ($ip) = $row->{machineIP} =~ /(\d+\.\d+\.\d+\.\d+)/){ $row->{machineIP} = $ip; } push @ip, $row->{machineIP}; } return \@ip; }
Use of uninitialized value in pattern match (m//) at
Use of uninitialized value in pattern match (m//) at
Use of uninitialized value in pattern match (m//) at
In reply to Re^4: regex in perl
by user786
in thread regex in perl
by user786
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |