There are some commands to open a file .. and read the stuff into an array
and manipulate the contents .. sentence by sentence or word by word ..
< pseudocode >
open (FILE,"< test.txt",r)
loop here
@myarray=read(FILE)
loop end till eof ..
</pseudocode>
Regards
Sandesh
Check out perldoc command ..
perldoc -f read
perldoc -f == > for function based help ..
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 26, 1999 4:28 PM
Subject: [ILUG-BOM] To view the file
>
>
> Hi !
>
> I want to view some file on the linux file system from perl program.
> I should be be able to scroll through the file but at the same time i
should not
> be able to change the contents.
> i.e. i want to open the file in read only mode.
>
> I am the owner of that file. So the command
> System("vi <filename>");
> won't work because it allows to modify the contents of the file.
>
> In unix i can use command
> cdimore <filename>
> to do the same.
>
> Can u suggest me any linux command ?
>
> Prachi.
>
>
> To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the
mailing list button and fill the appropriate information
> and submit. For any other queries contact the ML maintener
>
>
To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the mailing list
button and fill the appropriate information
and submit. For any other queries contact the ML maintener