Sorry, I've got the answer.

It should be

$mytty = POSIX::ttyname(1);

2008/10/28 Yue Chen <[EMAIL PROTECTED]>:
> Hi
>
> I am writing a perl script which need send current tty to another program.
>
> Now i am using external cmd 'tty' and redirect the result to my
> variable, such as:
>
> $mytty = `tty`;
>
>
> Since sometimes 'tty' is not in my PATH, my script is not always
> successful. So is there a better perl internal mechanism to get such
> variable?
>
> Thank you very much
>

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


Reply via email to