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 \'
I suggest that you make use of the Text::Trim module, which provides ltrim, rtrim, and trim, all of which will trim the parameters passed, or $_ if you give no parameters. It's not a core module so it may need installing
ltrim
rtrim
trim
$_