in reply to Re: why qw() rather than ()
in thread why qw() rather than ()

Ok ! thanks for the answer ! I've totally miss the separator problem !

So, if I've understood

use Digest::MD5  qw(md5 md5_hex md5_base64);

is exactly the same as

use Digest::MD5(md5,md5_hex,md5_base64);


Replies are listed 'Best First'.
Re: Re: Re: why qw() rather than ()
by jeroenes (Priest) on Jan 22, 2001 at 18:50 UTC
    Well, if you add a space after MD5 ;-).

    But that's not the whole thing. From the manpage:

    =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.
    So, there is a difference, although small.

    Jeroen
    "We are not alone"(FZ)

Re tilly (3): why qw() rather than ()
by tilly (Archbishop) on Jan 23, 2001 at 06:59 UTC
    No.

    Using strict would point out the error for you.