The problem is how to concatenate the variable '$pre' to the string
'woopi.pl'
without having it treated as a variable named '$prewoopi'.
Try putting your filename into a variable
$fname = "woopi.pl";
and use
<a href="$pre$fname?action=something">Something</a>
Bill,
Is there already a good means of doing this, or would it be reasonable to
request
a new escape sequence ('\^' for instance) where the sequence was merely
used as a
terminator during interpolation.
It would mean that we could then use
<a href="$pre\^woopi.pl?action=something">Something</a>
Regards,
Paul Keirnan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, 16 December 2002 1:13 PM
To: $Bill Luebkert
Cc:
Subject: Re: [Perl-unix-users] [PMX:#] Prepending
I tried that as:
<a href="$pre/woopi.pl?action=something">Something</a>
<a href="$pre/new.pl?action=wit">SOmwhere</a>
and it doesnt work when $a == 1 the printed out results is
nc_/new.pl?Action=wit ? I also tried
<a href="$pre\\woopi.pl?action=something">Something</a>
<a href="$pre\\new.pl?action=wit">SOmwhere</a>
and for some reason it still print out nc_/new.pl?Action=wit if $a==1
Any ideas?
John
> > print <<EOM;
> > <a href="$pre\woopi.pl?action=something">Something</a>
> > <a href="$pre\new.pl?action=wit">SOmwhere</a>
>
> You need to replace your \'s with \\'s when inside "'s. \n is a
> newline. Actually, for an HTML URL your \'s should be /'s, so replace
> \ with /.
>
> > Lots of other html snipped
> > EOM
> >
> > Now when this prints the link Something will print
> > nc_whoopi.pl?action=something when $a == 1 and
> > whoppi.pl?action=something when $a != 1 ... But the last line the
> > link SOmwhere will print nc_ew.pl?Action=wit when $a == 1 and ew.pl
> > when it doesn't?
> >
> > Why does this work on the any think starting with w but nothing
> > else? How can I get the $pre appended to my html? $pre has to be
> > seperated from the script url or it thinks its actually a var?
> >
> > Thanks,
> > John
>
>
>
> --
> ,-/- __ _ _ $Bill Luebkert ICQ=162126130
> (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
> / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
> -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic
http://www.todbe.com/
>
> _______________________________________________
> Perl-Unix-Users mailing list [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
Perl-Unix-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs