- system('links2',
- # links2 doesn't like the leading http:// of proxies for some reason
- exists $options{http_proxy}?('-http-proxy',(map {s{http://}{}; $_} $options{http_proxy})):(),
- $url
- ) == 0 or next;
- rename('temp.pdf',"${pmid}.pdf") if -e 'temp.pdf';
- }
+ if ($options{use_links}) {
+ system('links2',
+ # links2 doesn't like the leading http:// of proxies for some reason
+ exists $options{http_proxy}?('-http-proxy',(map {s{http://}{}; $_} $options{http_proxy})):(),
+ $url
+ ) == 0 or next;
+ rename('temp.pdf',"${pmid}.pdf") if -e 'temp.pdf';
+ }
+ }