in reply to Difference Of Two Strings
sub leftover { my ($full, $part) = @_; my %count; $count{$_}++ for split //, $full; for (split //, $part) { return undef if --$count{$_} < 0; } return join "", map { $_ x $count{$_} } keys %count; }
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Difference Of Two Strings
by YuckFoo (Abbot) on Nov 03, 2001 at 05:39 UTC | |
by merlyn (Sage) on Nov 03, 2001 at 22:58 UTC | |
by YuckFoo (Abbot) on Nov 07, 2001 at 04:03 UTC |