Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Using hashes for set operations...

by LanX (Saint)
on May 21, 2011 at 13:35 UTC ( [id://906065]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Data::Dump qw(pp);
    my @array1=(1..5);
    ...
    
    
    pp \(%set1,%set2,%union,%intersection,%difference);
    
  2. or download this
    Use of uninitialized value $tmp[0] in hash slice at /home/lanx/B/PL/PM
    +/set.pl line 17.
    Use of uninitialized value $tmp[3] in hash slice at /home/lanx/B/PL/PM
    +/set.pl line 17.
    (
    ...
      { 3 => 3, 4 => 4, 5 => 5 },
      { 1 => 1, 2 => 2, 6 => 6, 7 => 7 },
    )
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://906065]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found