Skip to Content
Programming PERL in the .NET Environment
book

Programming PERL in the .NET Environment

by Yevgeny Menaker, Michael Saltzman, Robert J. Oberg
September 2002
Intermediate to advanced content levelIntermediate to advanced
496 pages
10h
English
Addison-Wesley Professional
Content preview from Programming PERL in the .NET Environment

Perl Libraries

All of the subroutines above have been written in the file where they are invoked. To make these and other programmer-written subroutines reusable, you must place them in a file and instruct Perl to include them in any program that needs them. The file where you place these subroutines are essentially Perl library files. There are a few ways of accomplishing this task.

The require Function

One way of importing a file into your program is to use the Perl require function. To illustrate how this function works, let's take a few of the functions we have seen thus far and place them in a file by themselves. Although the name of this file is not significant, we will call it library.pl. Keep in mind that this file will not be executed ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Sams Teach Yourself Perl in 21 Days, Second Edition

Sams Teach Yourself Perl in 21 Days, Second Edition

Laura Lemay, Rafe Colburn
Pro Perl

Pro Perl

Peter Wainwright

Publisher Resources

ISBN: 0130652067Purchase book