<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>RE: SPUG: How can I find @1 - @2?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>#!/usr/bin/perl -w<BR>
<BR>
use strict;<BR>
<BR>
my @students = qw{ Bashful Doc Dopey Grumpy Happy Sleepy Sneezy };<BR>
my @enrolled = @students[ 2, 3, 4 ];<BR>
my @not_enrolled;<BR>
<BR>
print &quot;Enrolled = &quot; . join( ', ', @enrolled ) . &quot;\n&quot;;<BR>
<BR>
<BR>
{<BR>
&nbsp;&nbsp;&nbsp; my %tmp;<BR>
&nbsp;&nbsp;&nbsp; @tmp{ @students } = @students;<BR>
&nbsp;&nbsp;&nbsp; delete( @tmp{ @enrolled } );<BR>
&nbsp;&nbsp;&nbsp; @not_enrolled = keys %tmp;<BR>
}<BR>
<BR>
<BR>
print &quot;NOT enrolled = &quot; . join( ', ', @not_enrolled ) . &quot;\n&quot;;<BR>
<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
...<BR>
I have in @enrolled a list of enrolled students and in @students a<BR>
list of all students. How would I go about finding the contents of<BR>
@students who are not @enrolled?<BR>
</FONT>
</P>

</BODY>
</HTML>