If I declared a variable $myString with the value \'3 \' (notice the white space). Is there any function to remove the white space for the return v
$myString
\'3 \'
sub trim { my $str = $_[0]; $str=~s/^\s+|\s+$//g; return $str; } print trim(" 4 ");