Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- use strict;
- use Net::SSLeay qw(get_https post_https sslcat make_headers make_form);
- use MIME::Base64;
- my ($page,$result,$headers,$user,$pass,$srv,$path);
- $srv='my.example.com';
- $path='page.html';
- $user='foo';
- $pass='bar';
- ($page, $result, %headers) = get_https($srv, 443, $path,
- make_headers(Authorization =>
- 'Basic ' . MIME::Base64::encode("$user:$pass",'')
- )
- );
- print $page;
- $ perl get_html_2.pl
- Global symbol "%headers" requires explicit package name at get_html_2.pl line 15.
- Execution of get_html_2.pl aborted due to compilation errors.
Add Comment
Please, Sign In to add comment