- or download this
16:12 >perl -wE "my $string = 'abcde'; $_ = 42; say; $string =~ /(?{ s
+ay })/;"
42
...
16:12 >perl -v
This is perl 5, version 22, subversion 0 (v5.22.0) built for MSWin32-x
+64-multi-thread
- or download this
use strict;
use warnings;
...
$x = $_;
print "$_: ", $searches{$_} =~ $regex ? 'match' : 'no match', "\n"
+;
}
- or download this
my $regex = qr{ ^ \s* (??{ $_ }) \s* $ }x;