Skip to content

Instantly share code, notes, and snippets.

@pera
Last active December 28, 2015 23:29
Show Gist options
  • Save pera/7579603 to your computer and use it in GitHub Desktop.
Save pera/7579603 to your computer and use it in GitHub Desktop.
golfday/s
print "$_ day",do{'s' if $_!=1} for int(2.2);
print "$_ day",$_==1?'':'s' for int(2.2);
print"$_ day".'s'x!!($_-1)for int 2.2;
print"$_ day",$_-1?'s':''for int 2.2;
my $foo = map{"$_ day".($_-1?'s':'')}int 2.2;
my $foo = "$_ day".($_-1?'s':'')for int 2.2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment