the functionality of 25,000 lines of BASIC can be done in what, about 7 lines of Perl?

Depends on the dialect of BASIC and also on exactly what sort of stuff the code is doing. Some things (e.g., simple (non-regex) string manipulation) many dialects of BASIC are pretty good at, and you might find 25000 lines of BASIC coming to 20000 lines or so of Perl. On the other hand, arrays in BASIC are fairly primitive, to say nothing of more complex data structures, so if the problem that the code is solving maps well onto objects or hashes you'll see a much more substantial reduction. Some dialects of BASIC make good use of subroutines (e.g., QBasic); others (e.g., most line-number BASICs) don't. In the former case some stuff may translate fairly well. In the latter case, you're going to end up with some *really* messy Perl code if the translation isn't done by a human.


for(unpack("C*",'GGGG?GGGG?O__\?WccW?{GCw?Wcc{?Wcc~?Wcc{?~cc' .'W?')){$j=$_-63;++$a;for$p(0..7){$h[$p][$a]=$j%2;$j/=2}}for$ p(0..7){for$a(1..45){$_=($h[$p-1][$a])?'#':' ';print}print$/}

In reply to Re: Conversion Utilities by jonadab
in thread Conversion Utilities by Yostsw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.