http://www.perlmonks.org?node_id=238495


in reply to Ascii Chart

At the author's behest, a somehwat exhaustive list of nits.

--
I'm not belgian but I play one on TV.

Replies are listed 'Best First'.
Re: Re: Ascii Chart
by runrig (Abbot) on Feb 25, 2003 at 18:49 UTC
    The data already existed, so when I wrote the program I tried to do as little work as possible to format it. I disagree with the 'apparent need', though, since if there was no need there wouldn't be an ascii man page on the systems that have one (of course, on those systems with an ascii man page, I agree that there is no apparent need for this script).

    I thought about using printf to format the numbers rather than leaving them hard coded, but at the time I liked the idea of leaving it hard-coded for easy viewing and re-usability of the data (and it required less work on my part). And using $. is a good idea, but likewise I'd rather be able to look at the data and see which line is which.

    If I were to use formats, format and write would probably have to be formline and $^A since the format is dynamic, but that and EBCDIC and locale specific code pages and unicode are left as projects for those with more time than I have :-)

    Taking out the hard coding of the hex and binary numbers wasn't too hard though, so here's my first pass at that (I may add octal later)(Update: Added octal - didn't want to do it until I tested it, and zentara is right, it was easy enough):