in reply to strawberry win10 no ARGV
Can you please post your code so we can see what you're trying to do, and how?
Strawberry Perl handles command line arguments perfectly fine. Here's an example:
use warnings; use strict; if (@ARGV != 3){ print "Program requires 3 arguments\n"; exit; } my ($one, $two, $three) = @ARGV; print "arg1: $one, arg2: $two, arg3: $three\n";
output:
> perl def.pl Program requires 3 arguments > perl def.pl 1 2 3 arg1: 1, arg2: 2, arg3: 3
If you require anything more elaborate than sending in a small number of simple args, there's the Getopt::Long distribution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: strawberry win10 no ARGV
by twyce (Initiate) on Dec 14, 2019 at 22:39 UTC | |
by pryrt (Abbot) on Dec 14, 2019 at 22:46 UTC | |
by twyce (Initiate) on Dec 14, 2019 at 22:49 UTC | |
by pryrt (Abbot) on Dec 14, 2019 at 23:54 UTC | |
by harangzsolt33 (Deacon) on Dec 15, 2019 at 03:56 UTC | |
| |
by Anonymous Monk on Dec 15, 2019 at 21:58 UTC | |
| |
by Anonymous Monk on Dec 16, 2019 at 16:26 UTC | |
|