Take a string such as:
In C#: How do I add \"Quotes\" around string in a comma delimited list of strings?
and convert it to:
Solution in Perl:
my $input = 'In C#: How do I add "Quotes" around string in a comma delimited list of strings?'; my $length = 20; $input =~ s/[^a-z0-9]+/-/gi; $input =~ s/^(.{1,$length}).*/\L$1/; print "$input\n";
done.