Perl script to assign TTY's to specific links