Just another Perl shrine | |
PerlMonks |
problem ..related to perl package conceptby perlplayer (Sexton) |
on Dec 09, 2008 at 04:31 UTC ( [id://729076]=perlquestion: print w/replies, xml ) | Need Help?? |
perlplayer has asked for the wisdom of the Perl Monks concerning the following question:
i am writing a script like this
i want to print the value from my package but not from main but it is not working can anyone explain why ... i have seen in perlmod that we define a sub in a different package if we explicitly declare its name with the package we intend to keep it in. OUTPUT csbu061 mhalder 125: perl test2.pl Can't modify constant item in scalar assignment at test2.pl line 6, near "'two';" Execution of test2.pl aborted due to compilation errors.
Back to
Seekers of Perl Wisdom
|
|