Perl Monk, Perl Meditation | |
PerlMonks |
Using modules for Newbiesby logan (Curate) |
on Apr 20, 2003 at 03:52 UTC ( [id://251770]=note: print w/replies, xml ) | Need Help?? |
Modules look imtimidating at first, but they're really cake. Simply load the module at run time. Wow, that doesn't sound simple at all. Here's what I mean:
This allows your code to access the subroutines in MP3::ID3v1Tag. From there, you call them like any other sub.
Clear as mud? Think of a module as a big bag of subroutines that you don't have to write. Just read the documentation, and you'll have all you need to know about how to use them, and all the dirty work happens behind the scenes. Over time I've found that a new project begins by searching CPAN for relavent modules. If you can find one, you may find that 90% of your work is already done for you. One more thing, as you continue coding perl, I can't stress enough how useful The Perl Cookbook will be. It's one book I wish I'd bought on my first day coding.
-Logan
In Section
Seekers of Perl Wisdom
|
|