unless statement in while : unless « Statement « Perl






unless statement in while

  

while (<>) {
    print "Too small!\n" unless $_ > 100;
}

   
    
  








Related examples in the same category

1.Conditional operator: The unless Modifier
2.The unless Construct
3.The unless statement is the opposite of if and executes a block unless a condition is true.
4.Using unless with regular expression
5.unless statement
6.unless statement with else
7.unless statement with elsif