[EMAIL PROTECTED] wrote: > When I execute the script below, I get the error message "No such file > or directory at simple2.pl line 21." Line 21 is the Open OUT > statement. This script parallels a tutorial script that does work and > I don't see the error. It does print to the screen if I comment out > the Open OUT line. Thanks in advance. > > #!/bin/perl > > use strict; > > use WWW::Mechanize; > > my $output_dir = "c:/training/bc"; > > my $starting_url = "http://clerk.house.gov/members/olmbr.html"; > > my $browser = WWW::Mechanize->new(); > > $browser->get( $starting_url ); > > > $browser->submit(); > > > { > > open OUT, ">output_dir/simple2.html" or die "Can't open file: $!";
Does the directory 'output_dir' exist in the current directory or did you intend to use the variable $output_dir instead? > print OUT $browser->content; > > close OUT; > > } > > close PAGE; Where did you open the PAGE filehandle? > print $browser->content; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>