To display a variable, you can use the print command. The
arguments supplied to a print command will output when the program
executes. If a variable name appears in an argument to a print
statement in double quotes, the contents of that variable will be
displayed. Arguments supplied to print in single quotes do not show
the contents of the variable. For example:
my $count = 10;
$count = $count + 30;
print "Count is $count\n";
print 'Count is not $count\n';
would output
Count is 40
Count is not $count