in reply to Interpolation question

When interpolating a variable in quotes, Perl cannot always tell what the variable is. A variable named $_new is perfectly legal. Wrap the actual variable name in curly braces '{}' to let Perl know what variable you are referring to.
print DESTINATION "old: ${_}new: $line\n";
Otherwise, you could wind up with problems like this:
my $a = 1; my $ab = 1; my $abc = 1; my $abcd = 1; # what do we want to print? print "$abcd";

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.