http://www.perlmonks.org?node_id=1154218


in reply to about perl -s switch -- usable? evil? unneeded?

If you want an answer that like a one-liner is short, dirty, simple, and to the point: if you want things clean and maintainable don't write them as one-liners.

There is Getopt::Long if you want a clean, maintainable options mechanism. You can, although it's generally not very advisable, roll your own complex @ARGV handling. You could write some quite simple @ARGV handling, but the -s switch does that much for you. So use -s where you want very simple argument handling for a quick and dirty solution like a one-liner, and use a well-understood and widely used option handling mechanism like Getopt::Long when you are writing something to be reused and maintained.