Here Document in Perl PDF Print

Here-docs or Here Documents for dumping data that would normally be difficult to do otherwise - like when there's a bunch of escape chars required.

It can also be used for mass population of arrays (not shown), and should be noted that the Perl here-doc is based on the unix shell scripting method.  That's right, you can use almost the exact same syntax in a shell script.

Code:

my $scalar = "variables";
my $data = <<LINES;

A bunch of data that I'd rather not \ (escape)
is just one use for "here-docs" in Perl!
Good tool for quick-n-dirty XML or HTML
Here-docs will even expand a $scalar

LINES
print $data;


Returns:

A bunch of data that I'd rather not  (escape)
is just one use for "here-docs" in Perl!
Good tool for quick-n-dirty XML or HTML
Can also plug in a variables

# man perldata = has a very small amount of information about this feature.

 

 

 

 
Joomla SEF URLs by Artio
 
JOOMLA TEMPLATES Joomla Templates By JoomlaBear