Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Answer: How can I write and call subroutines in separate files?

by Anonymous Monk
on Feb 23, 2004 at 11:16 UTC ( [id://331076]=note: print w/replies, xml ) Need Help??


in reply to Re: How can I write and call subroutines in separate files?
in thread How can I write and call subroutines in separate files?

Hi, dont forget the 1; at the end of the require "file"; where file is:
#!/usr/bin/perl sub one{ print "one"; } 1;
otherwise the compiler wont be happy;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-29 04:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found