Bash ~ Perl ~ Python ~ Batch ~ Ruby
Friday, 3 January 2014
Perl ( single line if statement)
chomp($f=<STDIN>);
$s = 0;
$d = $s + ( "$f" eq "yes" ? 3 : 2 );
print $d."\n";
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment