|
|
Joined: Dec 1999
Posts: 30,867
Master Elite Member
|
Trim A String (Remove Leading and Trailing Whitespace)sub StrTrim {
my $Str = shift;
$Str =~ s/^\s+//; # Remove leading whitespace
$Str =~ s/\s+$//; # Remove trailing whitespace
return $Str;
}
|
|
|
|
Entire Thread
|
StrTrim() - Trim A String (Remove Leading and Trailing Whitespace)
|
Russ
|
11/25/08 02:23 PM
|
|
|
|