Hi there, I'm really new to perl and programmation too so don't bear on me if I will say something wrong pls... :)
The problem: I have 3 querys to 2 different oracle databases: 1)script query G1: #!/usr/bin/perl -w use DBI; use warnings; my ( $db ); $db = DBI->connect( "dbi:Oracle:host=x.x.x.x;sid=XX", "x", "x" ) || die( $DBI::errstr . "\n" ); my $SEL_G1 = "select x,y from table"; my $query_handle = $db->prepare($SEL_G1); $query_handle->execute(); $query_handle->bind_columns(undef,\$x, \$y); while (my @result_g1 = $query_handle->fetchrow_array){ print "$x-$y\n"; } $db->disconnect if defined($db); This print: 1@1600@1@1600A@1@alfa@ 1-10125691-20110301102500 ------------------------------------------------- 2)script Query G2: #!/usr/bin/perl -w use DBI; use warnings; my ( $db2); $db2 = DBI->connect( "dbi:Oracle:host=x.x.x.x;sid=XX", "x", "x" ) || die( $DBI::errstr . "\n" ); my $SEL_G2 = "select x from table"; my $query_handle_2 = $db2->prepare($SEL_G2); $query_handle_2->execute(); $query_handle_2->bind_columns(undef,\$x); while (my @result_gal = $query_handle_2->fetchrow_array){ print "$x\n"; } $db2->disconnect if defined($db2); This print: 1@1501@1@1501CPL1@1@alfa ---------------------------------------------------------- 3) Query L1: #!/usr/bin/perl -w use DBI; use warnings; my ( $db1 ); $db1 = DBI->connect( "dbi:Oracle:host=x.x.x.x;sid=YY", "y", "y") || die( $DBI::errstr . "\n" ); my $SEL_L1 = "select x,y from table" my $query_handle_1 = $db1->prepare($SEL_L1); $query_handle_1->execute(); $query_handle_1->bind_columns(undef,\$x, \$y); while($query_handle_1->fetch()) { print "$x-$y"; print "\n"; } $db1->disconnect if defined($db1); This print: 1@1206@1@1206@1@alfa@ 1-10123745-20110303162900 I need that the results from the query L1 is checked against the results from the query G1 and that what differs between will be checked finally against the results of G2. The problems are: 1)the results are huge, specially what come from G1; 2)2 of the 3 arrays (@G1 e @L1) and one not (@G2); 3)I'm really a newbie.... So what would be for you the best (and the fastest) way to do the job? Example,link and RTFM are really appreciate! Tnx in advance Vito