On Sat, Dec 1, 2012 at 10:06 PM, boB Stepp <robertvst...@gmail.com> wrote:
> On Sat, Dec 1, 2012 at 11:58 PM, Charles DeRykus <dery...@gmail.com> wrote:
>> On Sat, Dec 1, 2012 at 8:50 PM, boB Stepp <robertvst...@gmail.com> wrote:
>>>
>>> What I would like to do is make chcp 65001 the default behavior of the
>>> command console without having to either retype it manually or place
>>> it in each and every script for each time I open the command prompt.
>>> Secondarily, I would like to eliminate what appears to be Windows
>>> informational message of "Active code page: 65001".
>>
>>
>>      On the command line, I believe you just redirecto to nul:
>>
>>               chch 2>nul
>>
>>     From a  perl program:  use the File::Spec sequence I showed earlier
>>
> I earlier tried this as you suggested, but it did not seem to work.
> Perhaps I am misunderstanding something?

Normally, it should.  chcp may be doing something with stderr
directly in which case you'll need to use backticks after all.

This seems to work:

     my $status = qx{chcp 2>nul};
     die "chcp error: $?" if $?;

-- 
Charles DeRykus



-- 
Charles DeRykus

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to