How to read the password from the text file in perl

view story

http://stackoverflow.com – I am new to perl script, The below code is downloading the files from sftp server. #!/usr/bin/perl use strict; use warnings; use Net::SFTP::Foreign; my $sftp = Net::SFTP::Foreign->new( '[email protected]', password => 'auser123', more => ['-v'] ); $sftp->get('outgoing/DATA.ZIP', '/home/sar/') or die "unable to retrieve copy: ".$sftp->error; $sftp->disconnect; Here i have hard codded the password, I want to avoid password in the script, Is there any other method to read the password from the file or any method is there? I searched in the stackoverfl (HowTos)