my $var = "foo"; print 'Variable name is $var'; # prints: Variable name is $var print "Variable is $var"; # prints: Variable is foo #### my $var = 10; print "There are $varapples"; # error: the compiler cannot know where the variable name ends print "There are $var apples"; # OK: the space after the variable makes it possible to know that the variable ends just there print "There are ${var}apples"; # prints: there are 10apples. # A space is missing, but the print statement works, because the compiler can know # where the variable name ends thanks to the curlies;