>>>> $string =~ s/\s//g; >>> >>> The above line deletes all of the spaces in $string. Is that what you want >>> to do? >> >> All fixed up except for this. How can I remove only the spaces at the >> end of $var1 and $var2 if they exist? > > Anchor your substitution regular expression to the end of the string: > > $var1 =~ s/\s+$//; > > This will delete any whitespace characters at the end of $var1.
That worked great, thank you Jim. - Grant -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/