While Loop in Perl

Hi All
I am reading the file using while loop in Perl someting like

while (my $s=<F>){
chomp($s);
..
..
..
}

What i want to do is after the chomp statement i used some condition, if the condition is met then it should move forward otherwise it should read the new line. How Can it be done in Perl

What in

If

, and if condition is not met then

if

will throw back to while loop

IF you can be bothered to have a look in a beginners book about PERL you might be enlightened, ELSE you won't. It is that simple.

I hope this helps.

bakunin

Hi,

Try this one after chomp,

next if(condition);

Cheers,
Ranga:-)

while (my $s=<F>){ chomp($s);
     if #(condition) {
          # do this
     } else  {     #if the if fails           
          # do this
      }
}