H
hakim
Hi,
My script looks like that:
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 my @content;
6
7 open(FILE, "< content.txt");
8 @content = <FILE>;
9 close(FILE);
10
11 my $name = "Achim";
12
13 print @content;
14
content.txt:
Hello $name,
How are you?
If I start my script, I get only the contents of content.txt, but I
want that perl changes $name to Achim. I need something like that for
CGI programming.
What is the nicest way to do that or is it better to create functions
with the content and put it in a module? What's the nicest way for CGI
Programming???
Thanks...
My script looks like that:
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 my @content;
6
7 open(FILE, "< content.txt");
8 @content = <FILE>;
9 close(FILE);
10
11 my $name = "Achim";
12
13 print @content;
14
content.txt:
Hello $name,
How are you?
If I start my script, I get only the contents of content.txt, but I
want that perl changes $name to Achim. I need something like that for
CGI programming.
What is the nicest way to do that or is it better to create functions
with the content and put it in a module? What's the nicest way for CGI
Programming???
Thanks...