Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to use sed, but more recently I've been using 'perl -pe' instead, which is a drop-in replacement for the basic 's//' use I typically make of sed. The main reason is that I've had some performance problems with sed, depending on which of the several sed variants is installed. Many of them seem to have small fixed buffers that really limit throughput when processing large (multi-gigabyte) files, and the performance ends up being really unpredictable, while Perl's regex engine is fairly good and similar across platforms. (Also, I'm trying to avoid having to maintain both POSIX-style and PCRE-style regex syntax in different scripts, but that may be a matter of preference.)


Good old Perl Pie!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: