in reply to Re: Re: why qw() rather than ()
in thread why qw() rather than ()
But that's not the whole thing. From the manpage:
So, there is a difference, although small.=item qw/STRING/ Returns a list of the words extracted out of STRING, using embedded whitespace as the word delimiters. It is exactly equivalent to split(' ', q/STRING/); 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 C<-w> switch produce warnings if the STRING contains the "," or the "#" character.
Jeroen
"We are not alone"(FZ)
|
|---|