I'm responding to both messages (the original and the response) because I
don't have the original.
On Thu, Aug 16, 2001 at 01:21:16PM -0500, randy Peterman wrote:
> I believe that you may need to add an ampersand "&" before the name of the
> subroutine, like so:
> if(!&isPresent(\$req, $user))
Yes, that would work, because it bypasses prototype checking. Bypassing
prototype checking is probably not a good idea, the prototypes are there
for a reason.
> "David Simcik" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > sub isPresent(\$$);
> >
> > our $req = new CGI();
> >
> > if(!isPresent(\$req, $user))
The prototype on the subroutine is (\$$). This means the first scalar value
gets enreferenced automatically by Perl, it doesn't mean you need to pass in
a scalar reference. You should be calling it thusly:
isPresent($req, $user);
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]