Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Text::Autoformat... doesn't.

by converter (Priest)
on Oct 27, 2002 at 08:33 UTC ( #208320=note: print w/replies, xml ) Need Help??

in reply to Text::Autoformat... doesn't.

The first sub-section of the DESCRIPTION section of the Text::Autoformat man page should clear up any confusion about the type of input the module expects:

The fundamental task of the autoformat subroutine is to identify and rearrange independent paragraphs in a text. Paragraphs typically consist of a series of lines containing at least one non-whitespace character, followed by one or more lines containing only optional whitespace.

Given that you haven't altered $/, your input operator is reading only one line at a time. As grantm suggested above, you need to pass the entire input text, not one line at a time, otherwise &autoformat is operating against each input line without the context required to derive paragraph-related information.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://208320]
[LanX]: oh thank you! :)
[Eily]: partly because I read tsj as /t͡ʃ/, don't know if that's supposed to be the case
[LanX]: Yeah I think thats Dutch spelling rule
[erix]: but we don't sneeze any K's
[choroba]: we do
[Eily]: that was a sneeze overpowering a cough
[choroba]: Czechs sneeze "Hep-cheek"
vrk adds gingerbread cookies to the platter on the sideboard.
[erix]: I'll give that a try next time
vrk takes a cookie from the platter on the sideboard.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2017-04-24 15:44 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (442 votes). Check out past polls.