Can someone tell me what syntax is needed to
write out this line in a file: http://www.youraddress.com
When I view the contents of the file, the resulting
address looks like this: http //www.youraddress.com
It seems the ":" character is something special?
Thanks to all that reply
Paul Cartier
pcar...@ix.netcom.com
> Using Perl,
>
> Can someone tell me what syntax is needed to
> write out this line in a file: http://www.youraddress.com
>
> When I view the contents of the file, the resulting
> address looks like this: http //www.youraddress.com
>
> It seems the ":" character is something special?
Gee, I don't suppose you've tried escaping the ":" character.
BTW, why did you post this to a Web-related newsgroup? Your question is
a Perl question--it belongs in comp.lang.perl.misc. That's it.
Jeremy
--
Jeremy Zawodny
MaraWeb Development
Information Technology Services
Marathon Oil Company, Findlay Ohio
print FILEHANDLE "http://www.youraddress.com";
--
|========================= F U T U R E 2 0 0 0 ========================|
| Have your Web Authoring, design and CGI scripting done by Future 2000 |
| FREEPOST Pinner Middx HA5 4BR UK |
| Tel: +44 (0)181 428 1847 Fax: +44 (0)181 421 3662 |
| >>> Also check out our FREE classifieds at <<< |
| <URL:http://www.future2000.co.uk/classified/index.html> |
|=======================================================================|
+ On Tue, 9 Jul 1996, Paul Cartier wrote:
+
+ > Using Perl,
+ >
+ > Can someone tell me what syntax is needed to
+ > write out this line in a file: http://www.youraddress.com
+ >
+ > When I view the contents of the file, the resulting
+ > address looks like this: http //www.youraddress.com
+ >
+ > It seems the ":" character is something special?
+
+ Gee, I don't suppose you've tried escaping the ":" character.
Well, this seems to be unclear to me. I didn't think the ":"
was a special character, and doesn't need escaping:
[perl5 snippet]
$a="http://www.youraddress.com";
$b='http://www.youraddress.com';
print "http://www.youraddress.com\n";
print "$a\n";
print "$b\n";
[output:]
http://www.youraddress.com
http://www.youraddress.com
http://www.youraddress.com
Gosh, looks like the ":" is printing OK. I suppose the original
poster could be getting some interaction with the "/", which
happens to be the match, substitute, and tr default delimiter and
should be escaped to be safe.
xposted (and followups set) to c.l.p.m.
James
--
#!/bin/perl -s-- -export-a-crypto-system-sig -RSA-3-lines-PERL
$m=unpack(H.$w,$m."\0"x$w),$_=`echo "16do$w 2+4Oi0$d*-^1[d2%Sa
2/d0<X+d*La1=z\U$n%0]SX$k"[$m*]\EszlXx++p|dc`,s/^.|\W//g,print
pack('H*',$_)while read(STDIN,$m,($w=2*$d-1+length($n)&~1)/2)