#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my @data = qw( 7 8 9); my $dataref = \@data; #create reference to data array my $string = 'this is string'; print Dumper \@data; #dump using reference to @data =PRINTS $VAR1 = [ '7', '8', '9' ]; =cut print Dumper $dataref; #dump using scalar reference =PRINTS $VAR1 = [ '7', '8', '9' ]; =cut print Dumper @data; =PRINTS $VAR1 = '7'; $VAR2 = '8'; $VAR3 = '9'; =cut print Dumper $string; =PRINTS $VAR1 = 'this is string'; =cut print Dumper \$string; =PRINTS $VAR1 = \'this is string'; =cut __END__ I used a feature of Perl called perlpod - the "Plain Old Documentation" commands to interleave multi-line printouts into the code. That is not what this is normally used for, but you will sometimes see this technique on PM as a way to make the code and the printout all "one Perl file" that can be executed.