Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate


Wednesday, August 1st, 2007 at 7:43:53pm UTC 

  1. -s   enables rudimentary switch parsing for switches on the command
  2.             line after the program name but before any filename arguments (or
  3.             before an argument of --).  Any switch found there is removed from
  4.             @ARGV and sets the corresponding variable in the Perl program.
  5.             The following program prints "1" if the program is invoked with a
  6.             -xyz switch, and "abc" if it is invoked with -xyz=abc.
  8.                 #!/usr/bin/perl -s
  9.                 if ($xyz) { print "$xyz\n" }
  11.             Do note that a switch like --help creates the variable ${-help},
  12.             which is not compliant with "strict refs".  Also, when using this
  13.             option on a script with warnings enabled you may get a lot of spuâ
  14.             rious "used only once" warnings.


Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)

Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus