Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

most efficient way to implement "A without B"

by telcontar (Beadle)
on Apr 09, 2005 at 17:55 UTC ( #446267=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @b = sort {$a <=> $b} @b;
    @a = sort {$a <=> $b} @a;
    print "@b\n";
    ...
      }
      $j++;
    }
    
  2. or download this
    @c = grep { 
      defined($b[0]) and !($b[0] eq $_) or !shift @b
    } sort {$a <=> $b} @a;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://446267]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2020-06-04 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (30 votes). Check out past polls.

    Notices?