in reply to Re: = for lists and hashes?
in thread = for lists and hashes?

just for completeness: you can also say...
@myArray = ('common Value1', 'common Value2', ) unless scalar @myArray;

NOTE: This type of solution breaks down if the user sets @myArray (or %myHash) to an empty array in their conf file (but your existing system of setting scalars breaks down the same way if they have $foo = 0; in their conf file)

Replies are listed 'Best First'.
Re: Re: Re: = for lists and hashes?
by skazat (Chaplain) on Mar 20, 2002 at 22:58 UTC

    and this will work great for arrays!

    Right now, I can't think of a reason we'd be creating empty arrays... yet ;)

    Thanks!

     

    -justin simoni
    !skazat!