Jonathan Daugherty writes:
> # 42: print "|$pages[0]|\n";
> # 43: open(PAGE, "<", "http;^^dri.cornell.edu^pub^People^davis.html") || die("can't
> open $pages[0]: $!");
> # 44: close(PAGE);
> # 45: open( PAGE, "<", $pages[0]) || die("can't open $pages[0]: $!");
> # 46: close(PAGE);
>
> I put this in a perl script, touched the file
> "http;^^dri.cornell.edu^pub^People^davis.html", and ran the script. I
> did not get the error you got, so I suspect that the issue lies in
> another part of your code that we are not seeing.
Here is the rest of the code (this all happens before the snippit
above). "cornell-staff.list" is a list of filenames like the one
above. If I fill the array manually, eg: $pages[0]= "..";
$pages[1]="..." ... it works fine.
Thanks,
Rogan
my @pages;
my @links;
open( INPUTLIST, "cornell-staff.list") || die "Can't open cornell-staff.list: $!";
foreach(<INPUTLIST>){
chomp;
my $filename = $_;
s|\^|/|g; # convert ^'s to /'s
s|http\;//||; # remove the http;^^
push(@pages, $filename);
push(@links, $_);
}
close( INPUTLIST );
> (Just a follow-up to say that I can't reproduce the error with the
> supplied code.)
>
> --
>
> Jonathan Daugherty
> http://www.cprogrammer.org
>
> "It's a book about a Spanish guy called Manual, you should read it."
> -- Dilbert
> _______________________________________________
> PDXLUG mailing list
> [EMAIL PROTECTED]
> http://pdxlug.org/mailman/listinfo/pdxlug
_______________________________________________
PDXLUG mailing list
[EMAIL PROTECTED]
http://pdxlug.org/mailman/listinfo/pdxlug