Question is how to embed text in a perl program instead of reading it from a
file
or initializing the text in a string variable.

I have done the following but when I execute the script, I get no output.

Is there an issue I am overlooking ?

Another question is whether perl will replace the variable defined in
the embedded text with actual values ?

Thanks ..

#!/usr/bin/perl
my $one = "onex";
my $two = "twox";
while (<MY_BLOCK>)
{
 print $_;
}
exit;

__MY_BLOCK__
once
upon
there was a person who was
very fond of $one and $two

Reply via email to