Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Re: trivial wrapping

by BrowserUk (Patriarch)
on Nov 18, 2002 at 14:52 UTC ( [id://213758]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: trivial wrapping
in thread trivial wrapping

Now show me a FORMAT that will wrap two strings to 60 wide and interleave them as requested by the OP and I'll buy you a coffee next time I see you:)


Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.

Replies are listed 'Best First'.
Re: Re: Re: Re: trivial wrapping
by GhodMode (Pilgrim) on Nov 18, 2002 at 17:20 UTC

    I like strong coffee, no cream, lotsa sugar :) ...

    format FILE = ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $var1 ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $var2 ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $var3 ------------------------------------------------------------ ------------------------------------------------------------ . $var1 = "11111111111111111111". "11111111111111111111". "11111111111111111111". "11111111111111111111". "11111111111111111111". "11111111111111111111". "11111111111111111111". "11111111111111111111". "11111111111111111111"; $var2 = "22222222222222222222". "22222222222222222222". "22222222222222222222". "22222222222222222222". "22222222222222222222". "22222222222222222222". "22222222222222222222". "22222222222222222222". "22222222222222222222"; $var3 = "33333333333333333333". "33333333333333333333". "33333333333333333333". "33333333333333333333". "33333333333333333333". "33333333333333333333". "33333333333333333333". "33333333333333333333". "33333333333333333333"; open (FILE, "> file.txt") or die "Could not open file\n$!\n"; while ( ($var1 ne "") and ($var2 ne "") and ($var3 ne "") ){ write FILE;

    It's a little more complex, but I still like the format better :)
    Here's the output...
    cat file.txt 111111111111111111111111111111111111111111111111111111111111 222222222222222222222222222222222222222222222222222222222222 333333333333333333333333333333333333333333333333333333333333 ------------------------------------------------------------ ------------------------------------------------------------ 111111111111111111111111111111111111111111111111111111111111 222222222222222222222222222222222222222222222222222222222222 333333333333333333333333333333333333333333333333333333333333 ------------------------------------------------------------ ------------------------------------------------------------ 111111111111111111111111111111111111111111111111111111111111 222222222222222222222222222222222222222222222222222222222222 333333333333333333333333333333333333333333333333333333333333 ------------------------------------------------------------ ------------------------------------------------------------ 111111111111111111111111111111111111111111111111111111111111 222222222222222222222222222222222222222222222222222222222222 333333333333333333333333333333333333333333333333333333333333 ------------------------------------------------------------ ------------------------------------------------------------ 1111111111111111111111111111111111111111 2222222222222222222222222222222222222222 3333333333333333333333333333333333333333 ------------------------------------------------------------ ------------------------------------------------------------

    Invulnerable. Unlimited XP. Unlimited Votes. I must be...
            GhodMode

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://213758]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-24 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found