- or download this
$str = "===test===";
if( $str =~ /(\w+)/ ) {
...
__END__
[===test===] (test)
[===temp===] (test)
- or download this
use strict;
use Benchmark qw< cmpthese >;
...
Rate copy substr
copy 38.6/s -- -100%
substr 382480/s 991549% --
- or download this
if( $doc =~ s/^\s*(['"])// ) {
parse_string($1);