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$/}
| [reply] [d/l] |