[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-beginners
Subject:    Re: Open File - Read Only
From:       63.251.223.186
Date:       2007-09-28 16:28:41
Message-ID: 1190996921.552450.285990 () 50g2000hsm ! googlegroups ! com
[Download RAW message or body]

On Sep 27, 8:49 pm, andrewmchor...@cox.net wrote:

> I appreciate the response to the last question. I have scripts that I have opened
> files and they work. However, I am failing on opens now because the file is read
> only. What is the way to open a file read only.

If you are trying to open the file for reading, you just open the file
like you would any other time.  There's no difference.

If you're trying to open the file for writing or appending, you
can't.  They're READ-only.  You're not allowed to open them for
writing or appending.  That's the whole point of a read-only file.  If
you don't want the file to be read-only, you need to change its
permissions (which is Operating System-dependent, and has nothing to
do with Perl).

Paul Lalli




-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic