CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Apostrophe in subroutine call


New User

Aug 15, 2007, 11:49 PM

Post #1 of 2 (425 views)
Apostrophe in subroutine call Can't Post


I'm trying to understand a bit of opensource perl and I have come across something I have never seen before. When various subroutines are called, they have an apostrophe somewhere in the middle of it, per (see underlined parts of code):

sub HttpInit
local($arg, $db, $pw, $headers, $agent) = @_;
defined &Http'Init || do {
unshift(@INC, $HOME);
require "";
&Http'Init($arg, $db, $pw, $headers, $agent);

This one calls itself! Does anyone know what this means or what it does? Examples of this are littered throughout this particular package. Any help is appreciated.


Aug 16, 2007, 1:37 AM

Post #2 of 2 (424 views)
Re: [robbo] Apostrophe in subroutine call [In reply to] Can't Post

I believe that is an old style of perl syntax. It would be the same as:


but that would be calling the Init function from the Http package, not main.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives