How to get command line parameters?

T

Tal Raveh

Hello



I'm writing script for sending mail, I want to get from command line all I
need for that



Ext.

Script name: sendmail.pl

I want to run:

../Sendmail.pl –F <from address> -t <to address> -m <massage> -s <subject>



I have 4 parameters:

$mailfrom

$mailto

$msg

$subject



How can I put the command line parameter in those parameters ?



Thanks



Tal
 
G

Gunnar Hjalmarsson

Tal said:
I want to run:

./Sendmail.pl –F <from address> -t <to address> -m <massage> -s <subject>

I have 4 parameters:

$mailfrom
$mailto
$msg
$subject

How can I put the command line parameter in those parameters ?

Read about the @ARGV variable in "perldoc perlvar".
 

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

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top