Well, if you've already got a variable with the program name that you're
using, why not something like this:

$Start .= " Parm1 Parm2";

(assuming that you are not using the variable $Start for anything else)
Otherwise you can do:

$newvar = $Start." Parm1 Parm2";

-----Original Message-----
From: Busse, Rich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 10:59 AM
To: Perl Beginners
Subject: Parsing a line


I'm currently processing lines from an input file this way:

        $_ = "P=IcwRcsm D=D:    SL=20 ST=d:\icw\rcsm\StartSv.bat
U=http://uslv...";
        @Token = split ;
        foreach (@Token)
        {
                $Proc  = $' if (/P=/i) ;
                $Start = $' if (/ST=/i) ;
                $Url   = $' if (/U=/i) ;
                $Sleep = $' if (/SL=/i) ;
                $Drive = $' if (/D=/i) ;
        }

Probably not very Perl-ish, but I'm ending up with
$Start="d:\icw\rcsm\StartSv.bat" as needed.

Now I'd like to pass parameters to the program in $Start. Something like:

        P=IcwRcsm D=D: SL=20 ST=d:\icw\rcsm\StartSv.bat Parm1 Parm2
U=http://uslv...

or even with delimiters if it helps:

        P=IcwRcsm D=D: SL=20 ST="d:\icw\rcsm\StartSv.bat Parm1 Parm2"
U=http://uslv...
        P=IcwRcsm D=D: SL=20 ST='d:\icw\rcsm\StartSv.bat Parm1 Parm2'
U=http://uslv...

so I end up with $Start="d:\icw\rcsm\StartSv.bat Parm1 Parm2".

Any suggestions appreciated. TIA...

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to