Perl Postfix

[Solved] Perl Postfix | Perl - Code Explorer | yomemimo.com
Question : perl postfix

Answered by : charlesalexandre-roy

# Basic syntax:
statement if condition;
statement unless condition;
# Example usage:
my $x = 3;
my $y = 5;
# run the statement on the left only if the statement on the right is true
print "x is less than y\n" if $x < $y;
--> x is less than y
# run the statement on the left only if the statement on the right is false
print "x is less than y\n" unless $x > $y;
--> x is less than y

Source : http://korflab.ucdavis.edu/Unix_and_Perl/current.html | Last Update : Fri, 18 Mar 22

Answers related to perl postfix

Code Explorer Popular Question For Perl