Re: function named reset()

2005-04-08 Thread $Bill Luebkert
Chris Wagner wrote:

 That was a pretty nice demonstration of the diabolical power of references.
 ;) I think this illustrates one of the soft underbellies (read: feature)
 of Perl, which is that with unrestricted references ur never quite sure what
 entity it is ur dealing with.  I've never been a real fan of the reference
 system.  Atleast give us a choice to whether reference or pointer
 constructs.  Right now sometimes u have to guess what Perl is doing behind
 ur back and a lot of times it can come back to bite u.  I know it's nailed
 me quite a few times.  If I had my way implicit args would be abolished and
 I'ld really really love to see real arrays.  But now I digress.

Maybe a new pragma: use superstrict;  or  use strongtyping;

Which would arn you if you try to do anything questionable and then we'd
need an accompanying override symbol (if all the symbols haven't already
been used up) that says I know what I'm doing on this one, so don't warn
me.

I'm sure there are lots of people asking for stronger typing in the
future that could prevent lots of these gotchas.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--  o // //  Castle of Medieval Myth  Magic http://www.todbe.com/
-/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


superfluous mail messages

2005-04-08 Thread Сергей Черниенко
Hello Charles,

Friday, April 08, 2005, 11:50:39 AM, wrote:

CKC Chris Wagner  wrote:

CKC : I *always* call my own defined functions/subroutines with the 
CKC : prefix. It's just good practice.  Allowing the  to be omitted
CKC : just encourages bad programming practices.  And I'm sorry that
CKC : ur bad practice has finally caught up with u but pouting isn't
CKC : going to help anything.  If u truly knew what u were doing u
CKC : would know about the reset function or atleast how to look it
CKC : up in the book.  But I guess it's completely impracticle to
CKC : expect u to follow good practice in ur code.

CKC Chris, I think this is more a style practice than a good
CKC programming practice. I always avoid  and many contributors to
CKC this list also seem to avoid it. Personally, I attach a strong
CKC perl 4 stigma to its use. I have very rarely seen it used in
CKC modules written in the last few years. When I see its use I
CKC immediately think Oh crap, this guy is maintaining a really
CKC old script. Remembering the names of built-in functions becomes
CKC easier as we familiarize ourselves with perl or get better tools
CKC like syntax highlighting.



CKC HTH,

CKC Charles K. Clarkson

   and I receive this message every 5 minutes or so. Am I alone? Is this problem
   with list?

-- 
Best regards,
 Sergeymailto:[EMAIL PROTECTED]


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


change IE proxy settings

2005-04-08 Thread Ing. Branislav Gerzo (mail-lists)
Hello,

I have to change IE proxy settings via perl interface. I searched the
web for a long time, found something, coded too, but it doesn't work
:)

ok, my goal is enable, or disable proxy in IE. Here is code:

use strict;
use warnings;
use Win32::TieRegistry( Delimiter=/, ArrayValues=0 );
use Win32::API;

#proxy in IE is disabled now
my $regpath = 
'HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet 
Settings/';
my $penable = $regpath . 'ProxyEnable';
$Registry-{$penable}= '0x0001';
print my $pe = $Registry-{$penable}; #prints '0x0001', so value is stored
my $InternetSetOption = Win32::API-new(wininet, InternetSetOption, [qw(N N 
N N)], 'N');
$InternetSetOption-Call(0, 39, 0, 0) || die $!\n;
$InternetSetOption-Call(0, 37, 0, 0) || die $!\n;

Please help.

resources:
[1] 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/internetsetoption.asp
[2] 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/option_flags.asp
[3] http://aspn.activestate.com/ASPN/Mail/Message/pdk/1739515
[4] http://www.codeproject.com/internet/changeproxy1.asp


--

 --. ,--  ,- ICQ: 7552083  \|||/`//EB: www.2ge.us
,--' |  - |--IRC: [2ge](. .),\\SN: 2ge!2ge_us
`+==+=+===~  ~=-o00-(_)-00o-~
Death is the supreme festival on the road to freedom. D. Bonhoeffer
 



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: superfluous mail messages

2005-04-08 Thread Phil Dobbin
  wrote:
[...]
CKC HTH,

CKC Charles K. Clarkson
   and I receive this message every 5 minutes or so. Am I alone? Is this 
problem
   with list?
No I'm seeing them too. Just filter them to the spam bucket until it's 
sorted out...

Regards,
Phil.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Quotes problem

2005-04-08 Thread wardp
[EMAIL PROTECTED] wrote:

 I keep running into this problem and don't know the proper way to solve
 it:
 
 I have an external program that I want to run within another perl version:
 
my $timingexe = v:\\utilities\\logging\\logtime.plx ;
my $opts = \$start\ 
.\$endtime\ 
.\$batchname\ 
.\$env\ 
.\$subbatch\ 
.\$title\ 
.\$ExeName\ 
.\$Params\ 
.\$version\ 
.\$returncode\ 
.$tries;
 
print \n\n$opts\n\n;
 
system($timingexe.$opts);
 
 This is what the contents of $opts is:
 
 20050407 17:00:56 20050407 17:00:56 Numerix Dev
 N:\Development\Trades\ 112136_112136.xls 0.00 Range Accrual
  Pricing N:\Development\MarketData\MarketData.xls 3.1.1965.0 0 1
 
 Which is fine.
 
 However, from the called application, this is what it gets:
 
 Args
 
 20050407 17:00:56 20050407 17:00:56 Numerix Dev N:\Development\Trades
 112136_112136.xls 0.00 Range Accrual Pricing
  N:\Development\MarketData\MarketData.xls 3.1.1965.0 0 1
 
 Quotes are missing and therefore the args don't get passed properly.
 
 Is there a better way to do this? I am stuck with the calling method as I
 have a lot of legacy scripts and it needs to cover them all.
 
 Any hints?
FROM BILL:

Why is it that people can't post complete snippets ?

use strict;
use warnings;

foreach (@ARGV) {
print $_\n;
}
print \n;

my $timingexe = v:\\utilities\\logging\\logtime.plx ;
$timingexe = 'perl test.pl';# calling myself for testing

my $start = '20050407 17:00:56';
my $endtime = '20050407 17:00:56';
my $batchname = 'Numerix';
my $env = 'Dev';
my $subbatch = 'N:\Development\Trades'; # bad habit to end with a \
my $title = '112136_112136.xls';
my $ExeName = '0.00 Range Accrual Pricing';
my $Params = 'N:\Development\MarketData\MarketData.xls';
my $version = '3.1.1965.0';
my $returncode = '0';
my $tries = 1;
my $opts = qq{$start $endtime $batchname $env $subbatch $title}
.
  qq{ $ExeName $Params $version $returncode $tries};
print $opts\n;
print \n;
system $timingexe $opts if not @ARGV; # recurse just once

__END__

20050407 17:00:56 20050407 17:00:56 Numerix Dev
N:\Development\Trades
 112136_112136.xls 0.00 Range Accrual Pricing
N:\Development\MarketData\Mar
ketData.xls 3.1.1965.0 0 1

20050407 17:00:56
20050407 17:00:56
Numerix
Dev
N:\Development\Trades
112136_112136.xls
0.00 Range Accrual Pricing
N:\Development\MarketData\MarketData.xls
3.1.1965.0
0
1


Thanks to all for your help - the trailing \ on the tradedir was the real
problem. Apologies for not sending full code snippet and for my email
programs lack of skill putting the correct  in the reply.




__
This message may contain privileged information. If you have received this 
message by mistake, please keep it confidential and return it to the sender. 
Although we have taken steps to minimise the risk of transmitting software 
viruses, the EBRD accepts no liability for any loss or damage caused by 
computer viruses and would advise you to carry out your own virus checks. 
The contents of this e-mail do not necessarily represent the views of the EBRD.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
Chris Wagner  wrote:

: I *always* call my own defined functions/subroutines with the 
: prefix. It's just good practice.  Allowing the  to be omitted
: just encourages bad programming practices.  And I'm sorry that
: ur bad practice has finally caught up with u but pouting isn't
: going to help anything.  If u truly knew what u were doing u
: would know about the reset function or atleast how to look it
: up in the book.  But I guess it's completely impracticle to
: expect u to follow good practice in ur code.

Chris, I think this is more a style practice than a good
programming practice. I always avoid  and many contributors to
this list also seem to avoid it. Personally, I attach a strong
perl 4 stigma to its use. I have very rarely seen it used in
modules written in the last few years. When I see its use I
immediately think Oh crap, this guy is maintaining a really
old script. Remembering the names of built-in functions becomes
easier as we familiarize ourselves with perl or get better tools
like syntax highlighting.



HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Sorry about the extra messages: RE: function named reset()

2005-04-08 Thread Charles K. Clarkson

Don't know what happened there. Sorry about the extra messages.

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: change IE proxy settings

2005-04-08 Thread $Bill Luebkert
Ing. Branislav Gerzo (mail-lists) wrote:
 Hello,
 
 I have to change IE proxy settings via perl interface. I searched the
 web for a long time, found something, coded too, but it doesn't work
 :)
 
 ok, my goal is enable, or disable proxy in IE. Here is code:
 
 use strict;
 use warnings;
 use Win32::TieRegistry( Delimiter=/, ArrayValues=0 );
 use Win32::API;
 
 #proxy in IE is disabled now
 my $regpath = 
 'HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet 
 Settings/';
 my $penable = $regpath . 'ProxyEnable';
 $Registry-{$penable}= '0x0001';
 print my $pe = $Registry-{$penable}; #prints '0x0001', so value is stored
 my $InternetSetOption = Win32::API-new(wininet, InternetSetOption, [qw(N 
 N N N)], 'N');
 $InternetSetOption-Call(0, 39, 0, 0) || die $!\n;
 $InternetSetOption-Call(0, 37, 0, 0) || die $!\n;

Check out Win32::Internet instead of using the API:

use strict;
use warnings;
use Win32::Internet;
use Win32::TieRegistry (Delimiter = '/', ArrayValues = 0);

# proxy in IE is disabled now

my $regpath = 
'HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet Settings';
my $penable = $regpath/ProxyEnable;

my $pe = $Registry-{$penable};
print pe=$pe\n;

$Registry-{$penable} = '0x0001';

$pe = $Registry-{$penable};
print pe=$pe\n;

# try something like this instead of API (check docs in Win32::Internet)
# you'll have to play with it to get the desired results I assume - I have
# no experience with it.

my $I = new Win32::Internet('', INTERNET_OPEN_TYPE_PROXY, 'your-proxy-host') 
or
  die new Win32::Internet: $! ($^E);

__END__


-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--  o // //  Castle of Medieval Myth  Magic http://www.todbe.com/
-/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Sorry about the extra messages: RE: function named reset()

2005-04-08 Thread $Bill Luebkert
Charles K. Clarkson wrote:

 Don't know what happened there. Sorry about the extra messages.

I keep tolding ya and tolding ya - quit using that M$ email crap.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--  o // //  Castle of Medieval Myth  Magic http://www.todbe.com/
-/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: function named reset()

2005-04-08 Thread John Deighan
At 05:35 PM 4/7/2005, Chris Wagner wrote:
I *always* call my own defined functions/subroutines with the  prefix.
It's just good practice.  Allowing the  to be omitted just encourages bad
programming practices.  And I'm sorry that ur bad practice has finally
caught up with u but pouting isn't going to help anything.  If u truly knew
what u were doing u would know about the reset function or atleast how to
look it up in the book.  But I guess it's completely impracticle to expect u
to follow good practice in ur code.
I think that you'd better get off your soapbox until you've thought things 
through.

The bottom line is, you go out an buy some standard Perl books, you program
the way it's shown there. Things seem to always work correctly until one day
you write a function named reset(), assuming that when you call it, it will
actually be executed, just like all the other functions you've used for years,
but it's not. Does it mean your boss gets incorrect data? Does it mean the
space shuttle crashes? Who knows?
I'll bet if you asked 90% of Perl programmers what 'reset' does - they 
won't have any idea. That should tell you something. I'll also bet that if 
you look at 90% of Perl code, you won't see what you characterize as good 
practice. If I'm not mistaken, the 'P' stands for practical.

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Inline::CPP

2005-04-08 Thread Sisyphus


- Original Message - 
From: Lloyd Sartor [EMAIL PROTECTED]
To: perl-win32-users@listserv.ActiveState.com
Sent: Friday, April 08, 2005 11:19 PM
Subject: Inline::CPP


 Can anyone tell me where I can find a working Inline::CPP for Win32?


Try cpan :-)

As was mentioned a few days back, there might be problems with some
compilers on Win32 - but I thought we covered those issues. What's the
problem you've come up against ?

Cheers,
Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Inline::CPP

2005-04-08 Thread $Bill Luebkert
Sisyphus wrote:

 Try cpan :-)
 
 As was mentioned a few days back, there might be problems with some
 compilers on Win32 - but I thought we covered those issues. What's the
 problem you've come up against ?

If there were no problems, it would be available via PPM somewhere.  :)

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--  o // //  Castle of Medieval Myth  Magic http://www.todbe.com/
-/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Inline::CPP

2005-04-08 Thread Lloyd Sartor
$Bill wrote on 04/08/2005 09:23:03 AM:

 Sisyphus wrote:
 
  Try cpan :-)
  
  As was mentioned a few days back, there might be problems with some
  compilers on Win32 - but I thought we covered those issues. What's the
  problem you've come up against ?
 
 If there were no problems, it would be available via PPM somewhere.  :)
 

I need to link functions from a vendor's CPP source to a Perl program. 
(Inline::C doesn't find the functions because of the name mangling.) The 
ActiveState web site does not indicate that Inline::CPP is available for 
Win32. Am I SOL?

Lloyd
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: function named reset()

2005-04-08 Thread John Deighan


Here's something I found on the 'perldiag' man page:
Ambiguous call resolved as CORE::%s(), qualify as
such or use 
(W ambiguous) A subroutine you have declared has the same name as a
Perl keyword, and you have used the name without qualification for
calling one or the other. Perl decided to call the builtin because the
subroutine is not imported. 
To force interpretation as a subroutine call, either put an ampersand
before the subroutine name, or qualify the name with its package.
Alternatively, you can import the subroutine (or pretend that it's
imported with the use subs pragma).
To silently interpret it as the Perl operator, use the CORE:: prefix on
the operator (e.g.

CORE::log($x)) or declare the subroutine to be an object method (see

Subroutine Attributes in the perlsub manpage or
the attributes
manpage).

However, I can't get this warning to appear. Is it that 'reset' isn't a
'keyword'? Simple example script below. Note that, as mentioned by
others, if I change the line reset(); to
reset(); or main::reset(), the function is
called. However, what I want is to get at least a warning whenever I
attempt an ambiguous call, just as the perldiag entry says. Any ideas? (
I have tried explicitly using 'use warnings ambiguous;' - no
effect).
use strict;
use warnings all;
reset();
print(OK\n);
# --
sub reset {
print(resetting...\n);
}


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Sorry about the extra messages: RE: function named reset()

2005-04-08 Thread Chris Wagner
:D Trying to send me a message there, eh?

At 06:18 AM 4/8/05 -0500, Charles K. Clarkson wrote:

Don't know what happened there. Sorry about the extra messages.






--
REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =--
...ne cede males

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Peter Eisengrein

 To force interpretation as a subroutine call, either put an ampersand
before the 
 subroutine name, or qualify the name with its package. Alternatively, you
can 
 import the subroutine (or pretend that it's imported with the use subs
pragma).

'use subs' doesn't seem to always work, though. when you do it with reset()
it works, but I tried grep() and it doesn't, but grep() and main::grep do.

Hmmm


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread Charles K. Clarkson
John Deighan  wrote:

[snip]
: However, I can't get this warning to appear. Is it that
: 'reset' isn't a 'keyword'?
[snip]

 No. You just gave up too quickly.

#!/usr/bin/perl

use strict;
use warnings;
use diagnostics;

sub reset;

print reset();

sub reset {
return resetting...\n;
}

__END__


OR:

use strict;
use warnings;
use diagnostics;

sub reset {
return resetting...\n;
}

print reset();


__END__


HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: function named reset()

2005-04-08 Thread John Deighan
At 02:40 PM 4/8/2005, Charles K. Clarkson wrote:
John Deighan  wrote:
[snip]
: However, I can't get this warning to appear. Is it that
: 'reset' isn't a 'keyword'?
[snip]
 No. You just gave up too quickly.
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
sub reset;
print reset();
sub reset {
return resetting...\n;
}
Thanks for the tip. However, it turns out to have nothing to do with use 
diagnostics. The warning appears (when compiling as well as executing, 
which is great), if and only if the subroutine is declared or defined 
before being called. Compare the following 3 programs:

1. This one generates no warnings, either at compile or run time:
use strict;
use warnings;
reset();
print(OK\n);
sub reset { print(resetting...\n); }
2. This one generates the ambiguous call warning AND a prototype mismatch 
warning:

use strict;
use warnings;
sub reset();
reset();
print(OK\n);
sub reset { print(resetting...\n); }
3. This one generates just the ambiguous call warning:
use strict;
use warnings;
sub reset { print(resetting...\n); }
reset();
print(OK\n);
Everyone - thanks for all your help and interesting discussion.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Inline::CPP

2005-04-08 Thread Sisyphus

- Original Message - 
From: Lloyd Sartor [EMAIL PROTECTED]
Cc: perl-win32-users@listserv.ActiveState.com
Sent: Saturday, April 09, 2005 1:00 AM
Subject: Re: Inline::CPP


 $Bill wrote on 04/08/2005 09:23:03 AM:

  Sisyphus wrote:
 
   Try cpan :-)
  
   As was mentioned a few days back, there might be problems with some
   compilers on Win32 - but I thought we covered those issues. What's the
   problem you've come up against ?
 
  If there were no problems, it would be available via PPM somewhere.  :)
 

That's correct - but those (2) problems were discussed a few days back in
the thread 'More on Re: Windows DLL - Perl Interface' which op was
following.

 I need to link functions from a vendor's CPP source to a Perl program.
 (Inline::C doesn't find the functions because of the name mangling.) The
 ActiveState web site does not indicate that Inline::CPP is available for
 Win32. Am I SOL?


Go to http://search.cpan.org/~neilw/Inline-CPP-0.25/ and click on the
'Download' link. Extract the downloaded file to some folder and cd to that
folder. As was mentioned in a link provided in that other thread, starting
at about line 44 of CPP.pm you have:

#ifndef bool
#include %iostream%
#endif
extern C {
#include EXTERN.h
#include perl.h

Add #include math.h to the top of that list - so it reads:

#include math.h
#ifndef bool
#include %iostream%
#endif
extern C {
#include EXTERN.h
#include perl.h

Then run, in succession,
perl makefile.pl
nmake test
nmake install

The last test in the test suite will fail (with VC++ 6.0) - not sure why,
but it probably won't lead to any problems for you. If it does, let us know.

I assume you are using VC++ 6.0.

Cheers,
Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


perlctrl tk activex

2005-04-08 Thread mailware
hi all,

what win32-api calls can i make in order to create a client-side activex gui
control that can be embedded in an application or internet explorer, using 
perlctrl.

I realize this cannot be done *just using* perlctrl code. 
What perl win32::api calls can be made to make it work, and in what order?

Has anyone hacked this problem before?

example code would be great!

Thanks in advance,
-Jeremy A.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: change IE proxy settings

2005-04-08 Thread MJG
If you have the system.adm file from an active directory server, you can
see how that sets the value.  IF you are using a 200/2003 server not in
AD, you can apply that adm locally, or just use AD GPOs to keep it
simple.  IF this is your environment to begin with.

-Original Message-
From: $Bill Luebkert [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 6:52 AM
To: Ing. Branislav Gerzo (mail-lists)
Cc: perl-win32-users@listserv.ActiveState.com
Subject: Re: change IE proxy settings

Ing. Branislav Gerzo (mail-lists) wrote:
 Hello,
 
 I have to change IE proxy settings via perl interface. I searched the
 web for a long time, found something, coded too, but it doesn't work
 :)
 
 ok, my goal is enable, or disable proxy in IE. Here is code:
 
 use strict;
 use warnings;
 use Win32::TieRegistry( Delimiter=/, ArrayValues=0 );
 use Win32::API;
 
 #proxy in IE is disabled now
 my $regpath =
'HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet
Settings/';
 my $penable = $regpath . 'ProxyEnable';
 $Registry-{$penable}= '0x0001';
 print my $pe = $Registry-{$penable}; #prints '0x0001', so value
is stored
 my $InternetSetOption = Win32::API-new(wininet,
InternetSetOption, [qw(N N N N)], 'N');
 $InternetSetOption-Call(0, 39, 0, 0) || die $!\n;
 $InternetSetOption-Call(0, 37, 0, 0) || die $!\n;

Check out Win32::Internet instead of using the API:

use strict;
use warnings;
use Win32::Internet;
use Win32::TieRegistry (Delimiter = '/', ArrayValues = 0);

# proxy in IE is disabled now

my $regpath =
'HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet
Settings';
my $penable = $regpath/ProxyEnable;

my $pe = $Registry-{$penable};
print pe=$pe\n;

$Registry-{$penable} = '0x0001';

$pe = $Registry-{$penable};
print pe=$pe\n;

# try something like this instead of API (check docs in Win32::Internet)
# you'll have to play with it to get the desired results I assume - I
have
# no experience with it.

my $I = new Win32::Internet('', INTERNET_OPEN_TYPE_PROXY,
'your-proxy-host') or
  die new Win32::Internet: $! ($^E);

__END__


-- 
  ,-/-  __  _  _ $Bill Luebkert
Mailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--  o // //  Castle of Medieval Myth  Magic
http://www.todbe.com/
-/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs