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#! /usr/bin/perl $var='one'; mypackage::var='two'; sub mypackage::func(){ print "my \$var is $var"; } mypackage:: func();
In reply to problem ..related to perl package concept by perlplayer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |