Yaribz has asked for the wisdom of the Perl Monks concerning the following question:
And here is the output when I just launch this program and try to enter "test1", "test2", "test3", "test4", "test5", and then the empty string to exit:use warnings; use strict; if(! $ENV{TEST}) { $ENV{TEST}=1; exec {$^X} ($^X,$0); } while(my $input=<STDIN>) { chomp($input); last unless($input); print "You typed: \"$input\"\n"; } print "Exiting\n";
On the other hand, if I run this program on Linux it works perfectly:D:\test>perl test.pl D:\test>test1 'test1' is not recognized as an internal or external command, operable + program or batch file. D:\test>test2 You typed: "test2" test3 'test3' is not recognized as an internal or external command, operable + program or batch file. D:\test>test4 You typed: "test4" test5 'test5' is not recognized as an internal or external command, operable + program or batch file. D:\test> Exiting
Any idea about what is causing this? Is there any known workaround for this problem? Thanks.~/test$ perl test.pl test1 You typed: "test1" test2 You typed: "test2" test3 You typed: "test3" test4 You typed: "test4" test5 You typed: "test5" Exiting ~/test$
|
|---|