A follow up question might be: is there a way to have global variable shared between the main::space and the module::space so I don't have to keep passing the same values over and over? (I know, not a good idea, but just for the sake of discussion)
So, instead of:
#MAIN: my $foo = "aaaaaaa"; my $bar = "bbbbbb"; print add_strings ($foo, $bar);
Be able to just have:
#MAIN: my $foo = "aaaaaaa"; my $bar = "bbbbbb"; print add_strings (); #MODULE: our ($foo, $bar); #this might be make-believe add_strings { my $newstring = $foo . $bar; return ($newstring); }
In reply to Re^2: To module or not?
by bradcathey
in thread To module or not?
by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |