From perldoc perlop:
qq/STRING/ ""STRING"" A double-quoted, interpolated string. $_ .= qq (*** The previous line contains the naughty word "$1".\n) if /\b(tcl|java|python)\b/i; # :-) $baz = "\n"; # a one-character string i.e. qq is just like double quotes. qw/STRING/ Evaluates to a list of the words extracted out of STRING, using embedded whitespace as the word delimiters. It can be understood as being roughly equivalent to: split(' ', q/STRING/); the difference being that it generates a real list at compile time. So this expression: qw(foo bar baz) is semantically equivalent to the list: 'foo', 'bar', 'baz' Some frequently seen examples: use POSIX qw( setlocale localeconv ) @EXPORT = qw( foo bar baz ); A common mistake is to try to separate the words with comma or to put comments into a multi-line `qw'-string. For this reason, the `use warnings' pragma and the -w switch (that is, the `$^W' vari- able) produces warnings if the STRING contains the "," or the "#" character. i.e. qw takes a list of words that are whitespace separated and turns them into an array, split on the whitespace. On Tuesday, September 17, 2002, at 12:47 AM, Rum Pel wrote: > hello > > perl -e "print qq(@INC)" > prints the library paths. > Can somebody tell me what does "qq" do here? > > Also, what does "qw" do in the following statement? > > use HTTP::Request::Common qw(GET POST); > > > --rp > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > // George Schlossnagle // Principal Consultant // OmniTI, Inc http://www.omniti.com // (c) 240.460.5234 (e) [EMAIL PROTECTED] // 1024D/1100A5A0 1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 A5A0 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]