in reply to Re: Converting Binary Numbers into Binary File
in thread Converting Binary Numbers into Binary File
BEGIN block, then -
perl -pe 'BEGIN{binmode STDOUT}$_=pack"B*",-+-$_'
- 38 chars :-)
<update>oops, wrong - that one strips leading zeroes.. oh, wait...
</update>perl -pe 'BEGIN{binmode STDOUT}chomp;$_=pack"B*",$_'
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ / /\_¯/(q / ---------------------------- \__(m.====·.(_("always off the crowd"))."· ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Converting Binary Numbers into Binary File
by ikegami (Patriarch) on Sep 13, 2006 at 17:22 UTC | |
by borisz (Canon) on Sep 14, 2006 at 08:32 UTC | |
by shmem (Chancellor) on Sep 15, 2006 at 21:23 UTC | |
by shmem (Chancellor) on Sep 13, 2006 at 20:48 UTC |