Perhaps if you put your code on your scratchpad? Then we could take a look at it.

I'll take a peek if you message me (or reply here) that you have put it there.


UPDATE
Heres my code which appears to work. Note that I have quoted the ENDHTML bits. Take a look at perlfaq4:
Check for these three things: There must be no space after the << part. There (probably) should be a semicolon at the end. You can't (easily) have any space in front of the tag


And the code:
use strict; use warnings; use vars qw($home_fax $Company $position $company_address1 $company_po +stal1 $company_phone $company_fax); $home_fax = "a"; $Company = "b"; $position = "c"; $company_address1 = "d"; $company_postal1 = "e"; $company_phone = "f"; $company_fax = "g"; section2(); sub section2 { print <<"ENDHTML"; one ENDHTML unless ($home_fax eq "") { print <<"ENDHTML"; two ENDHTML } print <<"ENDHTML"; three ENDHTML unless ($Company eq "") { print <<"ENDHTML"; four ENDHTML } unless ($position eq "") { print <<"ENDHTML"; five ENDHTML } unless ($company_address1 eq "") { print <<"ENDHTML"; six ENDHTML } unless ($company_postal1 eq "") { print <<"ENDHTML"; seven ENDHTML } unless ($company_phone eq "") { print <<"ENDHTML"; eight ENDHTML } unless ($company_fax eq "") { print <<"ENDHTML"; nine ENDHTML } print <<"ENDHTML"; ten ENDHTML }
Which prints:
C:\WINNT\PROFILES\simonp\DESKTOP>perl test.pl one two three four five six seven eight nine ten C:\WINNT\PROFILES\simonp\DESKTOP>
I hope that helps :).

In reply to Re: Unmatched right curly bracket ... by simon.proctor
in thread Unmatched right curly bracket ... by Gerard

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.