DamnDirtyApe has asked for the wisdom of the Perl Monks concerning the following question:

Is it possible for qw() to span multiple lines? Something like:
use vars qw( $var1 $var2 $var3 $var4 $var5 $var6 $var7 $var8 $var9 $var0 ) ;
And, if not, what do people usually find to be the most ( elegant | efficient | Perlish ) workarounds? Thanks for your help. My apologies in advance if this closely parallels a previous thread; I couldn't find mention of this with a search.
_______________
D a m n D i r t y A p e
Home Node | Email

Replies are listed 'Best First'.
Re: Can qw() span lines?
by tadman (Prior) on May 27, 2002 at 06:53 UTC
    use vars split(' ', <<'END'); $var1 $var2 $var3 $var4 $var5 $var6 $var7 $var8 $var9 $var0 END
    That's a joke, by the way.

    As a note, maybe what you want to do is:
    our ($var1, $var2, $var3, ...);
    This 'use vars' stuff is for older Perl 5 code.
Re: Can qw() span lines?
by DamnDirtyApe (Curate) on May 27, 2002 at 06:23 UTC
    Well, it would seem the answer to my question is 'Yes, just like you typed, dumbass.' I was having problems that I thought were this, but now I see were obviously not. My bad. Sorry.
    _______________
    D a m n D i r t y A p e
    Home Node | Email
Re: Can qw() span lines?
by Anonymous Monk on May 27, 2002 at 06:12 UTC
    What happened when you tried it?