fglock / Perlito

"Perlito" Perl programming language compiler
http://fglock.github.io/Perlito/
Other
414 stars 47 forks source link

s/// does not return the replacements' count #28

Closed shlomif closed 9 years ago

shlomif commented 9 years ago

This perl program:

#!/usr/bin/perl

use strict;
use warnings;

my $x = "130";

if ($x !~ s/\A=//)
{
    print "Succeeded.\n";
}
else
{
    print "Failed!\n";
}

is successful when being compiled and ran by /usr/bin/perl, but fails with Perlito:

shlomif@telaviv1:~/Download/unpack/perl/Perlito/Perlito$ perl perlito5.pl -Cjs -I src5/lib test1.pl > ~/n.js
shlomif@telaviv1:~/Download/unpack/perl/Perlito/Perlito$ node ~/n.js
Failed!

This is the latest obstacle with the translation of Games-Solitaire-Verify to JS.

shlomif commented 9 years ago

Fixed in commit https://github.com/shlomif/Perlito/commit/e4bb6062bf148b40277d8c73abab0923001e8a8d

fglock commented 9 years ago

thanks!

2014-12-08 20:32 GMT+01:00 Shlomi Fish notifications@github.com:

Fixed in commit shlomif@e4bb606 https://github.com/shlomif/Perlito/commit/e4bb6062bf148b40277d8c73abab0923001e8a8d

— Reply to this email directly or view it on GitHub https://github.com/fglock/Perlito/issues/28#issuecomment-66172063.