develooper Front page | perl.perl5.porters | Postings from November 2000

[ID 20001120.005] Perl bug report

Thread Next
Judah Greenblatt
November 20, 2000 09:38
[ID 20001120.005] Perl bug report
Message ID:
This is a bug report for perl from,
generated with the help of perlbug 1.28 running under perl v5.6.0.

[Please enter your report here]

On Windows-NT only, quoted tabs in the command line of a pipe open
are translated to spaces.  The following program demonstrates the

	# demonstrate bug with NT pipe open

	open(XX, "echo \"\t\" |")
	  or die "cannot open pipe: $!\n";

	$i = <XX>;
	close XX;
	chomp $i;
	printf "|%s| (%03o)\n", $i, ord($i);

The program should print
	|	| (011)
but instead it prints
	| | (040)

This program works correctly on a Sun Sparc, and works correctly on NT
using Perl 5.004_04.

The error seems to be in nt/win32.c where it splits the shell
command into words.

Workaround:  If the command for the pipe contains unquoted
shell redirects such  as "</dev/null", the command will be passed to
the NT shell cm

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About