#!/usr/bin/perl use strict; use warnings; my $VARIABLE = "tom and jerry"; # variable substitution and escape character substitution print "Double Quote: $VARIABLE\n"; print ".......................\n"; # variable substitution is attempted on $ and @ print " \$ \@ % \n"; print ".......................\n"; # other escape sequences valid within double quoted strings print "\tTabs, hex: \x48\x49 octal: \110\111\041\n"; print ".......................\n"; # \U \L \E print "\Uupper case here\E \LLOWER CASE HERE\E Mixed Case Here\n"; print ".......................\n"; # \U \L \E also work on variables my $VARIABLE = "hello world in uppercase"; print "\U$VARIABLE\E\n"; print ".......................\n"; #If you want to adjoin a variable with further text without intervening space use curly braces print "${VARIABLE}S\n"; print ".......................\n"; # single quote and backslash can be escaped within single quotes print 'print a single quote \' and backslash \\'; print "\n.......................\n"; # variable substitution and the other escape sequences don't work in single quote strings print 'Single Quote: $VARIABLE\n'; print ".......................\n";