Hi Basil,

Basil A. Daoust wrote on Mon, Jun 30, 2008 at 02:23:51PM -0500:

[...]
> sub sLogData(@)
[...]
> SLogData();
[...]
> Undefined subroutine &main::SLogData called at play.pl line 19.

Indeed, but that's a typo unrelated to the OP's question.
Correcting that typo, you get:

 Test string 1
 Test string 2
 Use of uninitialized value in string at ./sLogData.pl line 9.
 Use of uninitialized value in string at ./sLogData.pl line 10.
 Test string 3

Calling a (@)-prototyped funtion without arguments is OK, arrays can
be empty, and besides, the prototype check happens at compile time,
not at run time, which is the whole point of prototyping.
Finally, it produces a different Perl error message on failure.
Changing (@) to ($), you get:

 Not enough arguments for main::sLogData at ./sLogData.pl line 19, near "()"
 Execution of ./sLogData.pl aborted due to compilation errors.

Yours,
  Ingo

-- 
Bad advice alert above...  ;-)
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to