Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Re: Why the error?

by SilverB1rd (Scribe)
on Mar 10, 2001 at 03:53 UTC ( #63403=note: print w/replies, xml ) Need Help??

in reply to Re: Why the error?
in thread Why the error?

Thanks merlyn, that fixed it.
<Warning>I'm new</Warning> what does the \* do?
That is how they showed it in the CGI info page.

The Price of Freedom is Eternal Vigilance

Replies are listed 'Best First'.
Re: Re: Re: Why the error?
by Hot Pastrami (Monk) on Mar 10, 2001 at 04:03 UTC
    In this instance, the "\*" basically returns a pointer to the filehandle. Something to do with typeglobs, an area I haven't explored much (yet). The asterisk indicates the typeglob (I believe), and the backslash performs it's usual "return-a-reference-to-this" function.

    A typeglob is basically a complete symbol table entry, but you can use them (and references to them) like file handles.

    Hot Pastrami
Re: Re: Re: Why the error?
by Anonymous Monk on Mar 10, 2001 at 15:05 UTC
    \* is called a typeglob... if you are a beginner, this is way advanced for you to understand..
    in some words, this is a reference (and here a reference to a filehandle)
    the * is the typeglob.
    and the \ is to dereference it.
    a typeglob references anything from a $scalar, to an @array on to a FILEHANDLE
      Ummm... * is a typeglob, which means in a way "Everything named ...". So *foo is everything named foo: $foo,@foo,%foo,&foo,the fh foo, and the format foo,(I'm sure I missed something,,but don't know what.) \*foo is a reference to the typeglob. A typeglob or a ref to it, can be used as an "indirect filehandle". Typeglobs are also used to create aliases:
      *foo=*bar; #Now everything named bar is also named foo *fooo=\$barr #now $fooo is an alias to $barr
      And to create a refernce using the *foo{THING} thing which is explained in perlref(As the 7th way to create a reference). For more about typeglobs, read perldata.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://63403]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2022-08-08 19:42 GMT
Find Nodes?
    Voting Booth?

    No recent polls found