my $txt = 'hello world'; print "$txt\n"; $txt = 'oh noes'; # note, no "my" print "$txt\n";