Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^2: removing duplicate entries from an array

by neniro (Priest)
on Nov 07, 2005 at 22:17 UTC ( #506552=note: print w/replies, xml ) Need Help??

in reply to Re: removing duplicate entries from an array
in thread removing duplicate entries from an array

timtowtdi using Set::Scalar:
#!/usr/bin/perl use strict; use warnings; use Set::Scalar; use Data::Dumper; my @origin = (1, 2, 3, 2, 3, 4, 1, ); my $s = new Set::Scalar; $s->insert(@origin); my @unique = $s->elements; print Dumper \@unique;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://506552]
choroba waves is
[choroba]: 'Tyrol' =~ tr/Ty o/Pe/rd
choroba hates the CB and its space insertion
Eily wondered if the space was there for a reason
[Eily]: like "Replace the T, replace the y, skip one, replace the o"
[Discipulus]: it works anyway, good morning choroba

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2017-07-24 09:15 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (348 votes). Check out past polls.