Ñêîëüêî íîã ó 7 ìóðàâüåâ?
use strict;
use warnings;
# êîëè÷åñòâî ëàï ó îäíîãî ìóðàâüÿ
sub AN_ANT_LEGS { 6 };
print "1 ant has ".AN_ANT_LEGS." legs\n";
print "7 ants have ".(AN_ANT_LEGS * 7)." legs\n";
http://perltrap.com/ru/skolko-nog-u-7-muravev
Slide 3
Slide 3 text
Èñòèíàëîæü, íîëüíå íîëü
use feature qw/say/;
sub check_value
{
my $var = @_;
say defined $var ? "defined" : "undefined";
say $var ? "true" : "false";
say $var == 0 ? "zero" : "not a zero";
return;
}
http://perltrap.com/ru/dened-true-nonzero