dusk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use Text::Bastardize; my $line = <>; $_ = $line; my $latin = Text::Bastardize->new(); $latin->charge($_); print $latin->pig(),"\n"
That code works; but outputs with an appended newline.
When I use:
#!/usr/bin/perl -w use strict; use Text::Bastardize; my $line = <>; $_ = chomp($line); my $latin = Text::Bastardize->new(); $latin->charge($_); print $latin->pig(),"\n"
It doesn't output anything. I do not know whether I am making a basic error, or if Text::Bastardize's `charge' doesn't like the use of chomp for some reason
Please help :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help with (what I consider) a strange problem
by sachmet (Scribe) on Mar 19, 2001 at 07:22 UTC | |
|
Re: help with (what I consider) a strange problem
by danger (Priest) on Mar 19, 2001 at 07:16 UTC | |
by sachmet (Scribe) on Mar 19, 2001 at 07:26 UTC | |
|
Re: help with (what I consider) a strange problem
by dusk (Friar) on Mar 19, 2001 at 08:06 UTC | |
by chipmunk (Parson) on Mar 19, 2001 at 08:17 UTC |