Newbie question

J

john D

Hi

I would like to make a perl script which will start another
program and define the ouput filename as a comandline prompt.

This means that it should execute the following:

Program_name [outputname]

where outputname are a combination of the present date and time.

Can anyone tell me how I should do this.

Sorry for the very simple newbie question-
 
G

Ga Mu

john said:
Hi

I would like to make a perl script which will start another
program and define the ouput filename as a comandline prompt.

This means that it should execute the following:

Program_name [outputname]

where outputname are a combination of the present date and time.

Can anyone tell me how I should do this.

Sorry for the very simple newbie question-


my $prog = '/path/to/program';
my $arg1 = 'first arg to pass to prog';
system( $prog, $arg1 );
my $status = $? >> 8;

Look at 'perldoc -f system'.

Greg
 
S

Stan Mooney

maybe that and
$arg1=`date`;
system($prog, "$arg1");
is what youre after?

Ga said:
john said:
Hi

I would like to make a perl script which will start another
program and define the ouput filename as a comandline prompt.

This means that it should execute the following:

Program_name [outputname]

where outputname are a combination of the present date and time.

Can anyone tell me how I should do this.

Sorry for the very simple newbie question-

my $prog = '/path/to/program';
my $arg1 = 'first arg to pass to prog';
system( $prog, $arg1 );
my $status = $? >> 8;

Look at 'perldoc -f system'.

Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top