[gargle@vlds204 reporting]$ cat test.pl #!/usr/bin/perl use Modern::Perl; use Term::Prompt; my $mypass = prompt( 'x', "password:", '', '' ); $|=1; say "alfa"; say "beta"; [gargle@vlds204 reporting]$ ./test.pl | tee test.txt x password: alfabeta[gargle@vlds204 reporting]$ ./test.pl password: x alfa beta [gargle@vlds204 reporting]$