|go ahead... be a heretic|
Reading variables from a txt fileby Perl_Padawan (Initiate)
|on Jul 07, 2012 at 20:44 UTC||Need Help??|
Perl_Padawan has asked for the
wisdom of the Perl Monks concerning the following question:
I am an intermediate perl user and I am trying to create an web site management interface for my church website that other people will be able to use. I want to have a txt file that I can read and write to that will have editable content. Then I want the cgi to read the variable strings in the txt file and spit out html.
I want to have a txt file like this:
$box_3="random content...";Then use it like this:
print $box_3;Is there a way to use the raw data in the txt file as the string variables instead of opening the file, reading the contents, splitting them and assigning each one to a variable?