perl unless循环

[oracle@jhoa 6]$ cat 4.pl 
$mon = $ARGV[0];
unless ($mon eq "Feb") {
print "This month has at least thirty days.
";
}else {
print "Do you see what's going on here?
";
}
[oracle@jhoa 6]$ perl 4.pl Feb 
Do you see what's going on here?

---条件为假时,才执行
[oracle@jhoa 6]$ perl 4.pl Febf
This month has at least thirty days.



unless = if not

原文地址:https://www.cnblogs.com/hzcya1995/p/13352060.html