in reply to Re: Re: Difference Of Two Strings
in thread Difference Of Two Strings
sub leftover { my ($full, $part) = @_; my @count; $count[ord $1]++ while $full =~ /(\w)/g; while ($part =~ /(\w)/g) { return undef if --$count[ord $1] < 0; } my $return; $count[$_] and $return .= chr($_) x $count[$_] for 0..$#count; $return; }
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Difference Of Two Strings
by YuckFoo (Abbot) on Nov 07, 2001 at 04:03 UTC |