- or download this
shell$ perl -e 'my $input = <>; chomp($input);if (length($input)) { pr
+int q(length) }; if (defined($input)) { print q(defined) };
- or download this
if($decision eq "to be"){print "Romeo is"}
else{print "Romeo is not"}
- or download this
$dec eq "to be" ? print "Romeo is" : print "Romeo is not";
- or download this
shell$ perl -e 'my $input=<>;
chomp $input;
print q(Romeo );
$input ? print q(is ) : print q(is not );
print qq(\ntaking ),length($input),qq( hours to decide!\n);
- or download this
shell$ perl -e 'my $input; # not yet defined
print q(Romeo );
...
!defined $input ? print q(undefined ) :
$input ? print q(is ) : print q(is not );
print qq(\n taking ),length($input),qq( hours to decide!\n);