On May 31, David Gilden said:
>This approach of treating C<print> and C<printf> like object methods
>calls doesn't work for the diamond operator. That's because it's a
>real operator, not just a function with a comma-less argument. Assuming
>you've been storing typeglobs in your structure as we did above, you
>can use the built-in function named C<readline>.....
>
>I am not sure what they mean, is the C as in command line or as in
>construct?
You are looking at a documentation format known as Pod: Plain Old
Documentation. The markup is simple. The C<...> tag means "this is to be
rendered as code".
Try using pod2html or pod2text to see the Pod rendered in a different
format. Also, look at the 'perlpod' documentation for information on
writing Pod.
>I am not following what /m modifier does (I am looking thru the camel
>books not no luck so far)
>
> # turn the line into the first word, a colon, and the
> # number of characters on the rest of the line
> s/^(\w+)(.*)/ lc($1) . ":" . length($2) /meg;
The /m modifier (documented in perlre) changes the meaning of the ^ and $
anchors. You can read more about this in chapter 3 of "Learning Perl's
Regular Expressions", which you can find online at
http://www.pobox.com/~japhy/docs/LPRE.html
>=item Comments Inside the Regexp
This, too, is Pod markup. The =item directive (found inside =over and
=back directives) is used to indicate a list element.
>Might be nice if in FAQ or on this list some might post a short tutorial
>on using Perldoc. I just starting using it this week and I have on this list
>for a month or so! Never was quite sure what the people meant when at the end of
>their post with stuff like:
>
>references:
>
> perldoc perlmod
> perldoc -f require
> perldoc -f use
The perldoc tool comes with Perl, and is very simple to use. In fact, you
can find out how by running 'perldoc perldoc' at your command-line. ;)
Very briefly:
perldoc SECTION
read a specific file of documentation (like perlfunc or perlmod)
perldoc -f FUNCTION
extract information about FUNCTION from perlfunc.pod
perldoc -q KEYWORD
search the FAQ for a question containing KEYWORD
You can also access this information online at http://www.perldoc.org/.
>Unrelated question:
>
>In a library file can the last line can be "1;" or should be "return 1;"
Most people leave out the "return" because it is redundant. But any true
value will do:
1;
"this is not true";
"japhy told me to put this here";
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** I no longer need a publisher for my Perl Regex book :) **