[EMAIL PROTECTED] wrote:
I am trying to prepend something and ran into an issue.
I am using a snipped like this:
if ($a == 1) { $pre = "nc_"; }
Later on when I try to use this:
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

Reply via email to