On 09/03/2011 14:03, vito pascali wrote:
Tnx a lot for u tips!! I just used all (or almost all) u suggestion, but what i really need is some help in the "logic" of the script. I mean at the moment I have this 3 arrays:@G1 = (["alfa" , "10"], ["beta" , "11"]); @L1 = (["alfa" , "10"], ["gamma" , "12"]); @G2 =('gamma'); I need to found only the unique couple of results: ["beta" , "11"] , couse [gamma 12] and [gamma] have to be excluded. What i obtain at the moment is instead: Overlap: $VAR1 = [ 'alfa', '10' ]; ### Correct!! ######### Unique: $VAR1 = [ 'gamma' #### Not correct ######## ]; $VAR2 = [ 'gamma', #### Not correct ######## '12' ]; $VAR3 = [ 'beta',### Correct!! ######### '11' ];
Can you explain exactly what the your rules are? You seem to be saying that ["alfa", "10"] and ["alfa", "10"] belong in 'overlap' because they are identical, which is fair enough. But by what criterion do ["gamma", "12"] and ["gamma"] belong in the same list? Would ["alfa"] belong there too? And ["alfa", "12"]? And ["gamma", "10"]? Rob -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
