As other people have suggested, you often should be scoping the string with my when you assign it. What that does is well-explained by Dominus in Coping with Scoping.print $str = <<SEP; This is a string $xyz SEP
In reply to Re (tilly) 1: line seperator
by tilly
in thread Assignment and printing at same time?
by mkirank
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |