eduardo has asked for the wisdom of the Perl Monks concerning the following question:
anyone have any better ideas? i would love to see some other cool perlish ways of doing this...#!/usr/bin/perl -w use strict; while (<>) { my $temp = ''; print join ('', map { if ($_ eq $temp) { $temp = ''; } else { $temp = $_; } } split('', $_) ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: removing duplicate letters
by plaid (Chaplain) on Jun 18, 2000 at 23:50 UTC | |
by Ovid (Cardinal) on Jun 19, 2000 at 00:50 UTC | |
by takshaka (Friar) on Jun 19, 2000 at 01:53 UTC | |
by mdillon (Priest) on Jun 19, 2000 at 05:39 UTC | |
by eduardo (Curate) on Jun 19, 2000 at 00:01 UTC | |
|
Re: removing duplicate letters
by chromatic (Archbishop) on Jun 19, 2000 at 01:45 UTC | |
by Anonymous Monk on Jun 19, 2000 at 02:30 UTC | |
|
(jcwren) RE: removing duplicate letters
by jcwren (Prior) on Jun 18, 2000 at 23:53 UTC |