in reply to Re: Re (tilly) 1: UnEscaping text...
in thread UnEscaping text...
Please give a short code example and give the actual contents of the file so we can track down what is really going on.
Here is a simple case for you to consider. Create a file called "raw_text" that looks like this:
Now create a small Perl script that looks like this:hello world. This is a backslash: \ Here are 10 of them: \\\\\\\\\\
On my machine I get an output of:#! /usr/bin/perl -w use strict; my $file = "raw_text"; open(FILE, "< $file") or die "Cannot open '$file': $!"; my $contents = join '', <FILE>; print "HERE ARE THE CONTENTS OF $file:\n"; print $contents;
As you see, Perl does not alter the text. You may be altering it, but Perl is going to be only doing what you said.HERE ARE THE CONTENTS OF raw_text: hello world. This is a backslash: \ Here are 10 of them: \\\\\\\\\\
Now if your file starts off with something other than what you want, then you will need to figure out how to manipulate it into what you want. But nobody is going to be able to do that unless you have a more precise description of the change than just, "escaped". Escaped by what rules? Your talking about doubling backslashes tells me that it isn't using HTML escape codes. But there are a lot of other things that it could be and I am not going to guess.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 3: UnEscaping text...
by Rabotnik (Initiate) on Aug 14, 2001 at 13:30 UTC | |
by tilly (Archbishop) on Aug 14, 2001 at 13:46 UTC | |
by Rabotnik (Initiate) on Aug 14, 2001 at 15:42 UTC | |
by Hofmator (Curate) on Aug 14, 2001 at 15:48 UTC |