@ARGV not getting command line arguments

B

bkimelman

Perl on my Windows XP PC at the office is having a strange problem.

First, my version of Perl is 5.8.6 (downloaded from Activestate.com).

When I run a Perl script from the DOS command line the parameters I
specify are not placed into @ARGV !!! (This does not happen on my
Windows XP PC at home !)

Here is a sample test sc ript I wrote to demonstrate the problem:

=========================================
#!/usr/bin/perl -w

use strict;

my ( $count );

$count = scalar @ARGV;
print "ARGS [$count] ",join(", ",@ARGV),"\n";

exit 0;
==============================================

When I call the above script (named args.pl) as follows :

args.pl hello world

the output is : ARGS [0]

Where are my missing parameters ?
 
F

Felix Geerinckx

When I run a Perl script from the DOS command line the parameters I
specify are not placed into @ARGV !!!

When you type

ftype Perl

at the CMD prompt, do you get something like

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

If not, type

help ftype
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top