Re: Logging with Log::StdLog from within a package




Quoth Jerry Krinock <jerry@xxxxxxxx>:
Thank you, Ben. I used {*::STDLOG} and it works now.

But what is that {*FILEHANDLE} syntax mean to the perl interpreter? I
thought that there is no "*" operator in perl, and {} is used for code
blocks or hash assignments. Which, if any, perldoc?

*FOO is described in perldata, under 'Typeglobs and Filehandles', and
further elaborated on in perlmod. The print {...} syntax is documented
in perldoc -f print; it applies quite generally to any builtin or method
call that has an 'indirect object' slot. The block is required if you
want to put anything more complicated that a simple scalar there.

Ben

--
"If a book is worth reading when you are six, * ben@xxxxxxxxxxxx
it is worth reading when you are sixty." [C.S.Lewis]
.



Relevant Pages

  • Re: Logging with Log::StdLog from within a package
    ... But what is that {*FILEHANDLE} syntax mean to the perl interpreter? ... Which, if any, perldoc? ...
    (comp.lang.perl.misc)
  • Re: match and grab
    ... print FILEHANDLE LIST ... /looks/ and /behaves/ like indirect-object method call syntax, and the equivalent arrow syntax works and does the same thing. ... I know that printis a built-in but thought that it was hooked in on the back of a indirect object method call syntax. ...
    (perl.beginners)
  • Re: match and grab
    ... print FILEHANDLE LIST ... print Prints a string or a list of strings. ... /behaves/ like indirect-object method call syntax, ... syntax works and does the same thing. ...
    (perl.beginners)
  • Re: Emacs syntax highlight of Perl comments
    ... Since typical editors ... > don't have a Perl interpreter, all they can do is guesswork. ... Use syntax hilighting as far as it goes, ... Do not think CPerl will have any problem with "normal" Perl programs ...
    (comp.lang.perl.misc)
  • Re: Newbie question - create a file
    ... and in what way did it fail? ... I had the syntax all messed up. ... I was using a number for a filehandle (like ... The script would execute without error messages, ...
    (comp.lang.perl.misc)