We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Good job lithron! __END__ is the same as __DATA__ in a top level script. Any thing after __DATA__ can be read using the package name in conjunction with the DATA filehandle (PACKAGE::DATA). Since we're dealing with a top level script, main is the package and can be omitted. Seek is being called using the DATA filehandle, position of 15 (16th byte since it's zero based) and a whence of 0 (meaning set a new position). The seek succeeds so the print is then executed. q... <DATA> is equivilant to '' . <DATA>. This puts the read line from the DATA filehandle in scalar context which results in only one line being read. Had the q... been omitted, the entire script (starting at the 16th byte) would have been printed instead. In reply to Re^2: Fake JAPH
by Mr. Muskrat
|
|