#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize::Firefox; my $mech = new WWW::Mechanize::Firefox(); open(INPUT, ") { chomp; print "$_\n"; $mech->get($_); my $png = $mech->content_as_png(); my $name = "$_"; $name =~s/^www\.//; $name .= ".png"; open(OUTPUT, ">$name"); print OUTPUT $png; sleep (5); } #### http://www.unifr.ch/sfm print() on closed filehandle OUTPUT at test_3.pl line 20, line 2. http://www.zug.phz.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 3. http://www.schwyz.phz.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 4. http://www.luzern.phz.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 5. http://www.schwyz.phz.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 6. http://www.phvs.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 7. http://www.phtg.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 8. http://www.phsg.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 9. http://www.phsh.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 10. http://www.phr.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 11. http://www.hepfr.ch/ print() on closed filehandle OUTPUT at test_3.pl line 20, line 12. http://www.phbern.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 13. http://www.ph-solothurn.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 14. http://www.pfh-gr.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 15. http://www.ma-shp.luzern.phz.ch print() on closed filehandle OUTPUT at test_3.pl line 20, line 16. http://www.heilpaedagogik.phbern.ch/ print() on closed filehandle OUTPUT at test_3.pl line 20, line 17.