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

And if you are using a newer Perl they sometimes add features that aren't enabled by default unless you opt-in with a 'use v5.38' style declaration.

If you want those features on in your one-liner you can use -E instead of -e

    perl -pi -E '...' file.txt
(I used to need this long ago when I wanted to use the then-new "say" in my one-liners)


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: