my @args = ("command", "arg1", "arg2");
system(@args) == 0
or die "system @args failed: $?";
####
my @args = qw(Runbatch.exe -j dpsgl -r dpstst);
system(@args) == 0
or die "system @args failed: $?";
##
##
my @args = ('Runbatch.exe', '-j', 'dpsgl', '-r', 'dpstst');
system(@args) == 0
or die "system @args failed: $?";
##
##
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my @args = ('Runbatch.exe -j dpsgl -r dpstst');
my @argsUpdated = qw(Runbatch.exe -j dpsgl -r dpstst);
print Dumper \@args, \@argsUpdated;
__END__
$ perl test.pl
$VAR1 = [
'Runbatch.exe -j dpsgl -r dpstst'
];
$VAR2 = [
'Runbatch.exe',
'-j',
'dpsgl',
'-r',
'dpstst'
];
##
##
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my @args = ('Runbatch.exe -j dpsgl -r dpstst');
my @argsUpdated = ('Runbatch.exe', '-j', 'dpsgl', '-r', 'dpstst');
print Dumper \@args, \@argsUpdated;
__END__
$ perl test.pl
$VAR1 = [
'Runbatch.exe -j dpsgl -r dpstst'
];
$VAR2 = [
'Runbatch.exe',
'-j',
'dpsgl',
'-r',
'dpstst'
];