in reply to Re: Compress me
in thread Compress me

Hi Ken,
Your code change worked great . I did notice something odd though .
The closing bracket on the qq can not have any spaces between it or the last character or the space is translated to the next line. I do not quite understand why?
Thanks again Ken

Replies are listed 'Best First'.
Re^3: Compress me
by kcott (Archbishop) on Nov 07, 2010 at 19:05 UTC

    That's sort of what my "... you won't need the terminal newline ..." was referring to.

    When you have a quoted string that extends over more than one line, you have embedded newlines - these are the ones you typed at the keyboard (not explicit \n characters).

    Your original last two lines:

    <td> <table><tr><td><br>\n";

    are actually:

    <td>{embedded newline} <table><tr><td><br>\n";

    You could have achieved the same output with:

    <td> <table><tr><td><br> ";

    which is actually:

    <td>{embedded newline} <table><tr><td><br>{embedded newline} ";

    Although I used ellipses, what you see on the screen:

    <table ...> ... };

    is actually:

    <table ...>{embedded newline} ...{embedded newline} };

    I hope that explains it. If not, please show an example of exact output.

    -- Ken

      Hello Ken,
      I understand what you are saying now. my mistake was
      print $out qq{ <FORM METHOD = post ACTION = $script_url name=login> <table border=0 cellpadding=4 cellspacing=4 width=470> <tr> <td> <table><tr><td>Category<br> } <----My mistake should of been print $out qq{ <FORM METHOD = post ACTION = $script_url name=login> <table border=0 cellpadding=4 cellspacing=4 width=470> <tr> <td> <table><tr><td>Category<br> } <----The fix it forced a new line so the line below it was not on the same line as <table><tr><td>Category<br>