This is because you don't have to define your functions in Perl like you do
in C or some other languages.  Perl does have the ability to declare
function prototypes, but this is generally not used. If you wanted to
declare a function prototype, I believe you would have to declare it earlier
in your script as well.

-----Original Message-----
From: Madhu Reddy [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 9:07 PM
To: [EMAIL PROTECTED]
Subject: Too may arguements Error


Hi,
   i have a script with multi files...
in one file, i defined all the functions......
and from other file i am calling the functions...

suppose, following is my function defination...

sub log_msg()
{
   print LOG "@_\n";

}


i am calling this function with
log_msg("Running script\n")

here i am getting following error,
 too many arguements to log_msg at "("Running
script\n")"
--

then i changed the function defnitation.....like
following 

##here i removed () in function definition
sub log_msg 
{
   print LOG "@_\n";

}


now it's working....I am curious to know,
why it is hapenning ?
in function definition we don't need to put "()" ?


Thanx
-Madhu





__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to