Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: How do I remove the duplicates from the array?

by choroba (Abbot)
on Sep 26, 2013 at 07:30 UTC ( #1055793=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How do I remove the duplicates from the array?
in thread How do I remove the duplicates from the array?

Please, be more precise. Even if Perl can "do what you mean", sometimes you have to be careful.

@long = (1, 2, 3, 4, 5); @sparse = (1, , , 4, ); @short = (1, 4); print "Equals\n" if $#long == $#sparse; print "Shorter\n" if $#short == $#sparse;
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^3: How do I remove the duplicates from the array?
Download Code
Re^4: How do I remove the duplicates from the array?
by parv (Priest) on Sep 26, 2013 at 07:49 UTC

    Update: Never mind the below for farang had already showed that above.

    I /GUESS/ OP has a issue of keeping track of missing values and display of them. So, undef (ideally; else nothing, '') could be used for the missing values. Format the display with whitespace as needed.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-07-25 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (170 votes), past polls