1—2345678910111213141516171819—202122232425 #!/usr/bin/perlHideShow 11 lines of Pod=begin metadataName: ttyDescription: return user's terminal nameAuthor:License:=end metadata=cut# implementation of tty in perluse POSIX ();use strict;die "not a tty" unless -t;print POSIX::ttyname(0), "\n";HideShow 6 lines of Pod=encoding utf8=head1 NAMEtty - return user's terminal name
#!/usr/bin/perl
=begin metadata
Name: tty
Description: return user's terminal name
Author:
License:
=end metadata
=cut
# implementation of tty in perl
use
POSIX ();
strict;
die
"not a tty"
unless
-t;
print
POSIX::ttyname(0),
"\n"
;
=encoding utf8
=head1 NAME
tty -
return
user's terminal name