In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
(John_kennedy) wrote:
> Is this line correct:
> @UNLOCKED = grep(!/LOCKED/g, @SAME);
you could just as well say
@UNLOCKED = grep( !/LOCKED/, @SAME);
since you only need to find the string once.
> print BOTH @SAME;
> print oBOTH @UNLOCKED;
>
> but when I list the output files they are identical:
make sure that "LOCKED" appears in the original file
otherwise the two files will be the same. ;)
however, instead of creating a new array to hold data already
found in the old array, you could do something like:
foreach ( @SAME )
{
print oBOTH unless /LOCKED/;
}
--
brian d foy <[EMAIL PROTECTED]> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]