@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. Advertisements

  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. Advertisements

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. Bernd Danberg

    main argv command line

    Bernd Danberg, Aug 13, 2004, in forum: C++
    Replies:
    7
    Views:
    24,174
    Rich Grise
    Aug 15, 2004
  2. David Stockwell

    getting arguments off the command line

    David Stockwell, Jun 16, 2004, in forum: Python
    Replies:
    2
    Views:
    414
    george young
    Jun 17, 2004
  3. Replies:
    4
    Views:
    2,080
    Terry Hancock
    Apr 23, 2005
  4. ern
    Replies:
    2
    Views:
    529
    Walter Roberson
    Aug 17, 2006
  5. Matt
    Replies:
    20
    Views:
    872
    Keith Thompson
    Jul 26, 2007
  6. Paul
    Replies:
    1
    Views:
    178
    Sebastian Hungerecker
    Apr 24, 2007
  7. Durga B.
    Replies:
    0
    Views:
    377
    Durga B.
    Nov 29, 2010
  8. Niall Macpherson

    ARGV[] unable to pick up command line arguments

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