in reply to Best Practice: How do I pass option parameters to functions?

Hi, may be it is not realy important but as I know... perl -w == use warnings; so it's looks like duplication of commands.

Replies are listed 'Best First'.
Re^2: Best Practice: How do I pass option parameters to functions? (warnings)
by toolic (Bishop) on Oct 29, 2013 at 17:00 UTC
    There is a subtle difference, from warnings:
    The warnings pragma is a replacement for the command line flag -w , but the pragma is limited to the enclosing block, while the flag is global.
      Thanks useful info for me.
        "Thanks useful info for me."

        Just to add a little additional info, you'll find '-w' documented in perlrun, with links to further information, and this text:

        "... normally, the lexically scoped use warnings pragma is preferred."

        -- Ken

      Just the header I've copy/pasted into my scripts ever since I started using perl. I'd thought about changing it, but, quite honestly, I'd completely forgotten about it when posting the question. Thanks for the clarification of the differences, though!