The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/perl

=for info

Name: tty
Description: return user's terminal name
Author: 
License: 

=cut

# implementation of tty in perl
use POSIX ();
use strict;
die "not a tty" unless -t;
print POSIX::ttyname(0), "\n";

=encoding utf8

=head1 NAME

tty - return user's terminal name