Re: call HTML page from PERL



Do you want a link on a page that takes you back to previous page?
<a href = "javascript:history.back()">Go back</a>


Or do you want it to auto-redirect to the previous page?
(with a 5 sec delay)
<meta http-equiv="refresh" content="5;url=login.html">
-or-
(immediate)
<script language="javascript">
location.replace("login.html")
</script>
(both need to be in the head section of your page)


Either way .. I don't think this is a perl question. I also can't see
any viable reason to want to go back to the login page, after you've
just logged in. But, whatever gets your whistle blowing I guess.


sunilsushil@xxxxxxxxx wrote:
yes am sorry sir,

see i am having a login page which is saved as
(login.html).when i press login button the page's FORM Action calls my
perl script file( login.pl) which display some message as a html page
format shown:

login.pl file:

print "Content-Type: text/html\n\n";
print "<html> <head>\n";
print "<title>Minimal Input</title>\n";
print "</head>\n";
print "<body>\n";
print "<br>LOGIN Successfull<BR>";
print "</body> </html>\n";

after this i want to go back to my first page i.e my login page
(login.html ) how can i go back . thats what i meant by calling my old
page



Paul Lalli wrote:
sunilsushil@xxxxxxxxx wrote:
i have been writing program for file manupulation. by opening
, reading and appending..
i have a problem .

how can i call or open an HTML page from my script.

e.g my file : login.html

how to call this html page from my perl script..

That is non-sensical. What do you mean by "call" an html page. An
html page is not a program, and is not executed. It is pure text
(albeit in a special markup language, generally interpreted by web
browsers).

If you want to open the file for reading, you simply use the open
function, as described in
perldoc -f open

open my $html_fh, '<', 'login.html' or die "Cannot open login.html:
$!";
while (my $line = <$html_fh>) {
print "Line $. : $line";
}

If you want to do something else, you'll have to better describe your
goal, using terms that make sense.

Paul Lalli

.


Quantcast