How about this?

###################

use strict;
use warnings;

my @a = (1,2,3,4,5);
foreach(@a){
   unless($_ == 3){
      #do something...
   }
}

###################




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Ng, Bill
Sent: Tuesday, April 18, 2006 12:59 PM
To: [email protected]
Subject: Iffor

<snip>

So if my array was:
@a=(1,2,3,4,5);
And we assume that I don't want to execute the block if the value of $_
is 3 ...

Then, in my head, I'm looking for the WORKING (key word there) version
of this:
-----------
@a = (1,2,3,4,5);
if ($_ != 3) for (@a)
{
  print "something";
  &doSomething();
  print "somethingelse";
  &yada($yada{$ya})
}
-------------

<snip>


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to