Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Another "Find the bug!" Node

by jimt (Chaplain)
on Sep 27, 2006 at 16:14 UTC ( #575185=note: print w/ replies, xml ) Need Help??


in reply to Another "Find the bug!" Node

For those people trying to figure out the problem on their own...I had all sorts of trouble figuring out the problem here, due to the test script I had set up.

This works fine.

#!/usr/bin/perl use strict; use warnings; use Package1 qw(:all); use Package2 qw(:all); $\ = $/; print this(); print that(); print this(); print that(); print foobar();

To properly see the error, just make sure that Package2 is imported before Package1.

#!/usr/bin/perl use strict; use warnings; use Package2 qw(:all); use Package1 qw(:all); $\ = $/; print this(); print that(); print this(); print that(); print foobar();

Until the other solutions were posted, I was sitting here scratching my head saying, "What bug?"


Comment on Re: Another "Find the bug!" Node
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-10-01 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (41 votes), past polls