: Michele Dondi wrote:
:
: >
: > My first comments, modulo the fact that I didn't even try (yet) to
: > understand what it does due to absymal lack of time, are:
: >
: > (i) it doesn't work, for the following meaning of "doesn't work": it
: > prints "J" and then exits!
:
: That's because you are on Win* are you? It will work when you
: change the 14 in the first line to 15.
Alternatively, you could tighten up the algorithm so there's room for code
to detect when it's running in Windows and adjust itself.
$r=$^O=~/MSWin32/?75:74;open STDIN,"<&DATA";{ #J~.> a>n~>>e~.......>r.
seek STDIN,$i||=50,0;$_=getc;/\./&&last;/\w| / #.u.t.^..oP..r.>h>a~.e..
&&print;$i+=($d=/~/?$r:/\^/?-$r:/>/?1:/</?-1:$d #.>s^~h<t< ..~. ...c.^..
?$d:1);redo}__END__ #....>>e>r^..>l^...>k^..
Or, more ambitiously, add path corrections to the befunge-like data that
will steer the "program address" back on course when run under Windows.