Acme-Addslashes
view release on metacpan or search on metacpan
lib/Acme/Addslashes.pm view on Meta::CPAN
Letters, numbers, punctuation, whitespace, unicode symbols.
You name it, this function can add a slash to it.
Will return you a C<utf8> encoded string containing your original string, but with
enough slashes added to make Freddy Krueger jealous.
=cut
# The addslashes function. It is documented above. -- JAITKEN
sub addslashes {
# Get the arguments passed to the function using the shift command -- JAITKEN
my $unsafe_string = shift;
# Split the string into letters - just like explode in PHP. Or maybe str_split
# I can't remember which one is which -- JAITKEN
my @unsafe_array = split('', $unsafe_string);
# Add slashes to every character thanks to unicode.
# This is complex magic -- JAITKEN
# I think these slashes could be longer -- SKINGTON
( run in 0.226 second using v1.01-cache-2.11-cpan-a5abf4f5562 )