http://qs321.pair.com?node_id=475588

celliott has asked for the wisdom of the Perl Monks concerning the following question:

Hi im new to this website and fairly new to perl. here is my code first and output.
my @label = ( "F%", "G%" ); my $str = $dbh->prepare( "SELECT ID, NUM FROM INDEX WHERE ID like ? ); for ( @label ) { $str->bind_param( 1, SQL_VARCHAR ); $str->execute(); my ( $label, $num ); $str->bind_column( undef, \$label, \$num ); while( $str->fetch() ) { print "$label $num\n"; }
here is my output: F01212 F01213 G01212 My problem is i only want the F labels if they dont exist in the G labels so in this case i would want my ouput to be F01213. Sorry if this is long winded. thanks for any help.