mature, powerful Perl library to support text/string operation ?
Posted
by
user534009
on Stack Overflow
See other posts from Stack Overflow
or by user534009
Published on 2010-12-22T02:43:21Z
Indexed on
2010/12/22
2:54 UTC
Read the original article
Hit count: 162
perl
Do we have a mature, powerful Perl library to support text/string operation ? for example, if I need to trim a string, I need to write a function like below.
Then question is, do we have an existing API so that I can import and call it ? just like StringUtils.trim(s) in Apache Common Lang.
Thanks.
sub trim($) {
my $string = shift;
$string =~ s/^\s+//;
$string =~ s/\s+$//;
return $string;
}
© Stack Overflow or respective owner