in reply to Re: String or array?
in thread String or array?

Yeah... the problem is (maybe I should have specified) that what's put in $user->{'host'} isn't defined by me explicitly -- depending on what the query returns, it's either a string or an array. I need to act on what's given.

-s.

Replies are listed 'Best First'.
Re^3: String or array?
by ikegami (Patriarch) on Sep 15, 2005 at 18:55 UTC

    I figured out what you meant just before you posted. I was about to update my post with the following when your reply appeared:

    my ($user); $user->{'host'} = '*'; $user->{'host'} = [ $user->{'host'} ] if not ref $user->{'host'};

    ref

      Worked. Thanks yo.

      -s.