Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Package problems

by Anonymous Monk
on Apr 14, 2017 at 20:55 UTC ( [id://1187962]=note: print w/replies, xml ) Need Help??


in reply to Package problems

The problem is that you are using our in one place and not the other. Either use our in both packages, or don't use it in either. Or put brackets around the package contents, like this:
package Dog { our $name="Odie"; } package Cat { $name = "Garfield"; print "$name says hello to $Dog::name. \n" ; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-26 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found