Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: return Both ARRAY and SCALAR

by Mutant (Priest)
on May 01, 2009 at 13:34 UTC ( #761291=note: print w/ replies, xml ) Need Help??

in reply to return Both ARRAY and SCALAR

Instead of doing what you're doing, you could just store everything in an array. Then for fields you know have only one value, just do:

my ($field) = $parser->get_values();
Not perfect, but probably cleaner than the approach you're trying to take. (Whether it's useful or not will depend on exactly how you're using this data, which you haven't explained).

Comment on Re: return Both ARRAY and SCALAR
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2015-11-27 19:08 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls