in reply to attempting to achieve something
Not much of a communicator are we?
use strict; use warnings; use feature 'say'; sub mixedregex { my $foo = shift; say length $foo; $foo =~ s{\0([0-7]{3})}{chr oct $1}eg; say length $foo; return $foo; } say mixedregex("bar"."\0"."123"); __END__
$ perl 11142131.pl 7 4 barS
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: attempting to achieve something (escaping rules)
by LanX (Saint) on Mar 16, 2022 at 15:06 UTC |