Thx, but no it won't.
This is how I expect such a scalar (or sub) to work:
1. Say I print a 5 (normal) chars string, than the desired scalar will have a increase in value of 5.
2. when in the beginning of a line it will be zero.
3. after a print of \n or \r, reset to zero.
4. after a print of \t, increase value to the next multiple of 8.
5. after a print of \b, decrease value by 1.
6. after a print of \a, no change in value.
7. modulus: every time it gets over 80 it is reduced by 80 (after 80 chars there's a new line).
Probably some other rules too.
I can figure these out, so I can write it (probably),
but I find it hard to believe this doesn't already exists.
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||