Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: String or array?

by sschneid (Deacon)
on Sep 15, 2005 at 18:54 UTC ( [id://492381]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://492381]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-19 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found