www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/10/24/21:34:56

Message-Id: <4.3.1.0.20001024211121.00ac9ac0@pop5.banet.net>
X-Sender: usbanet DOT farley3 AT pop5 DOT banet DOT net
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Tue, 24 Oct 2000 21:35:47 -0400
To: djgpp-workers AT delorie DOT com
From: "Peter J. Farley III" <pjfarley AT banet DOT net>
Subject: Re: Bash 2.04 beta 6a
Cc: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
In-Reply-To: <Pine.SUN.3.91.1001024093137.24828H-100000@is>
References: <4 DOT 3 DOT 1 DOT 0 DOT 20001023205604 DOT 00b0edf0 AT pop5 DOT banet DOT net>
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019