Double quotes use variable expansion. Single quotes are not
In a double-quoted string, you need to avoid certain characters so that they are not interpreted differently. You do not use single quotes (except for the backslash, if this is the trailing character in the string)
my $var1 = 'Hello'; my $var2 = "$var1"; my $var3 = '$var1'; print $var2; print "\n"; print $var3; print "\n";
This will lead to the conclusion
Hello $var1
Perl Monks has a pretty good explanation for this here.
Xetius Jun 03 '09 at 9:18 2009-06-03 09:18
source share