in reply to Combine multiple lines into one line

You can convert newlines to spaces with: $var =~ tr/\n/ /; or, maybe better: $var = join ' ', split ' ', $var; That split is the magical one that trims all whitespace.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Combine multiple lines into one line
by hyliau (Initiate) on Jun 23, 2003 at 06:54 UTC
    hi Zaxo, Does your suggested syntax can be used in Shell script? or is a pure perl script. Can you guide me on how to test this? Maybe a complete script if possible. Hope to hear you soon. Thanks. rgds, hyliau