use strict; use warnings; use Benchmark 'timethis'; my $s = do { local $/; }; $s x= 10_000; timethis -5, sub { my @a = split /^(?=>>> )/m, $s; return }, $^V; __DATA__ >>> prd1701 Filesystem Size Used Avail Use% Mounted on /workspace 3.9T 887G 3.0T 13% /workspace/data >>> prd1702 Filesystem Size Used Avail Use% Mounted on /workspace 3.9T 746G 3.1T 23% /workspace/data >>> prd1703 Filesystem Size Used Avail Use% Mounted on /workspace 3.9T 687G 3.2T 18% /workspace/data