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