perl_mystery has asked for the wisdom of the Perl Monks concerning the following question:
Why is options{d} not seen below,if I hardcode this option,the script runs fine
#!/usr/bin/perl -w use strict; use warnings; use IPC::System::Simple qw( system ); use Getopt::Std; use Data::Dumper; #USAGE #Getting the command-line options my %options=(); getopt("fdr",\%options); print Dumper( \%options ); #if (not exists $options{r} || not exists $options{d} || not exists $o +ptions{f}) #{ # print "Please enter the release,description and deleted files + file.\n"; #} system($_) for 'p4 submit -d "options{d}" -f submitunchanged -i', 'p4 label -o -t Test Error message:- If I run using "perl perl.pl -d Check_in -r 1012" I get the below erro +r message p4 submit -d "options{d}" -f submitunchanged -i" unexpectedly returned + exit value 1 at perl.pl line 37
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: options not being seen
by toolic (Bishop) on Mar 08, 2011 at 22:02 UTC | |
by perl_mystery (Beadle) on Mar 08, 2011 at 23:21 UTC | |
by GrandFather (Saint) on Mar 09, 2011 at 00:03 UTC | |
by perl_mystery (Beadle) on Mar 09, 2011 at 00:31 UTC | |
by GrandFather (Saint) on Mar 09, 2011 at 00:44 UTC |