Cause code from any challenge isn't published here, i thought about code golfing on fragements, to improve your and my golfing! Of course, integrating STDIN directly into your algorithms will make your code shorter for a few bytes, but since not everyone is a pro, try your best on those tiny tasks ;)
Of course, integrating STDIN directly into your algorithms will make your code shorter for a few bytes, but since not everyone is a pro, try your best on those tiny tasks ;)
Part 1: STDIN to String
1. containing newlines
13 bytes:
@_=<>;s//@_/;or
$_=join'',<>;2. without newlines
15 bytes:
$s.=$_ while<>;Any other or shorter codes?
cheers
Zapp