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

Re: EasterRock: your custom ascii art maker

by chanio (Priest)
on Oct 15, 2007 at 03:59 UTC ( #644832=note: print w/ replies, xml ) Need Help??


in reply to EasterRock: your custom ascii art maker

Very clear and simple!

Nice job!

You should add this to round it up...What if the text file is shorter than what you need to fill the image with? (just fill the rest with '=' or whatever you prefer)======

===============================================================

sub getLine { $_textBuffer =~ m/^(.{$_rockWidth})(.*)$/; $_textBuffer = $2; my $rtn = $1; $_textBuffer.= '=' x ($_rockWidth - length($_textBuffer)) if (leng +th($_textBuffer) < $_rockWidth); ## JUST IN CASE... return $rtn; }


Comment on Re: EasterRock: your custom ascii art maker
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-07-28 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (193 votes), past polls