From: bagman on
I'm not that familiar with Perl but am trying to enter a couple of
<br> into a perl script. It needs to go where this appears.

if ($arg eq 'only') {
print <<END;

I want to enter a couple of line breaks before the routine ends.
I've tried to enter it after the { using <br><br> and "<br><br>";
I've tried to use it using print "<br><br>"; with no luck.

I've tried to enter it after the print command in various ways with no
luck. Can someone tell me the correct syntax to enter a couple of line
breaks in the above code? Thanks.
From: sreservoir on
bagman wrote:
> I'm not that familiar with Perl but am trying to enter a couple of
> <br> into a perl script. It needs to go where this appears.
>
> if ($arg eq 'only') {
> print <<END;
>
> I want to enter a couple of line breaks before the routine ends.
> I've tried to enter it after the { using <br><br> and "<br><br>";
> I've tried to use it using print "<br><br>"; with no luck.
>
> I've tried to enter it after the print command in various ways with no
> luck. Can someone tell me the correct syntax to enter a couple of line
> breaks in the above code? Thanks.

print "\n\n";

perhaps?

--

"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
From: Jim Gibson on
In article <aj1sf59htl6b9tnv5opvoqo5c03jkg51uc(a)4ax.com>, bagman
<elopppoer(a)yughi.net> wrote:

> I'm not that familiar with Perl but am trying to enter a couple of
> <br> into a perl script. It needs to go where this appears.
>
> if ($arg eq 'only') {
> print <<END;
>
> I want to enter a couple of line breaks before the routine ends.
> I've tried to enter it after the { using <br><br> and "<br><br>";
> I've tried to use it using print "<br><br>"; with no luck.
>
> I've tried to enter it after the print command in various ways with no
> luck. Can someone tell me the correct syntax to enter a couple of line
> breaks in the above code? Thanks.

The '<<END;' is a "here" document that generates a string starting with
the next line and continuing until an 'END' token appearing by itself
at the beginning of a line. It would have helped if you had shown us
the entire string or, better still, a complete program demonstrating
the problem.

You should be able to add anything to be printed verbatim anywhere
between the 'print <<END'; line and the terminating 'END' line:

if ($arg eq 'only') {
print <<END;
<br><br>
....whatever else needs to be printed...
END

}

--
Jim Gibson
From: Ben Morrow on

Quoth bagman <elopppoer(a)yughi.net>:
> I'm not that familiar with Perl but am trying to enter a couple of
> <br> into a perl script. It needs to go where this appears.

'<br>' is not valid Perl. I *suspect* you mean that you want to insert
the <br> into a HTML document the Perl program is supposed to print out,
but if so you need to be clear that is what you are doing. Getting
confused about which parts of the program are 'Perl code to be run' and
which parts are 'HTML data to be copied around' will make it impossible
for you to change anything sensibly.

> if ($arg eq 'only') {
> print <<END;
>
> I want to enter a couple of line breaks before the routine ends.
> I've tried to enter it after the { using <br><br> and "<br><br>";
> I've tried to use it using print "<br><br>"; with no luck.

Please post a *short* *complete* script we can all run that demonstrates
your problem. You may wish to read the Posting Guidelines.

Ben

From: Tad McClellan on
bagman <elopppoer(a)yughi.net> wrote:

> am trying to enter a couple of
><br> into a perl script.

print "<br><br";

> I want to enter a couple of line breaks

print "\n\n";


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"