Scripting >> Perl >> How to remove trailing blanks from a string

$string =~ s/ *$//;