On Thu, May 03, 2007 at 05:22:54AM +0900, jay wrote:
script runs just fine.
Are you using commas exactly as shown? If so, that’s probably the
problem. Try this instead:
system(“foo.sh”, “bar”, “baz”, “qux”);
. . . where bar, baz, and qux are your arguments. You could also simply
do something like one of the following:
system(“foo.sh bar baz qux”);
my $foo = “foo.sh”;
my @args = qw(bar baz qux");
system("$foo @args");
my @command_and_args = qw(foo.sh bar baz qux);
system("@command_and_args");
In each case, assuming the use of system() is the only thing on that
line of the program, the parentheses are optional.
You are using the strict and warnings pragmas – right? You should
always include the following two lines at the beginning of any Perl
script while working on it to help with debugging and good programming
practice:
use strict;
use warnings;
You should also make use of perldoc, which should be installed on your
system. With the -f option, the perldoc command can be used to look up
information about a specific function. In this case, you can learn more
about how system() works with the following commmand, for instance:
On Thu, May 03, 2007 at 05:22:54AM +0900, jay wrote:
Hi! I wanted to run the system command with in Perl script to execute
shell script with argument. I need to know the correct syntax for the
arguments.
Oh, one other thing – you’re asking this of a Ruby community, not a
Perl community. Since this was apparently posted via the forum, rather
than the mailing list or newsgroup, I suspect what you actually want
is the PerlMonks website:
On 5/2/07, Chad P. [email protected] wrote:
When there are people behaving strangly in nice restaurants one can
suspect that they are Critics (sp?) from Michelin or whatever
Guide(1).
Chad I guess you just got us our first “Toque”
On Thu, May 03, 2007 at 01:49:16PM +0900, Robert D. wrote:
On 5/2/07, Chad P. [email protected] wrote:
When there are people behaving strangly in nice restaurants one can
suspect that they are Critics (sp?) from Michelin or whatever
Guide(1).
Chad I guess you just got us our first “Toque”
Cheers
Robert
(1) Although that is probably never the case.
Uh, what? What does a hat have to do with this?
I think you lost me.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.