On Jul 6, Notabene said:

>       $var1   = 'This is text ';
>       $var2   = 'This is more text';
>       $target = $var1.'<'.$var2.'>';

The more common technique is

  $target = "$var1<$var>";

>       This is text <This is more text>
>
>I've tried "escaping" each of the two symbols but with no luck -- so what's
>the trick and what am I doing wrong, here?

You've probably neglected to tell us that you're printing this to a web
browser, where < and > have special meanings (they delimit tags).  To get
these characters to display as literals, you'll have to use &lt; and
&gt; instead of < and >.

You can automate that via:

  use HTML::Entities;
  print encode_entities("He's <that> silly!");

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734
**      Manning Publications, Co, is publishing my Perl Regex book      **

Reply via email to