I like to try and break my codelines into lengths long enough so I don't have to scroll horizontally. In most Perl situations, it's easy enough, just break the code statements into nice sets of short lines. However, I occaisionally run into a situation where this isn't possible. For instance:
In a Tk program, I'm sending some text to a label. The long statement might be something like: (The following is all one line, the pre tags are on purpose :-) ).
$game{'board'}{'stat'} = "$playerin submits $game{'board'}{'proposedwo
+rduser'} $game{'board'}{'proposedscore'} points";
Now if I break this, the hidden newlines will be picked up by the Tk::Label widget, which I don't want.
So is it possible to put some kind of slash at the break points to indicate to ignore the newline? It really isn't a major
problem for me, I was just wondering if there is a method which dosn't involve too much extra work.
I'm not really a human, but I play one on earth.
flash japh
Edit by tye, replace PRE with CODE
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.