Debian Codegraph @

examples/sed_VS_perl

raw
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use lib qw( . lib ../lib );
7 use Benchmark::Apps;
8
9 my $commands = {
10 sed=> 'echo "1 22 333 4444" | sed -e "s/[1-9]\+/N/g"',
11 perl=> 'echo "1 22 333 4444" | perl -p -e "s/[1-9]+/N/g;"',
12 };
13
14 my $results = Benchmark::Apps::run($commands);