nr0mx has asked for the wisdom of the Perl Monks concerning the following question:
#!/bin/env perl -w use strict; my $cookie="Climb the mountains\nand get their good tidings.\nNature's + peace will flow into you\nas sunshine flows into trees.\n"; my $author="-John Muir\n"; $: = "- "; format STDOUT = @||||||||||||||||||||||||||||||||||||||||||||||||| "------------------------------------------------" ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $cookie @|||||||||||||||||||||||||||||||||||||||||||| $author @||||||||||||||||||||||||||||||||||||||||||||||||| "------------------------------------------------" . write STDOUT;
In the below fragment, the output comes out like this --
I would like it to be this -------------------------------------------------- Climb the mountains and get their good tidings. Nature's peace will flow into you as sunshine flows into trees. -John Muir ------------------------------------------------
------------------------------------------------ Climb the mountains and get their good tidings. Nature's peace will flow into you as sunshine flows into trees. -John Muir ------------------------------------------------
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multi-line Format problem
by BrowserUk (Patriarch) on Nov 08, 2003 at 18:15 UTC | |
by nr0mx (Scribe) on Nov 09, 2003 at 03:08 UTC | |
|
Re: Multi-line Format problem
by TheDamian (Vicar) on Nov 08, 2003 at 22:30 UTC |