willy
http://www.hackswell.com/corenth
>
>> #try this: system("echo \'$xml\' | myprogamname")
>> ^^^^^^^^
>> \---- i haven't tried it, but it
>> should keep the shell from interpolating the xml data
>
>But what happens if the XML has an embedded apostrophe ?
>
> $ echo '<show>Monty Python's Flying Circus</show>'
> >
> ^C
>
>Or some other magical character ?
>
> $ echo '<homer>D'oh!</homer>'
> -bash: !: event not found
> $
>
>D'oh!
your're right!!! i'd forgotten that- i've used a solution as follows:
$DATA =~ s/(\w\w)/chr (hex($1))/eg;
this converts hexadecimal back to a string - funny chars and all from within
a perl program that's called via `myprog.pl` etc.... i don't remember how
to convert the string INTO hex- but doing that, then modifying the other
program to decode it accordingly may do what you want it to.
>There's all kinds of edge cases that would have to be dealt with here. I
>really think that putting the XML directly into a command line is doomed
>to failure; putting it in a temp file should be much more robust.
i agree.. but the above might work for this person.
>Chris Devers
willy
http://www.hackswell.com/corenth
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>