for ($modified_scalar) { s/^\s+//; s/\s+$//; } [download]
In reply to I did it! by Skyhawlk in thread Compare file content with a variable content by Skyhawlk