in reply to More than one way to do it???
An immediate improvement that springs to mind is in the regex - change it to simply remove the '/dev/' at the beginning of the string:
perl -we '$tty=qx(tty);$tty=~s!^/dev/!!;print $tty'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: More than one way to do it???
by Anonymous Monk on Dec 07, 2000 at 02:43 UTC |
In Section
Seekers of Perl Wisdom