Re: Passing command line options with ActivePerl

2004-05-25 Thread Dirk Bremer \(NISC\)
- Original Message - 
From: "Mike Trotman" <[EMAIL PROTECTED]>
To: "Frank D. Gunseor" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "TELARO BARTOLOMEO"
<[EMAIL PROTECTED]>
Sent: Tuesday, May 25, 2004 08:58
Subject: Re: Passing command line options with ActivePerl


> Do you have another program in your path called 'test'?
> (e.g. some shells have a built-in called 'test' - and its an obvious
> name (though a bad idea) to use on many projects).
> Can you run 'which test' - to see where your machine thinks 'test' is?
> Or can you run '.\test 1 2 3.?
>
> I only mention this as once - many years ago - I wasted a whole day on
> something exactly like this.
>
>

On my machine, a search of the ActiveState installation reveals multiple
instances of test.pl in multiple directories, so naming your own script
test.pl is not a good idea.

Dirk Bremer - Systems Programmer II - ESS/AMS  - NISC St. Peters
USA Central Time Zone
636-922-9158 ext. 8652 fax 636-447-4471

[EMAIL PROTECTED]
www.nisc.cc


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Passing command line options with ActivePerl

2004-05-25 Thread Mike Trotman
Do you have another program in your path called 'test'?
(e.g. some shells have a built-in called 'test' - and its an obvious 
name (though a bad idea) to use on many projects).
Can you run 'which test' - to see where your machine thinks 'test' is?
Or can you run '.\test 1 2 3.?

I only mention this as once - many years ago - I wasted a whole day on 
something exactly like this.

Frank D. Gunseor wrote:
I have often wondered about this, too.
On an W2k box and an XP box running ActivePerl redirection sometimes only
works when the perl executable is explicity stated on the command line.
???
Frank
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
TELARO BARTOLOMEO
Sent: Monday, May 24, 2004 8:22 AM
To: 'Paul Stepowski '; '[EMAIL PROTECTED] '
Subject: R: Passing command line options with ActivePerl
on my XP box with active perl it works fine calling only d:\>test 1 2 3

-Messaggio originale-
Da: Paul Stepowski
A: [EMAIL PROTECTED]
Inviato: 24/05/04 1.33
Oggetto: Re: Passing command line options with ActivePerl
Still no luck.  I'm using Windows 2000 Pro, by the way.
C:\>assoc | grep "\.pl"
File STDIN:
.pl=perl
C:\>ftype | grep perl
File STDIN:
perl=c:\ActiveState\Perl\Bin\perl.exe %1 %*
C:\>set | grep PATHEXT
File STDIN:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PL;.pl
output:
C:\>test 1 2 3
C:\>
It works when I call it with perl explicitly
C:\>perl test.pl 1 2 3
1
2
3
Any ideas why this?

 

From: "Gerry Green" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: Passing command line options with ActivePerl
Date: Sun, 23 May 2004 18:47:51 -0400
MIME-Version: 1.0
Received: from listserv.activestate.com ([209.17.183.249]) by
mc6-f33.hotmail.com with Microsoft SMTPSVC(5.0.2195.6713); Sun, 23 May
   

2004
 

15:51:49 -0700
Received: from listserv.activestate.com (localhost.localdomain
[127.0.0.1])by listserv.activestate.com (8.12.10/8.12.10) with ESMTP id
   

 

i4NMnoZU020229;Sun, 23 May 2004 15:50:01 -0700(envelope-from
[EMAIL PROTECTED])
Received: from smtp3.ActiveState.com (latte.activestate.com
[192.168.4.252])by listserv.activestate.com (8.12.10/8.12.10) with
   

ESMTP
 

idi4NMm2S4019884 for <[EMAIL PROTECTED]>;Sun,
   

23
 

May 2004 15:48:02 -0700(envelope-from [EMAIL PROTECTED])
Received: from smtp5.ActiveState.com (sack.ActiveState.com
[192.168.2.149](may be forged))by smtp3.ActiveState.com (8.12.9/8.12.9)
   

 

with ESMTP id i4NMm2WT009524for <[EMAIL PROTECTED]>;
   

Sun, 23
 

May 2004 15:48:02 -0700
Received: from cartman (dhcp16477090.woh.rr.com [24.164.77.90])by
smtp5.ActiveState.com (8.12.11/8.12.11) with ESMTP id i4NMlw8Z025532for
   

 

<[EMAIL PROTECTED]>; Sun, 23 May 2004 15:47:59
-0700(envelope-from [EMAIL PROTECTED])
Received: from STAN ([192.168.0.171]) by cartman with
MicrosoftSMTPSVC(6.0.3790.0); Sun, 23 May 2004 18:45:34 -0400
X-Message-Info: JGTYoYF78jGhy23XF/dP6mizWooRV7XL
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-OriginalArrivalTime: 23 May 2004 22:45:34.0885
(UTC)FILETIME=[A9038550:01C44117]
X-PMX-Version: 4.6.0.99824, Antispam-Core: 4.6.0.99824,Antispam-Data:
2004.5.22.101440
X-PerlMx-Spam: Gauge=, Probability=8%, Report='CLICK_BELOW
0.089,__OUTLOOK_MSGID_1 0, __SANE_MSGID 0, __TO_MALFORMED_2
   

0,__REFERENCES
 

0, __MIME_VERSION 0, __EVITE_CTYPE 0,__CTYPE_CHARSET_QUOTED 0,
__CT_TEXT_PLAIN 0, __CT 0, __CTE 0,__HAS_X_PRIORITY 0, __HAS_MSMAIL_PRI
   

0,
 

__OUTLOOK_MUA_1 0,__HAS_X_MAILER 0, __ANY_OUTLOOK_MUA 0,
__HAS_OUTLOOK_IN_MAILER 0,__HAS_MIMEOLE 0, __HAS_XOAT 0, __CLICK_BELOW
0,QUOTED_EMAIL_TEXT 0, __MIME_TEXT_ONLY 0, __OUTLOOK_MUA 0,__HAS_MSGID
   

0,
 

REFERENCES 0.000'
X-BeenThere: [EMAIL PROTECTED]
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: Discussions relating to ActivePerl on Win32
platforms
List-Unsubscribe:
<http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users>,
   

ilto:[EMAIL PROTECTED]
be>
 

List-Archive:
<http://ASPN.ActiveState.com/ASPN/Mail/Browse/Threaded/perl-win32-users
List-Post: <mailto:[EMAIL PROTECTED]>
List-Help:
<mailto:[EMAIL PROTECTED]>
List-Subscribe:
<http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users>,
   

ilto:[EMAIL PROTECTED]
 

Errors-To: [EMAIL PROTECTED]
Return-Path: [EMAIL PROTECTED]
Paul, try modifying the "PATHEXT" environment variable to include .pl.
   

(add
 

a semicolon, followed by .pl)
To temporarily set it you can enter this at a command prompt:
   set PATHEXT=%PATHEXT%;.PL
To set it permanently go into the control panel and the system applet.
When you do this you don't even have to enter the .pl extension, just
"test"
is enough to run your 

Re: Passing command line options with ActivePerl

2004-05-24 Thread Paul Stepowski
I finally got it working.  I have no idea why it wasn't working in the first 
place (damn Windoze).

To fix it I clicked:
Explorer -> Tools -> Folder Options -> File Types
Scrolled down to "PL - PL File"
Clicked "Restore"
The output is now:
C:\>test.pl 1 2 3
1
2
3
Go figure.  Thanks for everyone's help. :-)
Cheers,
Paul

I have no idea why it's not picking up the arguments.
From: Triffid Hunter <[EMAIL PROTECTED]>
To: Paul Stepowski <[EMAIL PROTECTED]>
Subject: Re: Passing command line options with ActivePerl
Date: Mon, 24 May 2004 11:54:29 +1000
MIME-Version: 1.0
Received: from telenet.net.au ([202.9.50.44]) by mc10-f34.hotmail.com with 
Microsoft SMTPSVC(5.0.2195.6824); Sun, 23 May 2004 18:50:07 -0700
Received: (qmail 14149 invoked by uid 503); 24 May 2004 01:50:05 -
Received: from evo.telenet.net.au (HELO telenet.net.au) (202.9.50.45)  by 
kribensis.telenet.net.au with SMTP; 24 May 2004 01:50:05 -
Received: (qmail 27849 invoked by uid 503); 24 May 2004 01:50:04 -
Received: from dsl-203-142-128-47.bne.directcorp.net.au (HELO 
funkmunch.merseine.nu) (203.142.128.47)  by evo.telenet.net.au with SMTP; 
24 May 2004 01:50:04 -
Received: from nazgul ([192.168.0.253])by funkmunch.merseine.nu 
(8.12.3/8.12.3/Debian-6.6) with ESMTP id i4O1o1Ws005612(version=TLSv1/SSLv3 
cipher=RC4-SHA bits=128 verify=NO)for <[EMAIL PROTECTED]>; Mon, 24 May 
2004 11:50:03 +1000
X-Message-Info: JGTYoYF78jHOTjL7vqBaOyDTmY3MmwYn
References: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Organization: Roadkill Entertainment
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Opera7.23/Win32 M2 build 3227
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 24 May 2004 01:50:07.0381 (UTC) 
FILETIME=[70BC5450:01C44131]

try this
C:\>ftype perl=c:\Perl\bin\perl.exe -w "%1" %*
see if it tells you anything more :)
also look at your event logs for information...

On Mon, 24 May 2004 11:05:42 +1000, Paul Stepowski <[EMAIL PROTECTED]> 
wrote:

From: Michael D Schleif <[EMAIL PROTECTED]>
To: perl-win32-users mailing list 
<[EMAIL PROTECTED]>
Subject: Re: Passing command line options with ActivePerl
Date: Sun, 23 May 2004 18:56:46 -0500
MIME-Version: 1.0
Received: from listserv.activestate.com ([209.17.183.249]) by 
mc2-f24.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Sun, 23 May 
2004 16:59:48 -0700
Received: from listserv.activestate.com (localhost.localdomain 
[127.0.0.1])by listserv.activestate.com (8.12.10/8.12.10) with ESMTP id 
i4NNvnZP001515;Sun, 23 May 2004 16:58:03 -0700(envelope-from 
[EMAIL PROTECTED])
Received: from smtp7.ActiveState.com 
(percolator.ActiveState.com[192.168.2.13])by listserv.activestate.com 
(8.12.10/8.12.10) with ESMTP idi4NNuoS4001315 for 
<[EMAIL PROTECTED]>;Sun, 23 May 2004 16:56:50 
-0700 (envelope-from [EMAIL PROTECTED])
Received: from mail.private.network 
(c-24-15-228-181.client.comcast.net[24.15.228.181])by 
smtp7.ActiveState.com (8.12.10/8.12.10) with SMTP id i4NNulVm009561for 
<[EMAIL PROTECTED]>;Sun, 23 May 2004 16:56:48 
-0700 (PDT) (envelope-from [EMAIL PROTECTED])
Received: (qmail 19592 invoked from network); 23 May 2004 23:56:47 -
Received: from unknown (HELO bragi.private.network) (192.168.123.150)by 
trout.private.network with SMTP; 23 May 2004 23:56:47 -
Received: from mds by bragi.private.network with local (Exim 3.36 #1 
(Debian))id 1BS2pi-000516-00; Sun, 23 May 2004 18:56:46 -0500
X-Message-Info: 6sSXyD95QpVNx3Ihe89mz8spSMXPmJMK
Message-ID: <[EMAIL PROTECTED]>
Mail-Followup-To: perl-win32-users mailing 
list<[EMAIL PROTECTED]>
References: 
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
X-PGP-Key: http://helices.org/.gnupg/.2B54429C
User-Agent: Mutt/1.5.5.1+cvs20040105i
X-PMX-Version: 4.6.0.99824, Antispam-Core: 4.6.0.99824,Antispam-Data: 
2004.5.23.101441
X-BeenThere: [EMAIL PROTECTED]
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: Discussions relating to ActivePerl on Win32 
platforms
List-Unsubscribe: 
<http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users>,<mailto:[EMAIL PROTECTED]>
List-Archive: 
<http://ASPN.ActiveState.com/ASPN/Mail/Browse/Threaded/perl-win32-users>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Help: 
<mailto:[EMAIL PROTECTED]>
List-Subscribe: 
<http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users>,<mailto:[EMAIL PROTECTED]>
Errors-To: [EMAIL PROTECTED]
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 23 May 2004 23:59:48.0650 (UTC) 
FILETIME=[07AA20A0:01C44122]

* Paul Stepowski <[EMAIL PROTECTED]> [2004:05:24:09:33:35+1000] 
scribed:
> Still no luck.  I'm using Windows 2000 Pro, by the way.
>
> C:\>assoc | grep "\.pl"
> File STDIN:
> .pl=perl
>
> C:\>ftype | grep perl
> File STDIN:
> perl=c:\ActiveState\Perl\Bin\perl.exe %1 %*
>
&

Re: Passing command line options with ActivePerl

2004-05-23 Thread Paul Stepowski
From: Michael D Schleif <[EMAIL PROTECTED]>
To: perl-win32-users mailing list 
<[EMAIL PROTECTED]>
Subject: Re: Passing command line options with ActivePerl
Date: Sun, 23 May 2004 18:56:46 -0500
MIME-Version: 1.0
Received: from listserv.activestate.com ([209.17.183.249]) by 
mc2-f24.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Sun, 23 May 2004 
16:59:48 -0700
Received: from listserv.activestate.com (localhost.localdomain 
[127.0.0.1])by listserv.activestate.com (8.12.10/8.12.10) with ESMTP id 
i4NNvnZP001515;Sun, 23 May 2004 16:58:03 -0700(envelope-from 
[EMAIL PROTECTED])
Received: from smtp7.ActiveState.com 
(percolator.ActiveState.com[192.168.2.13])by listserv.activestate.com 
(8.12.10/8.12.10) with ESMTP idi4NNuoS4001315 for 
<[EMAIL PROTECTED]>;Sun, 23 May 2004 16:56:50 -0700 
(envelope-from [EMAIL PROTECTED])
Received: from mail.private.network 
(c-24-15-228-181.client.comcast.net[24.15.228.181])by smtp7.ActiveState.com 
(8.12.10/8.12.10) with SMTP id i4NNulVm009561for 
<[EMAIL PROTECTED]>;Sun, 23 May 2004 16:56:48 -0700 
(PDT) (envelope-from [EMAIL PROTECTED])
Received: (qmail 19592 invoked from network); 23 May 2004 23:56:47 -
Received: from unknown (HELO bragi.private.network) (192.168.123.150)by 
trout.private.network with SMTP; 23 May 2004 23:56:47 -
Received: from mds by bragi.private.network with local (Exim 3.36 #1 
(Debian))id 1BS2pi-000516-00; Sun, 23 May 2004 18:56:46 -0500
X-Message-Info: 6sSXyD95QpVNx3Ihe89mz8spSMXPmJMK
Message-ID: <[EMAIL PROTECTED]>
Mail-Followup-To: perl-win32-users mailing 
list<[EMAIL PROTECTED]>
References: 
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
X-PGP-Key: http://helices.org/.gnupg/.2B54429C
User-Agent: Mutt/1.5.5.1+cvs20040105i
X-PMX-Version: 4.6.0.99824, Antispam-Core: 4.6.0.99824,Antispam-Data: 
2004.5.23.101441
X-BeenThere: [EMAIL PROTECTED]
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: Discussions relating to ActivePerl on Win32 
platforms
List-Unsubscribe: 
<http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users>,<mailto:[EMAIL PROTECTED]>
List-Archive: 
<http://ASPN.ActiveState.com/ASPN/Mail/Browse/Threaded/perl-win32-users>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Help: 
<mailto:[EMAIL PROTECTED]>
List-Subscribe: 
<http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users>,<mailto:[EMAIL PROTECTED]>
Errors-To: [EMAIL PROTECTED]
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 23 May 2004 23:59:48.0650 (UTC) 
FILETIME=[07AA20A0:01C44122]

* Paul Stepowski <[EMAIL PROTECTED]> [2004:05:24:09:33:35+1000] 
scribed:
> Still no luck.  I'm using Windows 2000 Pro, by the way.
>
> C:\>assoc | grep "\.pl"
> File STDIN:
> .pl=perl
>
> C:\>ftype | grep perl
> File STDIN:
> perl=c:\ActiveState\Perl\Bin\perl.exe %1 %*
>
> C:\>set | grep PATHEXT
> File STDIN:
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PL;.pl
>
> output:
>
> C:\>test 1 2 3
>
> C:\>
>
> It works when I call it with perl explicitly
>
> C:\>perl test.pl 1 2 3
> 1
> 2
> 3
>
> Any ideas why this?
>
> >From: "Gerry Green" <[EMAIL PROTECTED]>
> >
> >Paul, try modifying the "PATHEXT" environment variable to include .pl. 
(add
> >a semicolon, followed by .pl)
> >
> >To temporarily set it you can enter this at a command prompt:
> >
> >set PATHEXT=%PATHEXT%;.PL
> >
> >To set it permanently go into the control panel and the system applet.
> >
> >When you do this you don't even have to enter the .pl extension, just
> >"test"
> >is enough to run your script, and the parameters are properly passed.

What do you get when you do what I just did on my w2k box?
C:\>assoc .pl
.pl=Perl
C:\>ftype Perl
Perl="C:\Perl\bin\perl.exe" "%1" %*
C:\>assoc .pl
.pl=perl
C:\>ftype perl
perl=c:\Perl\bin\perl.exe "%1" %*
C:\>set PATHEXT
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PL;.pl
---snip---
#!c:\Perl\bin\perl
# test.pl
foreach (@ARGV) {
 print("$_\n");
}
---snip---
C:\>test.pl 1 2 3
C:\>
C:\>perl test.pl 1 2 3
1
2
3
No idea why this is?
hth
--
Best Regards,
mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--
<< signature.asc >>
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_
Find love today with ninemsn personals. Click here:  
http://ninemsn.match.com?referrer=hotmailtagline

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Passing command line options with ActivePerl

2004-05-23 Thread Michael D Schleif
* Paul Stepowski <[EMAIL PROTECTED]> [2004:05:24:09:33:35+1000] scribed:
> Still no luck.  I'm using Windows 2000 Pro, by the way.
> 
> C:\>assoc | grep "\.pl"
> File STDIN:
> .pl=perl
> 
> C:\>ftype | grep perl
> File STDIN:
> perl=c:\ActiveState\Perl\Bin\perl.exe %1 %*
> 
> C:\>set | grep PATHEXT
> File STDIN:
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PL;.pl
> 
> output:
> 
> C:\>test 1 2 3
> 
> C:\>
> 
> It works when I call it with perl explicitly
> 
> C:\>perl test.pl 1 2 3
> 1
> 2
> 3
> 
> Any ideas why this?
> 
> >From: "Gerry Green" <[EMAIL PROTECTED]>
> >
> >Paul, try modifying the "PATHEXT" environment variable to include .pl. (add
> >a semicolon, followed by .pl)
> >
> >To temporarily set it you can enter this at a command prompt:
> >
> >set PATHEXT=%PATHEXT%;.PL
> >
> >To set it permanently go into the control panel and the system applet.
> >
> >When you do this you don't even have to enter the .pl extension, just 
> >"test"
> >is enough to run your script, and the parameters are properly passed.

What do you get when you do what I just did on my w2k box?

C:\>assoc .pl
.pl=Perl

C:\>ftype Perl
Perl="C:\Perl\bin\perl.exe" "%1" %*

hth

-- 
Best Regards,

mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--


signature.asc
Description: Digital signature
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Passing command line options with ActivePerl

2004-05-23 Thread Michael D Schleif
* Paul Stepowski <[EMAIL PROTECTED]> [2004:05:24:09:24:52+1000] scribed:
> Michael,
> 
> I was not asking how to associate .pl files with the perl executable but 
> how to pass the parameters when .pl are already associate with perl.exe
> 
> Thanks,
> 
> Paul
> 
> >From: Michael D Schleif <[EMAIL PROTECTED]>
> >
> >* Paul Stepowski <[EMAIL PROTECTED]> [2004:05:24:07:54:01+1000] 
> >scribed:
> >> Hi Bill,
> >>
> >> Thanks, it work when I prefix it with "perl", e.g.:
> >>
> >> c:\>perl test.pl 1 2
> >> 1
> >> 2
> >>
> >> C:\>
> >>
> >> Ideally I'd want to get around this so I only to type the name of the
> >> script.  Do you know if there's a way of confuring Windows to relay the
> >> command line args if the program is called using a file extension (.pl)
> >> association?
> >
> >
> >> >Try explicitly calling Perl (depending on which Windoze & shell, you 
> >may be
> >> >able to properly associate Perl to .pl and getting the results you 
> >wanted)
> >
> >As $Bill stated, this is a function of windows file types, as opposed to
> >being an activeperl issue.
> >
> >Which version of windows are you using?
> >
> >Go here:
> >
> >windows explorer
> >tools
> >folder options
> >file types
> >
> >On my w2k box, I scroll down to PL and see that this is associated with
> >perl.exe.
> >
> >It appears that windows does not know what to do with test.pl, unless
> >prefixed by perl itself, and proper file type association should correct
> >this.
> >
> >hth

Again, which version of windows?

Your problem is indicative of no file type association.  Your exact
program works -- *WITHOUT* pre-pending perl on the commandline -- from
my w2k box.  So, we need more information from you in order to help
further.

What do you think?

-- 
Best Regards,

mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--


signature.asc
Description: Digital signature
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Passing command line options with ActivePerl

2004-05-23 Thread Paul Stepowski
Still no luck.  I'm using Windows 2000 Pro, by the way.
C:\>assoc | grep "\.pl"
File STDIN:
.pl=perl
C:\>ftype | grep perl
File STDIN:
perl=c:\ActiveState\Perl\Bin\perl.exe %1 %*
C:\>set | grep PATHEXT
File STDIN:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PL;.pl
output:
C:\>test 1 2 3
C:\>
It works when I call it with perl explicitly
C:\>perl test.pl 1 2 3
1
2
3
Any ideas why this?


From: "Gerry Green" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: Passing command line options with ActivePerl
Date: Sun, 23 May 2004 18:47:51 -0400
MIME-Version: 1.0
Received: from listserv.activestate.com ([209.17.183.249]) by 
mc6-f33.hotmail.com with Microsoft SMTPSVC(5.0.2195.6713); Sun, 23 May 2004 
15:51:49 -0700
Received: from listserv.activestate.com (localhost.localdomain 
[127.0.0.1])by listserv.activestate.com (8.12.10/8.12.10) with ESMTP id 
i4NMnoZU020229;Sun, 23 May 2004 15:50:01 -0700(envelope-from 
[EMAIL PROTECTED])
Received: from smtp3.ActiveState.com (latte.activestate.com 
[192.168.4.252])by listserv.activestate.com (8.12.10/8.12.10) with ESMTP 
idi4NMm2S4019884 for <[EMAIL PROTECTED]>;Sun, 23 
May 2004 15:48:02 -0700(envelope-from [EMAIL PROTECTED])
Received: from smtp5.ActiveState.com (sack.ActiveState.com 
[192.168.2.149](may be forged))by smtp3.ActiveState.com (8.12.9/8.12.9) 
with ESMTP id i4NMm2WT009524for <[EMAIL PROTECTED]>; Sun, 23 
May 2004 15:48:02 -0700
Received: from cartman (dhcp16477090.woh.rr.com [24.164.77.90])by 
smtp5.ActiveState.com (8.12.11/8.12.11) with ESMTP id i4NMlw8Z025532for 
<[EMAIL PROTECTED]>; Sun, 23 May 2004 15:47:59 
-0700(envelope-from [EMAIL PROTECTED])
Received: from STAN ([192.168.0.171]) by cartman with 
MicrosoftSMTPSVC(6.0.3790.0); Sun, 23 May 2004 18:45:34 -0400
X-Message-Info: JGTYoYF78jGhy23XF/dP6mizWooRV7XL
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-OriginalArrivalTime: 23 May 2004 22:45:34.0885 
(UTC)FILETIME=[A9038550:01C44117]
X-PMX-Version: 4.6.0.99824, Antispam-Core: 4.6.0.99824,Antispam-Data: 
2004.5.22.101440
X-PerlMx-Spam: Gauge=, Probability=8%, Report='CLICK_BELOW 
0.089,__OUTLOOK_MSGID_1 0, __SANE_MSGID 0, __TO_MALFORMED_2 0,__REFERENCES 
0, __MIME_VERSION 0, __EVITE_CTYPE 0,__CTYPE_CHARSET_QUOTED 0, 
__CT_TEXT_PLAIN 0, __CT 0, __CTE 0,__HAS_X_PRIORITY 0, __HAS_MSMAIL_PRI 0, 
__OUTLOOK_MUA_1 0,__HAS_X_MAILER 0, __ANY_OUTLOOK_MUA 0, 
__HAS_OUTLOOK_IN_MAILER 0,__HAS_MIMEOLE 0, __HAS_XOAT 0, __CLICK_BELOW 
0,QUOTED_EMAIL_TEXT 0, __MIME_TEXT_ONLY 0, __OUTLOOK_MUA 0,__HAS_MSGID 0, 
REFERENCES 0.000'
X-BeenThere: [EMAIL PROTECTED]
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: Discussions relating to ActivePerl on Win32 
platforms
List-Unsubscribe: 
<http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users>,<mailto:[EMAIL PROTECTED]>
List-Archive: 
<http://ASPN.ActiveState.com/ASPN/Mail/Browse/Threaded/perl-win32-users>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Help: 
<mailto:[EMAIL PROTECTED]>
List-Subscribe: 
<http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users>,<mailto:[EMAIL PROTECTED]>
Errors-To: [EMAIL PROTECTED]
Return-Path: [EMAIL PROTECTED]

Paul, try modifying the "PATHEXT" environment variable to include .pl. (add
a semicolon, followed by .pl)
To temporarily set it you can enter this at a command prompt:
set PATHEXT=%PATHEXT%;.PL
To set it permanently go into the control panel and the system applet.
When you do this you don't even have to enter the .pl extension, just 
"test"
is enough to run your script, and the parameters are properly passed.

gerry
----- Original Message -----
From: "Paul Stepowski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 23, 2004 5:54 PM
Subject: Re: Passing command line options with ActivePerl
> Hi Bill,
>
> Thanks, it work when I prefix it with "perl", e.g.:
>
> c:\>perl test.pl 1 2
> 1
> 2
>
> C:\>
>
> Ideally I'd want to get around this so I only to type the name of the
> script.  Do you know if there's a way of confuring Windows to relay the
> command line args if the program is called using a file extension (.pl)
> association?
>
> Cheers,
>
> Paul
>
>
> >From: "$Bill Luebkert" <[EMAIL PROTECTED]>
> >To: Paul Stepowski <[EMAIL PROTECTED]>
> >CC: [EMAIL PROTECTED]
> >Subject: Re: Passing command line options with ActivePerl
> >Date: Sun, 23 May 2004 14:36:34 -0700
> >MIME-Version: 1.0
> >Received: from mta10.adelphia.net ([68.168.78.202]) by
mc3-f39.hotmail.com
> >with Microsoft SMTPSVC(5.0.2195.6824); Sun, 23 May 2004 14:36:37 -0700
> >Rec

Re: Passing command line options with ActivePerl

2004-05-23 Thread Gerry Green
Paul, try modifying the "PATHEXT" environment variable to include .pl. (add
a semicolon, followed by .pl)

To temporarily set it you can enter this at a command prompt:

set PATHEXT=%PATHEXT%;.PL

To set it permanently go into the control panel and the system applet.

When you do this you don't even have to enter the .pl extension, just "test"
is enough to run your script, and the parameters are properly passed.

gerry

- Original Message - 
From: "Paul Stepowski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 23, 2004 5:54 PM
Subject: Re: Passing command line options with ActivePerl


> Hi Bill,
>
> Thanks, it work when I prefix it with "perl", e.g.:
>
> c:\>perl test.pl 1 2
> 1
> 2
>
> C:\>
>
> Ideally I'd want to get around this so I only to type the name of the
> script.  Do you know if there's a way of confuring Windows to relay the
> command line args if the program is called using a file extension (.pl)
> association?
>
> Cheers,
>
> Paul
>
>
> >From: "$Bill Luebkert" <[EMAIL PROTECTED]>
> >To: Paul Stepowski <[EMAIL PROTECTED]>
> >CC: [EMAIL PROTECTED]
> >Subject: Re: Passing command line options with ActivePerl
> >Date: Sun, 23 May 2004 14:36:34 -0700
> >MIME-Version: 1.0
> >Received: from mta10.adelphia.net ([68.168.78.202]) by
mc3-f39.hotmail.com
> >with Microsoft SMTPSVC(5.0.2195.6824); Sun, 23 May 2004 14:36:37 -0700
> >Received: from computer ([67.20.95.49]) by mta10.adelphia.net
> >(InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with SMTP
> >id <[EMAIL PROTECTED]>;  Sun,
23
> >May 2004 17:36:36 -0400
> >X-Message-Info: JGTYoYF78jGcU9AezkRD0YFt+einFfyL
> >Message-ID: <[EMAIL PROTECTED]>
> >User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4)
> >Gecko/20030624 Netscape/7.1 (ax)
> >X-Accept-Language: en-us, en
> >References: <[EMAIL PROTECTED]>
> >In-Reply-To: <[EMAIL PROTECTED]>
> >Return-Path: [EMAIL PROTECTED]
> >X-OriginalArrivalTime: 23 May 2004 21:36:37.0585 (UTC)
> >FILETIME=[06FDA410:01C4410E]
> >
> >Paul Stepowski wrote:
> >
> > > Hi,
> > >
> > > I've having trouble passing command line arguements to perl scripts
> >written
> > > in ActivePerl (v5.8.3).  When I run the following script under linux,
it
> > > outputs my command line args as expected e.g.:
> > >
> > > ---snip---
> > > #/use/bin/perl
> > > #test.pl
> > >
> > > foreach (@ARGV) {
> > >   print("$_\n");
> > > }
> > > ---snip---
> > >
> > > produces:
> > >
> > > # c:\test.pl 1 2
> > > 1
> > > 2
> > > #
> > >
> > > But the same script under ActivePerl doesn't, e.g
> > >
> > > ---snip---
> > > #!c:\ActivePerl\perl\bin\perl
> > > #test.pl
> > >
> > > foreach (@ARGV) {
> > >   print("$_\n");
> > > }
> > > ---snip---
> > >
> > > C:\>test.pl 1 2
> > >
> > > C:\>
> > >
> > > Does ActivePerl handle passing command line arguments differently?
> >
> >Try explicitly calling Perl (depending on which Windoze & shell, you may
be
> >able to properly associate Perl to .pl and getting the results you
wanted)
> >:
> >
> >perl test.pl 1 2
> >
> >--
> >   ,-/-  __  _  _ $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)
> >
>
> _
> SEEK: Now with over 50,000 dream jobs! Click here:
> http://ninemsn.seek.com.au?hotmail
>
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Passing command line options with ActivePerl

2004-05-23 Thread Paul Stepowski
Hi Bill,
Thanks, it work when I prefix it with "perl", e.g.:
c:\>perl test.pl 1 2
1
2
C:\>
Ideally I'd want to get around this so I only to type the name of the 
script.  Do you know if there's a way of confuring Windows to relay the 
command line args if the program is called using a file extension (.pl) 
association?

Cheers,
Paul

From: "$Bill Luebkert" <[EMAIL PROTECTED]>
To: Paul Stepowski <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Passing command line options with ActivePerl
Date: Sun, 23 May 2004 14:36:34 -0700
MIME-Version: 1.0
Received: from mta10.adelphia.net ([68.168.78.202]) by mc3-f39.hotmail.com 
with Microsoft SMTPSVC(5.0.2195.6824); Sun, 23 May 2004 14:36:37 -0700
Received: from computer ([67.20.95.49]) by mta10.adelphia.net  
(InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with SMTP  
id <[EMAIL PROTECTED]>;  Sun, 23 
May 2004 17:36:36 -0400
X-Message-Info: JGTYoYF78jGcU9AezkRD0YFt+einFfyL
Message-ID: <[EMAIL PROTECTED]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) 
Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
References: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 23 May 2004 21:36:37.0585 (UTC) 
FILETIME=[06FDA410:01C4410E]

Paul Stepowski wrote:
> Hi,
>
> I've having trouble passing command line arguements to perl scripts 
written
> in ActivePerl (v5.8.3).  When I run the following script under linux, it
> outputs my command line args as expected e.g.:
>
> ---snip---
> #/use/bin/perl
> #test.pl
>
> foreach (@ARGV) {
>   print("$_\n");
> }
> ---snip---
>
> produces:
>
> # c:\test.pl 1 2
> 1
> 2
> #
>
> But the same script under ActivePerl doesn't, e.g
>
> ---snip---
> #!c:\ActivePerl\perl\bin\perl
> #test.pl
>
> foreach (@ARGV) {
>   print("$_\n");
> }
> ---snip---
>
> C:\>test.pl 1 2
>
> C:\>
>
> Does ActivePerl handle passing command line arguments differently?

Try explicitly calling Perl (depending on which Windoze & shell, you may be
able to properly associate Perl to .pl and getting the results you wanted) 
:

perl test.pl 1 2
--
  ,-/-  __  _  _ $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)

_
SEEK: Now with over 50,000 dream jobs! Click here:  
http://ninemsn.seek.com.au?hotmail

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Passing command line options with ActivePerl

2004-05-23 Thread $Bill Luebkert
Paul Stepowski wrote:

> Hi,
> 
> I've having trouble passing command line arguements to perl scripts written 
> in ActivePerl (v5.8.3).  When I run the following script under linux, it 
> outputs my command line args as expected e.g.:
> 
> ---snip---
> #/use/bin/perl
> #test.pl
> 
> foreach (@ARGV) {
>   print("$_\n");
> }
> ---snip---
> 
> produces:
> 
> # c:\test.pl 1 2
> 1
> 2
> #
> 
> But the same script under ActivePerl doesn't, e.g
> 
> ---snip---
> #!c:\ActivePerl\perl\bin\perl
> #test.pl
> 
> foreach (@ARGV) {
>   print("$_\n");
> }
> ---snip---
> 
> C:\>test.pl 1 2
> 
> C:\>
> 
> Does ActivePerl handle passing command line arguments differently?

Try explicitly calling Perl (depending on which Windoze & shell, you may be
able to properly associate Perl to .pl and getting the results you wanted) :

perl test.pl 1 2

-- 
  ,-/-  __  _  _ $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
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Passing command line options with ActivePerl

2004-05-23 Thread Paul Stepowski
Hi,
I've having trouble passing command line arguements to perl scripts written 
in ActivePerl (v5.8.3).  When I run the following script under linux, it 
outputs my command line args as expected e.g.:

---snip---
#/use/bin/perl
#test.pl
foreach (@ARGV) {
 print("$_\n");
}
---snip---
produces:
# c:\test.pl 1 2
1
2
#
But the same script under ActivePerl doesn't, e.g
---snip---
#!c:\ActivePerl\perl\bin\perl
#test.pl
foreach (@ARGV) {
 print("$_\n");
}
---snip---
C:\>test.pl 1 2
C:\>
Does ActivePerl handle passing command line arguments differently?
Thanks,
Paul
_
Protect your inbox from harmful viruses with new ninemsn Premium. Go to   
http://ninemsn.com.au/premium/landing.asp?banner=emailtag&referrer=hotmail

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs