Jeff,

Thanks a lot for your reply. Acutally  external APP was passing value to
command prompt so the first option did work.



"Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Jul 22, Perl said:
>
> > what can be the syntex of assigning a variable (my $path) in perl which
is
> > taking value (for example  c:\documents\script.txt) from an expternal
APP.
>
> How is your program getting passed this value?  On the command-line?  If
> so, then you would access the value from the @ARGV array.  $ARGV[0] holds
> the first argument, $ARGV[1] the second, and so on.
>
>    my $path = $ARGV[0];
>
> If it's being sent to your program via an input stream (the other program
> is writing, and your Perl program needs to read), you'd get the value from
> <STDIN>.
>
>    chomp(my $path = <STDIN>);
>
> -- 
> Jeff "japhy" Pinyan         %  How can we ever be the sold short or
> RPI Acacia Brother #734     %  the cheated, we who for every service
> http://japhy.perlmonk.org/  %  have long ago been overpaid?
> http://www.perlmonks.org/   %    -- Meister Eckhart



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to