[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
ePerl substitions
- From: Ryan VanderBijl <nospam@thanx>
- Date: Wed, 21 Jul 1999 22:20:36 -0400 (EDT)
Hello Again,
One thing i am trying to do with my web pages is to put links
in to see the html-source, and to see the wml-source.
I am using a link like: <A HREF="view-source:filename">, but that
makes netscape give the source to error pages, as it doesn't end up
retrieving "http://www.myurl.com/dir/filename", but rather tries
getting http://filename. I do have
<BASE HREF="http://www.myurl.com/dir/">. So, to get around this
problem, i'm trying to figure out the /dir/ part from variables.
I have the following variables passed in via my Makefile (i had
set that up before i learnt about wmk, and haven't had time to
convert):
BASE_HTML = http://www.myurl.com/dir/
HOME_DIR = /home/myname/public_html/
and then from WML:
WML_SRC_DIRNAME = /home/myname/public_html/[sub_dirs]
WML_SRC_BASENAME = index
What i want to do with ePerl is this:
<:
$DIR = $WML_SRC_DIRNAME;
$DIR =~ s/$HOME_DIR//o; ## strip /home/myname/public_html/
## from /home/myname/public_html/sub_dir/
print "<A HREF='view-source:".$BASE_HTML.$DIR.$WML_SRC_BASENAME.".html'>";
:>
but, it doesn't work. I still get /home/myname/public_html/ in my
newly created link.
Why is in not working? what ePerl code can i use to make it work,
as i dont have access to recompile wml (stupid school restrictions
dont trust me to install programs server-wide! :(
Thanks,
Ryan
/******************************************\
** Ryan VanderBijl, rvbijl39@calvin.edu **
** www.calvin.edu/~rvbijl39 **
\******************************************/
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com