programming-examples/perl/Statement/A program containing a simple example of an if statement.pl
2019-11-15 12:59:38 +01:00

9 lines
211 B
Perl

#!/usr/local/bin/perl
print ("Enter a number:\n");
$number = <STDIN>;
chop ($number);
if ($number) {
print ("The number is not zero.\n");
}
print ("This is the last line of the program.\n");