in reply to qw and its lovely magic

You see it a lot when you need a function that isn't exported by default. For example
use CGI qw/escape unescape/;
allows you to use the escape and unescape functions as if you had defined them in your namespace.
use strict; use CGI qw/escape unescape/; my $escval = escape('test script'); print "Escaped: $escval\n"; my $val = unescape($escval); print "Unescaped: $val\n";
Outputs
Escaped: test%20script Unescaped: test script

Replies are listed 'Best First'.
Re: Re: qw and its lovely magic
by Grygonos (Chaplain) on Jun 25, 2003 at 14:49 UTC
    Thank you guys and gals for such a thorough explanation of the many uses of qw.... Thanks for taking a simple question so seriously.