How big is your file, what machine?radar:~ datchley$ time grep "." myfile >/dev/null real 0m0.989s user 0m0.821s sys 0m0.078s radar:~ datchley$ time perl -ne '/./' myfile >/dev/null real 0m0.020s user 0m0.006s sys 0m0.013s
---
echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'
Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.
In reply to Re: Perl/grep speed comparison
by tuxz0r
in thread Perl/grep speed comparison
by Sixtease
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |