On Wed, 6 Feb 2002, Brett W. McCoy wrote: > On Wed, 6 Feb 2002, Octavian Rasnita wrote: > > > I tried to print my email address when it is enclosed in < and > signs but > > it didn't print anything. > > The code: > > > > my $line; > > $line= "<orasnita\@yahoo.com>"; > > # I also tried with $line = \<orasnita\@yahoo.com\>"; > > print "$line"; > > No need for the double quotes (it will try to interpolate the @): > > ~$ perl > $line = '<[EMAIL PROTECTED]>'; > print "$line\n"; > > <[EMAIL PROTECTED]> > ~$
Oh, but if you are doing this on a web page, you should use also < and > instead of < and >, because the HTML interpreter will see those as tag delimiters. Better yet, use HTML::Entities::encode. See the perldoc on HTML::Entities for more details. But still, don't double quote unless you need to (i.e., you need to interpolate variables or control characters like \n inside the string). -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ love, n.: Love ties in a knot in the end of the rope. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]