- or download this
C:\Users\Andy\Documents>perl test.pl
Length of string: 101000000
Time taken was 0 wallclock secs ( 0.17 usr 0.03 sys + 0.00 cusr
+ 0.00 csys =
...
Time taken was 1 wallclock secs ( 1.13 usr 0.03 sys + 0.00 cusr
+ 0.00 csys =
1.16 CPU) seconds
C:\Users\Andy\Documents>
- or download this
my $new_string = testing_string($string);
sub testing_string {
...
$content =~ s/a/b/sg;
return $content;
}
- or download this
# do stuff here
my %test_var;
...
# do some stuff here
$test_var{$string} =~ s/a/b/sg;
}