On 3/9/11 Wed  Mar 9, 2011  8:46 AM, "vito pascali" <vito.pasc...@gmail.com>
scribbled:


> 
> The results of u script are:
> 
> Overlap: alfa
> Unique: gamma, beta
> Remains: beta
> 
>  What I need is really different:
> 
> Overlap have to be: alfa,10 (couse the couple is already in @G1 and @L1);
> Unique have to be: beta,11 (couse the other couple of value in array
> (gamma,12 and gamma) have to be excluded both couse gamma exist in both!
> I don't really know how to explaine better, Im just tryng to do what usually
> do with a single oracle query and that now i cant do couse i don't have
> grants for a dblink..

That sounds only "slightly" different. Please examine the code that I have
provided and modify it for your own, specific needs.

If you want to print out the values along with the keys, then do so! You
will also find the the line labeled "Unique" contains keys that are unique
to @G1 and @L1 before keys in @G2 are eliminated. The line labeled "Remains"
contains the keys left over after that step is done. So it seems to me that
the key, value pairs in the %unique hash are the ones you want. Let us know
if that is not the case.

To print the values along with the keys:

for my $key ( keys %unique ) {
  print "[ $key, $unique{$key} ]\n";
}




-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to