On Thu, May 31, 2001 at 12:57:10PM -0400, David Gilden wrote:
[snip]
> 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?

The C<text> is POD (Perl's Plain Old Document format) markup.  It means
"renderers, this is code, mark it as such in some distinctive way."


> -----
> 
> I am not following what /m modifier does (I am looking thru the camel
> books not no luck so far)

/m is actually pretty simple.  It changes exactly what '^' and '$' match. 
Normally, '^' matches the start of the string, and '$' matches the end of
the string.  With /m, '^' matches just after a newline, and '$' matches just
before a newline.  For example:

    "foo\nbar" =~ /^bar/    # no match
    "foo\nbar" =~ /^bar/m   # match

    "foo\nbar" =~ /foo$/    # no match
    "foo\nbar" =~ /foo$/m   # match


> [ Last comment on perldoc, why am I seeing the leading "=" here: ]
> 
> =item Comments Inside the Regexp

This is more POD markup.  If you're using perldoc -f <function> and an
older version of Perl (pre 5.6 I believe) your POD won't be rendered by
perldoc, so you see the raw POD markup.  If you want it to be rendered you
can use something along the lines of:

    perldoc -tf time | less


 
> Unrelated question:
> 
> In a library file can the last line can be "1;" or should be "return 1;"

It can be either.  It can be any expression that results in a true value. 
Some examples:

    "This is a true statement.";
    42; # the meaning of life, the universe, and everything
    @data = qw(foo bar blah);
    subroutine_that_returns_a_true_value();


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to