chrismassey
Programmer
Hello,
I am currently using a rich text area to edit HTML pages. The idea is to open a HTML file using...
My first question: Is this the best way to open a file? Because I have never understood why the file should be opened into an array? Why not into a scaler?
I then take the contents of the HTML file (@edit_page) and use this as the rich test areas value...
However, it doesn't like me using an array (@ symbol) therefore it doesn't display properly. If I use a scaler variable then it works fine.
If I could turn the array into a scaler (string), then this should work fine.
My second question: How can I print the contents of the file into the rich text area.
If you would like to see this part of the script let me know.
Thank you,
Chris
I am currently using a rich text area to edit HTML pages. The idea is to open a HTML file using...
Code:
open (LOG, "$initial_path$path_carry") || Error('open', 'file');
flock (LOG, 2) || Error('lock', 'file');
@edit_page = <LOG>;
close (LOG) || Error ('close', 'file');
My first question: Is this the best way to open a file? Because I have never understood why the file should be opened into an array? Why not into a scaler?
I then take the contents of the HTML file (@edit_page) and use this as the rich test areas value...
However, it doesn't like me using an array (@ symbol) therefore it doesn't display properly. If I use a scaler variable then it works fine.
If I could turn the array into a scaler (string), then this should work fine.
My second question: How can I print the contents of the file into the rich text area.
If you would like to see this part of the script let me know.
Thank you,
Chris