karlberry has asked for the wisdom of the Perl Monks concerning the following question:
my $str="foobar"; format threecharformat = ^<<~~ $str . my $fd = STDOUT; select((select($fd),$~ = "threecharformat")[0]); write $fd; # use that formatThe output is two lines:
foo barbut I want just one line: foobar. Is it possible?
I could find nothing in perlform or perlfaq* or online about controlling the behavior when the source word overflows the format. I tried to look at the source but am far too much of a novice at Perl internals to get anywhere. (I could not even discern where formats were executed, after KEY_format, etc., were parsed.)
In the actual application, the source text contains long urls, which I don't want to be broken. In my case, it is not a stopper that the result would not then match the format.
I yield to your wisdom. Thanks. --karl@freefriends.org
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: disabling forced line break with format fill mode and long source word (perlform Perl6::Form)
by Anonymous Monk on Mar 08, 2020 at 23:46 UTC |