Mar 25, 2008, 4:42 PM
Post #1 of 5
Add whitespace Beggining and End
I am trying to work out how to add a whitespace character to the begging and the end of a predefined string variable. The string variable can vary in length depending on the the user input.
I use the following to get user input and was wondering if I can add whitespace to the begging or the or the end at the same time or add the whitespace latter?
$Input = <STDIN>;
For example if the user enters "21" i actually want this to be stored as " 21 "