Here is round trip using your data , note how it doesn't match :)
#!/usr/bin/perl --
use Data::Dump;
use HTTP::Request ;
my $r = HTTP::Request->new('http://localhost');
$r->authorization_basic(qw/ username@system password /);
dd( $r->as_string );
dd( $r = HTTP::Request->parse( $r->as_string ) );
dd( $r->authorization_basic );
__END__
"http://localhost -\nAuthorization: Basic dXNlcm5hbWVAc3lzdGVtOnBhc3N3
+b3Jk\n\n"
bless({
_content => "",
_headers => bless({ authorization => "Basic dXNlcm5hbWVAc3lzdGVtOnBh
+c3N3b3Jk" }, "HTTP::Headers"),
_method => "http://localhost",
_uri => bless(do{\(my $o = "-")}, "URI::_generic"),
}, "HTTP::Request")
("username\@system", "password")
|