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; }
- Landlords production is only eaten by landlords...
- Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established
In Section
Cool Uses for Perl