ur_tr has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: -s option
by McDarren (Abbot) on Jan 26, 2006 at 09:00 UTC
Re: -s option
by davidrw (Prior) on Jan 26, 2006 at 14:07 UTC
    As stated in perldoc:/perlrun (well worth the read for great switches like -e, -n, -p, -a, and others), it provides some really basic parsing of command-line options.
    perl -sle 'print $foo' -- -foo=bar # prints: bar
    Another (and much more flexible) option for command-line option parsing is Getopt::Long.
Re: -s option
by chargrill (Parson) on Jan 26, 2006 at 09:04 UTC
    You know, I don't recall off the top of my head. But I can tell you when I'm curious about such matters, I generally consult perlrun.

    You may see if that helps you find an answer.

    $/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );