use warnings;
use strict;
use LWP::Simple;
my $JiraUser = 'username';
my $JiraPass = 'password';
my $url = 'https://jira:8443/jira/secure/attachment/234681/EDW_ETL_Type1_UTCR_Template_Raid85876.xls';
my $file = 'Raid85876.xls';
my $ua = LWP::UserAgent->new;
$ua->timeout(300);
my $req = HTTP::Request->new(GET => $url);
$req->authorization_basic($JiraUser, $JiraPass);
$ua->request($req, $file)->code;