@ARGV not getting command line arguments

Discussion in 'Perl Misc' started by bkimelman@hotmail.com, Mar 22, 2005.

  1. Guest

    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 ?
     
    , Mar 22, 2005
    #1
    1. Advertising

  2. On 22/03/2005, wrote:

    > 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

    --
    felix
     
    Felix Geerinckx, Mar 22, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bret

    char **argv vs. char* argv[]

    Bret, Aug 31, 2003, in forum: C Programming
    Replies:
    21
    Views:
    4,698
    Richard Heathfield
    Sep 3, 2003
  2. Replies:
    4
    Views:
    1,769
    Terry Hancock
    Apr 23, 2005
  3. Matt
    Replies:
    20
    Views:
    752
    Keith Thompson
    Jul 26, 2007
  4. Durga B.
    Replies:
    0
    Views:
    170
    Durga B.
    Nov 29, 2010
  5. Niall Macpherson

    ARGV[] unable to pick up command line arguments

    Niall Macpherson, May 19, 2008, in forum: Perl Misc
    Replies:
    7
    Views:
    202
    J├╝rgen Exner
    May 20, 2008
Loading...

Share This Page