On Fri, 19 Aug 2005, Adriano Allora wrote:

> Some questions:
> 1) how can I write multine comments? something like /** ... **/?

Method one, simple comments:

    # Here is a comment
    # that spans across
    # several lines....

Method two, POD:

    =pod
    Here is a comment
    that spans across
    several lines....
    =cut

Note that these aren't quite equivalent though. The first way is 
simpler, and it's how most Perl programmers seem to handle brief (or 
maybe not so brief) notes on how the program works. The second way is 
intended as documentation, possibly for programmers, possibly for later 
users of the script; the second way will respond to the `perldoc` 
command -- meaning anyone that can run the script can also examine 
comments formatted this way. That may or may not be desirable, which may 
be why it seems to be less common than simple # comments. 

> 2) the following script doesn't find the page requested in getstore
> (baolian.local = 127.0.0.1). Why?

Are you really expecting to store the contents of one URL to another? 
The getstore() function is intended for saving to a file. Try saving to 
a file that can be accessed as that URL --

    $homepage = "~/public_html/provaperl5.html";

Etc. As far as I know, it cannot be a URL, it must be a file.

> 3) $homepage must be a real page/file or I can use it like a normal 
> variable or a filehandle to read with whlie(<>)?

It must be a real *file*, not a *page* (though that file can be accessed 
as a page, depending on where it is and how your web server is set up). 

I'm not sure what you mean by "must be a file ... or ... normal variable 
... or ... filehandle"; the way you write this implies that it's one, or 
the other, or the third, but that isn't necessarily the case. 

 


-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to