Re: Help with "use"

2004-07-09 Thread JupiterHost.Net
BOLCATO CHRIS (esm1cmb) wrote: I added 1; Inside sub foo and it didn't work, but I just added it to the end of foo.pl and it worked! I don't get it? the 1; at the end of a file you're sue()ing returns true for the use statement. otherwise it won't be true and therefore fail.. HTH Lee.M - Jupit

RE: Help with "use"

2004-07-09 Thread perl.org
On Fri, 9 Jul 2004 13:36:26 -0400 , Bob Showalter wrote > BOLCATO CHRIS (esm1cmb) wrote: > > I am receiving "/home/users/me/foo.pl did not return a true value at > > ./program1.pl at line 2" > > where line 2 is the "require". > > That's the semantics of "require" (see perldoc -f require). > > Th

RE: Help with "use"

2004-07-09 Thread Wiggins d Anconia
e error when it "couldn't" (aka it thought it couldn't because it didn't return true). > But thanks. > Makes sense? http://danconia.org > -Original Message- > From: Bob Showalter [mailto:[EMAIL PROTECTED] > Sent: Friday, July 09, 2004 1

RE: Help with "use"

2004-07-09 Thread BOLCATO CHRIS (esm1cmb)
D] Subject: RE: Help with "use" BOLCATO CHRIS (esm1cmb) wrote: > It doesn't seem to be foo.pl that is causing the error is seems to be > coming from "use AnyDBM_File;" Why do you say that? > Could this be? That AnyDBM_File doesn't return a true vlaue? Di

RE: Help with "use"

2004-07-09 Thread Bob Showalter
BOLCATO CHRIS (esm1cmb) wrote: > It doesn't seem to be foo.pl that is causing the error is seems to be > coming from "use AnyDBM_File;" Why do you say that? > Could this be? That AnyDBM_File doesn't return a true vlaue? Did you add 1; To the end of foo.pl? You need to. -- To unsubscribe,

RE: Help with "use"

2004-07-09 Thread BOLCATO CHRIS (esm1cmb)
PM To: BOLCATO CHRIS (esm1cmb); 'Wiggins d Anconia'; [EMAIL PROTECTED] Subject: RE: Help with "use" BOLCATO CHRIS (esm1cmb) wrote: > I am receiving "/home/users/me/foo.pl did not return a true value at > ./program1.pl at line 2" where line 2 is the "require

RE: Help with "use"

2004-07-09 Thread Bob Showalter
BOLCATO CHRIS (esm1cmb) wrote: > I am receiving "/home/users/me/foo.pl did not return a true value at > ./program1.pl at line 2" > where line 2 is the "require". That's the semantics of "require" (see perldoc -f require). The standard idiom is to place 1; at the end of foo.pl, so that the la

RE: Help with "use"

2004-07-09 Thread Bob Showalter
BOLCATO CHRIS (esm1cmb) wrote: > Hello all, > Can "use" be used in a sub routine that is kept external? Yes. > Ex. > Program 1. > > #!/bin/perl > require '/home/users/me/foo.pl'; > exit; > > > Foo.pl > > sub bar { > use strict; > use fcntl; > use AnyDBM_File; > } This would not be a typical

RE: Help with "use"

2004-07-09 Thread BOLCATO CHRIS (esm1cmb)
b); [EMAIL PROTECTED] Subject: Re: Help with "use" > > Hello all, > Can "use" be used in a sub routine that is kept external? > Ex. > Program 1. > > #!/bin/perl > require '/home/users/me/foo.pl'; > exit; > > > Foo.pl > > s

Re: Help with "use"

2004-07-09 Thread Wiggins d Anconia
> > Hello all, > Can "use" be used in a sub routine that is kept external? > Ex. > Program 1. > > #!/bin/perl > require '/home/users/me/foo.pl'; > exit; > > > Foo.pl > > sub bar { > use strict; > use fcntl; > use AnyDBM_File; > } > Did you try it? Did it return an error? Note that 'require'

Re: Help with 'use'

2002-10-13 Thread Steve Grazzini
Tin-Shan Chau <[EMAIL PROTECTED]> wrote: > I have a module as follows: > > package Test; > require Exporter; > our @ISA = qw(Exporter); > our @EXPORT = qw(print_name print_test); > sub print_test() { >print "test\n"; > } > sub print_name() { >my $f

RE: Help with 'use'

2002-10-13 Thread Timothy Johnson
I'm not completely sure, but here are a couple of things I am noticing: 1) The last line of your module should be a 1 on it's own line. 2) When you declare a sub, don't put the parentheses. Try changing the line 'sub print_test(){' to 'sub print_test{'. It's possible that Perl thinks you're

RE: help with - use HTML::Template;

2002-03-23 Thread Brian
fast relief to computer stress call Up & Running Because throwing it out the window is not an option. > -Original Message- > From: A Taylor [mailto:[EMAIL PROTECTED]] > Sent: Saturday, March 23, 2002 4:47 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject

Re: help with - use HTML::Template;

2002-03-23 Thread A Taylor
Hi William, thanks for your time and help so far - it is much appreciated. My perl interpreter is definately pointing to the correct file - I have run other perl scripts successfully that point to #!/usr/bin/perl. It is only when I try to use 'use HTML::Template;' that I get a server error. Ca