Dear Perl Monks,
I am using Text::Autoformat for formatting.When i call, autoformat($rawtext, {left=>0, right=>60},it does the formatting but an additional new line and hypen are also getting created which
i dont want.can anyone please tell how to get rid of the newline.
my code
my $file = "/home/temp1/temp2/temp3/temp4/temp4/temp5/temp6/temp7/temp
+8/temp9.tcl in config.tcl";
my $rawtext = "File not found.setting default $file in config.tcl.";
autoformat($rawtext, {left=>0, right=>60});
output:
File not found.setting default /home/temp1/temp2/t-emp3/temp4/temp4/te
+mp5/temp6/temp7/temp8/temp-
9.tcl in config.tcl.
with the above output a newline is also added.
but actual output i need is:
File not found.setting default /home/temp1/temp2/temp3/temp4/temp4/tem
+p5/temp6/temp7/temp8/temp9.tcl in config.tcl.
no hypens & no newlines.
I have used dummy names and dummy code (almost similiar to my code)...
Thanks in advance
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.