I first wrote 2**$_/2, but that gives me 0.5 for $_ being 0. I didn't want to use int().You can avoid the int() by making it implicit:
$ perl -wle'print [0..256]->[2**$_/2] for 0..9' 0 1 2 4 8 16 32 64 128 256
In reply to Re: Beautiful code I wrote ;-)
by ysth
in thread Beautiful code I wrote ;-)
by Skeeve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |