#!usr/bin/perl -w use strict; for my $i (1..9) { if ($i == 5) { print "Next"; next; } print $i; } __END__ Output: 1234Next6789