-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
I'm very fascinated by all the work that went into this project and I have written quite a bit of Perl code with few dependencies that I could use Perlito on.
One issue that I think might be easy to fix with much benefit, is that I often like using modifying substr expressions as it's often faster than regexes, but in the generated JS code, the string doesn't get modified.
Here are three ways to modify substrings.
my $s = 'hello';
# 0
substr $s, 0, 1, 'H';
# 1
substr($s, 0, 1) = 'G';
# 2
my $ref = \substr $s, 0, 1;
$$ref = 'F';Running any of these followed by say $s; should result in a modified string. Running with Perlito5 gives a compiler error in case[1] and results in output of unmodified hello in the other cases.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels