in reply to use strict and -s
And if you really don't know which variables might be initialized:
perl toto -var=2where toto is:
#!/usr/bin/perl -ws use strict; { # you can use -s defined variables here no strict 'vars'; print $var; }
Just note that generally -s and use strict; don't go well together. -s should really be used only for throw-away scripts, if not just deprecated, while use strict would be used for everything else. If you use strict you should also use "clean" alternative to -s such as one of the various Getopt::* modules.
|
|---|