Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: help with (what I consider) a strange problem

by dusk (Friar)
on Mar 19, 2001 at 08:06 UTC ( #65355=note: print w/replies, xml ) Need Help??


in reply to help with (what I consider) a strange problem

Thank you all for your help. I apologize for neglecting to use perldoc
My code is now:

#!/usr/bin/perl -w use strict; use Text::Bastardize; chomp(my $line = <>); my $latin = Text::Bastardize->new(); $latin->charge($line); print $latin->pig(),"\n"

Which works perfectly :)

update: removed unecessary `$_' assignment. Thanks danger :)

Replies are listed 'Best First'.
Re: Re: help with (what I consider) a strange problem
by chipmunk (Parson) on Mar 19, 2001 at 08:17 UTC
    I can't figure out why that code even compiles. Assigning to chomp should result in the following error: Can't modify scalar safe chop in scalar assignment... But, this error doesn't occur when assigning to chomp if the argument to chomp is an assignment from a filehandle read. Some sort of obscure parsing bug...

    Here's what your code should look like:

    #!/usr/bin/perl -w use strict; use Text::Bastardize; chomp(my $line = <>); my $latin = Text::Bastardize->new(); $latin->charge($line); print $latin->pig(),"\n";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-12-02 23:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (27 votes). Check out past polls.

    Notices?