Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: My first module

by osunderdog (Deacon)
on Apr 26, 2006 at 13:34 UTC ( #545788=note: print w/replies, xml ) Need Help??


in reply to My first module

Just clear up the potentially obvious stuff. Your module should be:

########## test_module.pm ########## package test_module; use strict; sub testsub { my $in_arg= shift; my $new_arg=$in_arg+10; return($new_arg); } 1;
Also, you can start out with everything in one file first:
#!/usr/bin/perl -w use strict; package test_module; use strict; sub testsub { my $in_arg= shift; my $new_arg=$in_arg+10; return($new_arg); } my $var=10; my $new_var=test_module::testsub($var); print "$new_var\n";

Hazah! I'm Employed!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2020-11-25 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?