Mail Archives: djgpp-workers/2000/10/24/21:34:56
At 09:31 AM 10/24/00 +0200, Eli Zaretskii wrote:
<Snipped>
>Sorry for asking a Perl-illiterate question: What exactly is the
>importance of the backslashes in "\\#foo"? Why does it affect the
way
>the above snippet works?
Well, I'm not the one to ask that. All I did was make an educated
guess as to what would make the test work. I thought the "#foo" in a
double-quoted string might be being "substituted" as a perl variable
whose value was null, so "escaping" the "#" operator would cause it to
be treated as a literal. A single escape ("\#foo") did not work, but
the double-escape did work, and caused the test to work the way it was
supposed to work.
>Also, can you outline the Perl implementation of this feature, in
>terms of libc functions that get called when Perl processes the
>command such as "echo #foo|"?
No clue. I have no idea how the internals of this function work, I'm
just tinkering around the edges. JAPH I'm not (that's "Just Another
Perl Hacker").
>Anyway, my first suspicion would be some kind of buffering problem.
>IIRC, the DJGPP port of Perl uses some FSEXT trick for implementing
>invocations of external programs in some cases (I forget the details,
>or perhaps I never knew them). If so, it could be that an fflush
>and/or an fsync somewhere is what you need to fix this.
Good advice. I will speak privately with Laszlo Molnar and ask him if
he has a better idea of the way the internals work.
>You seem to be assuming that this is a Bash problem. Why do you
think
>that? Does Bash 2.03 work with this example?
A couple of folk who work on the VMS version of perl suggested in might
be a shell-related problem, so I promised I'd ask about it on this
list. I have no detailed knowledge to suggest whether they are right
or wrong, I just thought I'd ask over here to see if it was a known
(and possibly fixed) problem.
As for bash 2.03, the current development versions of perl will not
build or test at all with that version, which is why I switched to
v2.04.
As I said to Mark, I will try to work up a pure-bash example, if I
can. If I can't, then it is probably not a bash problem at all, as you
suggest.
I'll report back here soon.
---------------------------------------------------------
Peter J. Farley III (pjfarley AT dorsai DOT org OR
pjfarley AT banet DOT net)
- Raw text -