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


in reply to Uncommon* but Useful Perl Command Line Options for One-liners

Sol-Invictus++!

However, as this is posted as a tutorial (and should consequently attract a lot of not-so-experienced PMs), and since perl is cross-platform, I suggest you either:

1) Add "(for *nix users only)" to your title;

2) Include a preamble about different quoting systems for one-liners on different OSs; or:

3) Point non_*nix users to perlfaq3 "Why don't perl one-liners work on my DOS/Mac/VMS system?"

dave

  • Comment on Re: Uncommon but Useful Perl Command Line Options

Replies are listed 'Best First'.
Re: Re: Uncommon but Useful Perl Command Line Options
by Sol-Invictus (Scribe) on Jan 28, 2004 at 21:53 UTC
    fair points - note however I wrote and tested this on a Mac :).

      Okay. But your examples don't work on Windoze.

      Basic advice to Win users:

      Change " to ' # Double quotes to single quotes

      dave

      Update - Ooops: Of course, I wrote exactly the opposite of what I meant:

      Change ' to " # Single quotes to double quotes

      dave

        Tis done - I clarified things a tad though I did this before reading your posting, thanks for the ehads up :)