Thanks again, Jonathan..
your suggestion did the trick, and pinpointed the problem
(a duff regex to take spaces out of the new file's name, now corrected)
Picking up this sort of tip from experienced programmers is a huge help.
thanks to all on the list who give up thier time to help.
I for one, am really grateful
Terry
...-----Original Message-----
...From: Ross, Jonathan C. [mailto:[EMAIL PROTECTED]]
...Sent: Tuesday, July 17, 2001 6:03 PM
...To: 'IT Dept - Terry Honeyford'
...Cc: '[EMAIL PROTECTED]'
...Subject: RE: page generation
...
...
...> Thanks for your suggestions Jonathan, that seems to stop the script
...> from looping now there is another problem with it!!! it falls over
...> saying "can't open newpage at 74 - No such file or directory at
...> /web/cgi/AZcreate.pl line 74" but the idea is that this
...file will be
...> created when printing to PAGEOUT, have I got it all wrong? I Have
...> marked the line in script below, I would be really gratfull for any
...> suggestions on how to cure this..
...>
...> ...
...> ... open(PAGEIN,
..."<$path/ExhibitionFolder/98/Templates/$NEWPAGE")
...> ... or die("Cannot open template: $!\n");
...> ... open(PAGEOUT, ">$folder/$Exname/$NEWPAGE")
...> ... or die("can't open newpage at 74 :
...$!\n");######## this is line
...> 74
...
...You probably haven't initialized $folder, or maybe the file specifies
...a directory which doesn't exist.
...
...To get a better idea of the problem (and as a general rule), always
...include offending data in error messages, e.g.
...
... my $infile = "$path/ExhibitionFolder/98/Templates/$NEWPAGE";
... open(PAGEIN, "<$infile") or die("Can't read template
...$infile: $!\n");
... my $outfile = "$folder/$Exname/$NEWPAGE";
... open(PAGEOUT, ">$outfile") or die("Can't write $outfile: $!\n");
...
...That should show you which filename can't be opened.
...
...Regards,
...Jonathan
...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]