Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have tried this on several environments and I keep getting the same mangled results:
my $font = Text::FIGlet->new(-f=>"block", -d=>"/usr/share/figlet"); print $font->figify(-A=>"Hi");
Results:
_| _| _| _| _| _|_|_|_| _| _| _| _| +_| _| _|

Elsewhere:

figlet -f block Hi _| _| _| _| _| _|_|_|_| _| _| _| _| _| _| _|

Any ideas? I am stumped.

Replies are listed 'Best First'.
Re: Is Text::FIGlet broken?
by MidLifeXis (Monsignor) on Jun 25, 2015 at 17:54 UTC

    figify appears to return an array of results in list context (which print provides). Try print scalar $font... or print join($delim, $font...) instead.

    You could see this with...

    ... { my @lines = $font->figify...; my $lines = $font->figify...; use DDP; p @lines; p $lines; } ...

    at the appropriate place in your code.

    --MidLifeXis

      Thank you! My brain was not reaching into that zone. :)