Pure Programmer
Blue Matrix


Cluster Map

Project: Punchcard Message

Write a program that takes a message on the command line and then prints it out as a bit pattern similar to an old-style punchcard. Eight rows will be output with each column in the output representing the bit pattern for one byte in the message. The least significant bit should be at the bottom and the most significant bit should be at the top. Use the LEFT HALF BLOCK Unicode character ('\u258c') to represent a bit that is on in the byte. Use a space for bits that are off.

Output
$ perl PunchcardMessage.pl PureProgrammer ▌▌▌▌▌▌▌▌▌▌▌▌▌▌ ▌▌▌ ▌▌▌▌▌▌▌▌▌ ▌▌▌ ▌▌ ▌ ▌ ▌ ▌▌ ▌ ▌ ▌▌ ▌▌▌ ▌ ▌▌▌▌ ▌ ▌ ▌ ▌▌ ▌▌▌▌

Solution