brackets remove whitespace code example
Example 1: Which method in an be used to remove any whitespace from both the beginning and the end of a string?
str = "hello "
print(str.trim())
Example 2: perl remove all whitespace
$str =~ s/^\s+//;
str = "hello "
print(str.trim())
$str =~ s/^\s+//;