Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Conglomerate of arrays with no duplicates

by ysth (Canon)
on Feb 01, 2004 at 09:04 UTC ( #325667=note: print w/replies, xml ) Need Help??


in reply to Conglomerate of arrays with no duplicates

I can't resist the opportunity to post an Abigailish solution:
$" = ','; $\ = "\n"; print for <{@products},@{[map "{@$_}", values %options]}>;

Replies are listed 'Best First'.
Re: Re: Conglomerate of arrays with no duplicates
by saberworks (Curate) on Feb 01, 2004 at 09:35 UTC
    Why does this script break if I change $" back to a space?
      For two reasons. It produces , within {} that must stay that way, and glob("foo bar") produces "foo","bar"; I don't know if there's a way to escape that space. I meant to put in a post-process y/,/ / but forgot.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2020-05-30 19:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?