print <<"HEREDOC" =~ s/^\s+//gmr; # <- works your text goes here HEREDOC __END__ your text goes here