File: sed_VS_perl

package info (click to toggle)
libbenchmark-apps-perl 0.05-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 148 kB
  • sloc: perl: 88; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 283 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

use warnings;
use strict;

use lib qw( . lib ../lib );
use Benchmark::Apps;

my $commands = {
   sed=> 'echo "1 22 333 4444" | sed -e "s/[1-9]\+/N/g"',
   perl=> 'echo "1 22 333 4444" | perl -p -e "s/[1-9]+/N/g;"',
};

my $results = Benchmark::Apps::run($commands);