Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: strawberry win10 no ARGV

by choroba (Cardinal)
on Dec 14, 2019 at 22:22 UTC ( [id://11110155]=note: print w/replies, xml ) Need Help??


in reply to strawberry win10 no ARGV

How do you run the scripts? Do you click on them, or do you run them from a command line?

Also, please don't use PRE or CODE tags for normal text. See <pre> Versus <code> Tags for details.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: strawberry win10 no ARGV
by twyce (Initiate) on Dec 14, 2019 at 22:57 UTC
    Normally I click on a perl script and it calls a 2nd script, successfully passing args via qx() and successfully getting the output. I also tried simply typing in the name of the script to a cmd window and put the args after it. The script did not see the command line args.

      Have you tried running your second script as "perl script.pl arg1 arg2 ..." instead of "script.pl arg1 arg2 ..."? You might need to add the full path to the Perl binary, which you can normally get from $^X (or Config's $Config{perlpath}, as documented in the first link). Also note my node here in regards to the potential issues with using qx//.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11110155]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-19 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found