Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Stable mixing of 2 arrays into a 3rd

by Prior Nacre V (Hermit)
on Oct 02, 2004 at 03:30 UTC ( #395813=note: print w/replies, xml ) Need Help??


in reply to Stable mixing of 2 arrays into a 3rd

All exceptions occur when T2/7 is output before T1/7.

You are checking that @t1 is not empty, but not @t2.

Changing the final ternary operator expression to : @t2 ? \@t2 : \@t1 fixes this.

Regards,

PN5

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2022-05-22 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?