Next if : Next « Statement « Perl






Next if

 

#!/usr/bin/perl -w

use strict;

print "Please enter some text:\n";
while (<STDIN>) {
    next if $_ eq "\n";
    chomp;
    print "You entered: [$_]\n";
}

   
  








Related examples in the same category

1.Using the next statement in a foreach structure.
2.Next statement
3.Going onto the Next
4.A word-counting program that uses the next statement.
5.Using both next and continue
6.next with condition
7.Next statement with if statement