By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

packages

P: 10
so, I need to take my program, take out all the subs and put them into a package which is then required by the rest of the program. This seems like it would be pretty easy, but the book in vague and my teacher has a habit of teaching us code that is completely wrong, which is my guess.

so, I cut all my subs out of the program and put them in a new file named package8.pm (as he told us to) and in my original program (basically just a menu that calls the functions) put
Expand|Select|Wrap|Line Numbers
  1. require "package8.pm";
I try to run in cygwin (a terminal) and get message "package8.pm did not return a true value at lab8.pl line 1.

yes the name is correct and they are in the same file. so, any help or possible link to a website thats smarter than my teacher could help, thank you.
Apr 27 '09 #1
Share this Question
Share on Google+
2 Replies


eWish
Expert 100+
P: 971
Do you have 1; at the bottom of the file? This tells perl to return true.

Checkout perlmod


--Kevin
Apr 27 '09 #2

P: 10
I did not, thank you that fixed it. I really wish our teacher could mention things like that
Apr 27 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.