On Aug 16, David Simcik said: >Type of arg 1 to main::isPresent must be scalar (not single ref constructor) >at C:\src\Orion\cgi-bin\share.pl line 45, near "$user)" A prototype of \$ means that Perl will add the \ for you automagically. >sub isPresent(\$$); > >if(!isPresent(\$req, $user)) You don't need to backslash $req. Perl does it for you because of the prototype. I don't know WHY you want to send a reference, though. :) -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing Scalar Reference to Subroutine
Jeff 'japhy/Marillion' Pinyan Thu, 16 Aug 2001 08:29:01 -0700
- Passing Scalar Reference to Subroutine David Simcik
- Re: Passing Scalar Reference to Subrout... Jos I. Boumans
- Re: Passing Scalar Reference to Subrout... Jeff 'japhy/Marillion' Pinyan
- Re: Passing Scalar Reference to Subrout... Curtis Poe
- Re: Passing Scalar Reference to Subrout... register
- Re: Passing Scalar Reference to Subrout... randy Peterman
- Re: Passing Scalar Reference to Sub... Michael Fowler