- or download this
It is much better faster to do this in two steps:
...
s/^\s+//;
s/\s+$//;
}
- or download this
use Benchmark;
...
}
},
});
- or download this
Benchmark: timing 500000 iterations of one, two...
one: 11 secs (11.75 usr 0.00 sys = 11.75 cpu)
two: 8 secs ( 7.57 usr 0.00 sys = 7.57 cpu)