in reply to Re: Re: List of substrings
in thread List of substrings

That's a good point. I was going to use the map to build a substring array, but changed my strategy halfway through and didn't clean up. Here is a corrected version:
use strict; my $string = shift; my %seen; foreach (0..(length $string) - 1) { my $temp = $string; substr $temp, $_, 1, ""; print "$temp\n" unless $seen{$temp}++; }
Thanks!

-Mark