new to perl

M

mani

Hi,

I read this sample code somewhere on the web and it is as follows:

$db="/www/emailadd.txt";
open (DB,"$db") || die "Can't Open mailadd: $!\n";
while (<DB>) {
chop;
&SendMail;
}
close DB;



I understand this code because i have been reading Learning Perl
written by Randal Schwartz & Tom C. I am assuming this Sendmail is a
subroutine
but arent su routines called as is like SendMail instead of the & in
the front... Or am i missing something here.... I have been reading
Perl 5.0

Please help me out

regards
Mani
 
P

Peter Hickman

mani said:
Hi,

I read this sample code somewhere on the web and it is as follows:

$db="/www/emailadd.txt";
open (DB,"$db") || die "Can't Open mailadd: $!\n";
while (<DB>) {
chop;
&SendMail;
}
close DB;



I understand this code because i have been reading Learning Perl
written by Randal Schwartz & Tom C. I am assuming this Sendmail is a
subroutine
but arent su routines called as is like SendMail instead of the & in
the front... Or am i missing something here.... I have been reading
Perl 5.0

Please help me out

regards
Mani

For some of us the use of & before a subroutine says version 4 (of perl)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top