Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to hash without the hash- basic

by i5513 (Monk)
on Oct 26, 2011 at 14:00 UTC ( #933904=note: print w/ replies, xml ) Need Help??


in reply to How to hash without the hash- basic

Not a good solution, but .. are matching allowed?, if yes. It is not cheaper and not more effective, but is pure perl :P :

@array = qw(1 3 4 55 4 3 4 22 1 3 4 3 2 2 3 34); $cad=join (" ",@array); for (@array) { push @uniq, $_ if ($cad !~ /((\A| )($_)( |\Z)).*$_( |\Z)/); } print join (",",@uniq),"\n";


Comment on Re: How to hash without the hash- basic
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2015-07-08 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (98 votes), past polls