On Jan 6, 2008 7:48 PM, Ryan <[EMAIL PROTECTED]> wrote:
> I have a small piece of a program which loops through lines of data,
> using the <while> construct, one line at a time, and prints different
> pre-defined sentences, contingent upon what is found in each line of
> data.   The data are in the program file, in a __DATA__ section.  I use
> the simple print command.
>
> The output looks like this:
>
> This is the first sentence.
> This is the next sentence.
> And this is the third one.
> etc.
>
> I'd like the output to look like this:
>
>
> This is the first sentence.  This is the next sentence.  And this is the
> third one.  etc.
>
> Any suggestions how to accomplish this?
>
> Thanks.
>
> --Chris Ryan

Use chomp() to remove the "\n" on the end of each sentence.  Remember
to output at "\n" at the end.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to