On Mon, 17 May 2004 10:13:04 +0100, Werner Otto <[EMAIL PROTECTED]> wrote:
Hi there,
I have the following situation where I need to call a html page
depending on.
if($name eq "")
{
call/display my html page.
}
Can anyone help me out with the syntax for that one line please.
You can do it in many ways one way would be this.
if foo.html is the html page you want to display do this
if ($name eq "")
{
print_page("foo.html") ;
}
else
{
print_page("else.html") ;
}
print_page()
{
[EMAIL PROTECTED];
open(FILE, $fname ) || die("File not found") ;
while(<FILE>)
{
print $_;
}
close FILE;
}
}
--
regards
Vadiraj C S
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>