Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: A BASIC interpreter to run StarTrekby cavac (Parson) |
on Aug 11, 2021 at 14:03 UTC ( [id://11135787]=note: print w/replies, xml ) | Need Help?? |
Cool! A few things: Seems you developed this on Windows. Other OS are case sensitive regarding the filesystem, so the correct filename to save the BASIC program would is StarTrek.bas (note the uppercase letters). Another thing: Perl uses "native" line endings by default. I had to convert the bas file to Unix line endings for the interpreter to work for the first test. Here's a simple patch that should make this work on Linux and possibly also on Mac:
perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
In Section
Cool Uses for Perl
|
|