[22987] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5207 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 9 21:58:00 2003

Date: Wed, 9 Jul 2003 18:56:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 9 Jul 2003     Volume: 10 Number: 5207

Today's topics:
        Why is it Not Writing to File on Netware 5 Box? <cja@dds.nl>
    Re: Why is it Not Writing to File on Netware 5 Box? <emschwar@pobox.com>
    Re: Why is it Not Writing to File on Netware 5 Box? (Jay Tilton)
        Why is module list so out of date? <REMOVEsdnCAPS@comcast.net>
    Re: Why is module list so out of date? (Sam Holden)
    Re: Why is module list so out of date? <REMOVEsdnCAPS@comcast.net>
    Re: Why is module list so out of date? (Randy Kobes)
        Win32 Perl 5.8.0 Compile, Undefined Reference rosenthd@yahoo.com
    Re: Win32 Perl 5.8.0 Compile, Undefined Reference <kalinabears@hdc.com.au>
        WIN32::OLE - Printing a PDF document from Windows (kpowell10)
    Re: WIN32::OLE - Printing a PDF document from Windows <wsegrave@mindspring.com>
    Re: WIN32::OLE - Printing a PDF document from Windows (Jay Tilton)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 8 Jul 2003 17:35:24 -0400
From: "Chris Abraham" <cja@dds.nl>
Subject: Why is it Not Writing to File on Netware 5 Box?
Message-Id: <befdf202mvs@enews1.newsguy.com>

Dear Gurus:

I am having a very frustrating experience with one of Matt's guestbook CGI
scripts.  It was working before in all of its interpretations based on
Guestbook for the World Wide Web Version 2.1 circa 6/1/95.  It was working
like a champ but not its not.  Here's where the Novell Netware server was
before the upgrade:

NETWARE 5.1 SERVICE PACK 5 WITH PERL CGI2PERL V 2.00B MARCH 21ST 2001.

And here is where the server is now:

NETWARE 5.1 SERVICE PACK 6 WITH PERL 5.8.0 CGI2PERL NLM 3.20B FROM FEB 3RD
2003.

I have fears that it has nothing to do with Perl, although the cgi2perl
interpreter didn't like titles like 8-15-03.pl, but when I fixed that and
was able to get the primary part of the script working, the 81503.pl script
would not append the guest book input data to perldocs/81503.htm.  The perl
script walked like a duck and talked like a suck, but it would not quack,
although it did write the data to the screen, to the browser.

So, not having a Novell Netware server of any sort, I upgraded my FreeBSD
box to 5.8.0 and you can see it here:

http://aei.zdev.org/81503.html

Which, when you fill it out, goes nicely to:

http://aei.zdev.org/cgi-bin/81503.pl

And then logs very nicely to:

http://aei.zdev.org/81503.htm

And, aside from changing the local variables and the shebang, it worked like
a charm, and on 5.8.0 to boot.

So, here is what I have been doing to try to get it sussed:

I WAS able to get the PERL SCRIPT to run on the FreeBSD box, the NOVELL
NETWARE box, and a W2k and XP box running INDIGOPERL (Apache 2, Perl 5.8.0,
and PHP 4).

I WAS NOT able to get the PERL SCRIPT to write to the guestbook html file:

http://aei.zdev.org/81503.htm

On any of the platforms save the FreeBSD box.

Here's the perl script.  I was thinking that maybe it coule be permissions
or it could be a difference between the techniques required to open the
81503.htm, append the html information saved in GUEST, and then closing the
81503.htm between the BSD box and Novell/Windows that I am not aware of, or
something to do with permissions.  I don't know.  I would really like your
help.

If you have any ideas, please email me directly (and to this group as well,
for the benefit of man and knowledge).

Thanks in advance,

Chris

The Perl script is to follow, as I got it, before I localized it for the BSD
box:

#################################Begin Code##########################
#! /usr/local/bin/perl -w

# ------------------------------------------------------------
# Guestbook for the WWW, by Matt Wright (mattw@pr1.k12.co.us).
# This package is Copyright 1995 by Matt Wright.
# Parts of code taken from:
# Form-mail.pl, by Reuven M. Lerner (reuven@the-tech.mit.edu).
# This package is Copyright 1994 by The Tech.

# Guestbook is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.

# Guestbook is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with Guestbook; see the file COPYING.  If not, write to the Free
# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# ------------------------------------------------------------

# Guestbook for the World Wide Web
# Created by Matt Wright           Version 2.1
# Created on: 4/21      Last Modified: 6/1/95
# History can be found in the README file.

#  ***************Set Following Variables Before Use!!!*************
# Set this to your server address
$server = "http://".$ENV{"SERVER_NAME"}."/";

# Set this to point to URL style guestbook html file location.
$guestbookurl = "perldocs/81503.htm";

# Set this to point to the actual location of the html files.
$guestbookreal = "sys:/novonyx/suitespot/docs/perldocs/81503.htm";
$guestlog = "sys:/novonyx/suitespot/docs/perldocs/guestlg2.htm";

# This points to the relative location of this perl script (this depends
# on what you specify in srm.cfg
$cgiurl = "perl/81503.pl";

#  ***************Set Above Variables Before Use!!!*************

# Set Your Options:
$mail = 0;              # 1 = Yes; 0 = No
$uselog = 1;            # 1 = Yes; 0 = No
$linkmail = 1;          # 1 = Yes; 0 = No
$separator = 1;         # 1 = <hr>; 0 = <p>
$redirection = 0;       # 1 = Yes; 0 = No

##############
# If you answered 1 to $mail you will need to fill out these variables
below:
$mailprog = '/usr/lib/sendmail';
$recipient = 'lvuong@aei.org';

# Get the Date for Entry
#$date = `date +"%A, %B %d, %Y at %T (%Z)"`;
#        chop($date);
#$shortdate = `date +"%D %T %Z"`;
#        chop($shortdate);


# Get the input
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

# Split the name-value pairs
@pairs = split(/&/, $buffer);

foreach $pair (@pairs)
{
    ($name, $value) = split(/=/, $pair);

    # Un-Webify plus signs and %-encoding
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

    # Stop people from using subshells to execute commands
    # Not a big deal when using sendmail, but very important
    # when using UCB mail (aka mailx).
    # $value =~ s/~!/ ~!/g;

    # Uncomment for debugging purposes
    # print "Setting $name to $value<P>";

    $FORM{$name} = $value;
}

# Print the Blank Response Subroutines

&no_name unless $FORM{'realname'};

# Begin the Editing of the Guestbook File
open (FILE,"$guestbookreal");
@LINES=<FILE>;
close(FILE);
$SIZE=@LINES;

# Open Link File to Output
open (GUEST,">$guestbookreal");

for ($i=0;$i<=$SIZE;$i++) {
   $_=$LINES[$i];
  if (/<META begin>/) {
    print GUEST "<META begin>\n";
    print GUEST "<b>$FORM{'periodending'}</b><p>\n";
    print GUEST "Employee Name: &#160 <b>$FORM{'realname'}</b>";
  if ( $FORM{'username'} ){
    if ($linkmail eq '1') {
      print GUEST " (<a
href=\"mailto:$FORM{'username'}\">$FORM{'username'})</a>";
    }
    else {
      print GUEST " ($FORM{'username'})";
    }
  }
print GUEST "<br>\n";
  if ( $FORM{'costcenter'} ){
    print GUEST "Cost Center: &#160 <b>$FORM{'costcenter'}</b><br>\n";
 print GUEST "<br>\n";
 print GUEST "<b><u>Date and Work Status</u></b><br>\n";
  }
  if ( $FORM{'day1'} ){
    print GUEST "<b> 01: </b>$FORM{'day1'} \n";
  }
  if ( $FORM{'day2'} ){
    print GUEST "<b> 02: </b>$FORM{'day2'} \n";
  }
  if ( $FORM{'day3'} ){
    print GUEST "<b> 03: </b>$FORM{'day3'} \n";
  }
  if ( $FORM{'day4'} ){
    print GUEST "<b> 04: </b>$FORM{'day4'} \n";
  }
  if ( $FORM{'day5'} ){
    print GUEST "<b> 05: </b>$FORM{'day5'} \n";
  }
  if ( $FORM{'day6'} ){
    print GUEST "<br><b> 06: </b>$FORM{'day6'} \n";
  }
  if ( $FORM{'day7'} ){
    print GUEST "<b> 07: </b>$FORM{'day7'} \n";
  }
  if ( $FORM{'day8'} ){
    print GUEST "<b> 08: </b>$FORM{'day8'} \n";
  }
  if ( $FORM{'day9'} ){
    print GUEST "<b> 09: </b>$FORM{'day9'} \n";
  }
  if ( $FORM{'day10'} ){
    print GUEST "<b> 10: </b>$FORM{'day10'} \n";
  }
  if ( $FORM{'day11'} ){
    print GUEST "<br><b> 11: </b>$FORM{'day11'} \n";
  }
  if ( $FORM{'day12'} ){
    print GUEST "<b> 12: </b>$FORM{'day12'} \n";
  }
  if ( $FORM{'day13'} ){
    print GUEST "<b> 13: </b>$FORM{'day13'} \n";
  }
  if ( $FORM{'day14'} ){
    print GUEST "<b> 14: </b>$FORM{'day14'} \n";
  }
  if ( $FORM{'day15'} ){
    print GUEST "<b> 15: </b>$FORM{'day15'} \n";
  }
  if ( $FORM{'day16'} ){
    print GUEST "<b> 16: </b>$FORM{'day16'} \n";
  }
  if ( $FORM{'day17'} ){
    print GUEST "<b> 17: </b>$FORM{'day17'} \n";
  }
  if ( $FORM{'day18'} ){
    print GUEST "<b> 18: </b>$FORM{'day18'} \n";
  }
  if ( $FORM{'day19'} ){
    print GUEST "<b> 19: </b>$FORM{'day19'} \n";
  }
  if ( $FORM{'day20'} ){
    print GUEST "<b> 20: </b>$FORM{'day20'} \n";
  }
  if ( $FORM{'day21'} ){
    print GUEST "<br><b> 21: </b>$FORM{'day21'} \n";
  }
  if ( $FORM{'day22'} ){
    print GUEST "<b> 22: </b>$FORM{'day22'} \n";
  }
  if ( $FORM{'day23'} ){
    print GUEST "<b> 23: </b>$FORM{'day23'} \n";
  }
  if ( $FORM{'day24'} ){
    print GUEST "<b> 24: </b>$FORM{'day24'} \n";
  }
  if ( $FORM{'day25'} ){
    print GUEST "<b> 25: </b>$FORM{'day25'} \n";
  }
  if ( $FORM{'day26'} ){
    print GUEST "<br><b> 26: </b>$FORM{'day26'} \n";
  }
  if ( $FORM{'day27'} ){
    print GUEST "<b> 27: </b>$FORM{'day27'} \n";
  }
  if ( $FORM{'day28'} ){
    print GUEST "<b> 28: </b>$FORM{'day28'} \n";
  }
  if ( $FORM{'day29'} ){
    print GUEST "<b> 29: </b>$FORM{'day29'} \n";
  }
  if ( $FORM{'day30'} ){
    print GUEST "<b> 30: </b>$FORM{'day30'} \n";
  }
  if ( $FORM{'day31'} ){
    print GUEST "<b> 31: </b>$FORM{'day31'} \n";
  }
  print GUEST "<br>\n";
  if ( $FORM{'vacation'} ){
    print GUEST "<br>Vacation Hours: $FORM{'vacation'}<br>\n";
  }
  if ( $FORM{'sick'} ){
    print GUEST "<br>Sick Hours: $FORM{'sick'}<br>\n";
  }
  if ( $FORM{'other'} ){
    print GUEST "<br>Other (Explain): $FORM{'other'}<br>\n";
  }
print GUEST "<br><b><u>Project Allocation Summary</u></b><br>\n";
  if ( $FORM{'project1'} ){
    print GUEST "Project: <b>$FORM{'project1'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour1'} ){
    print GUEST "Hours: <b>$FORM{'hour1'}</b><br>\n";
  }
  if ( $FORM{'project2'} ){
    print GUEST "Project: <b>$FORM{'project2'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour2'} ){
    print GUEST "Hours: <b>$FORM{'hour2'}</b><br>\n";
  }
  if ( $FORM{'project3'} ){
    print GUEST "Project: <b>$FORM{'project3'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour3'} ){
    print GUEST "Hours: <b>$FORM{'hour3'}</b><br>\n";
  }
  if ( $FORM{'project4'} ){
    print GUEST "Project: <b>$FORM{'project4'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour4'} ){
    print GUEST "Hours: <b>$FORM{'hour4'}</b><br>\n";
  }
  if ( $FORM{'project5'} ){
    print GUEST "Project: <b>$FORM{'project5'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour5'} ){
    print GUEST "Hours: <b>$FORM{'hour5'}</b><br>\n";
  }
  if ( $FORM{'project6'} ){
    print GUEST "Project: <b>$FORM{'project6'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour6'} ){
    print GUEST "Hours: <b>$FORM{'hour6'}</b><br>\n";
  }
  if ( $FORM{'project7'} ){
    print GUEST "Project: <b>$FORM{'project7'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour7'} ){
    print GUEST "Hours: <b>$FORM{'hour7'}</b><br>\n";
  }
  if ( $FORM{'project8'} ){
    print GUEST "Project: <b>$FORM{'project8'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour8'} ){
    print GUEST "Hours: <b>$FORM{'hour8'}</b><br>\n";
  }
  if ( $FORM{'project9'} ){
    print GUEST "Project: <b>$FORM{'project9'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour9'} ){
    print GUEST "Hours: <b>$FORM{'hour9'}</b><br>\n";
  }
  if ( $FORM{'project10'} ){
    print GUEST "Project: <b>$FORM{'project10'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour10'} ){
    print GUEST "Hours: <b>$FORM{'hour10'}</b><br>\n";
  }
  if ( $FORM{'project11'} ){
    print GUEST "Project: <b>$FORM{'project11'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour11'} ){
    print GUEST "Hours: <b>$FORM{'hour11'}</b><br>\n";
  }
  if ( $FORM{'project12'} ){
    print GUEST "Project: <b>$FORM{'project12'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour12'} ){
    print GUEST "Hours: <b>$FORM{'hour12'}</b><br>\n";
  }
  if ( $FORM{'comments'} ){
    print GUEST "<br>Comments: <b>$FORM{'comments'}</b><br>\n";
  }
  if ($separator eq '1') {
     print GUEST " - $date<hr>\n\n";
  }
  else {
     print GUEST " - $date<p>\n\n";
  }
 }
   else { print GUEST $_; }
   }
close (GUEST);

# Log The Entry
if ($uselog eq '1') {
open (LOG, ">>$guestlog");
print LOG "$ENV{'REMOTE_HOST'} - [$FORM{'username'}]<br>\n";
close (LOG);
}

##############
# Sub Routines


sub no_name
{
  print "Content-type: text/html\n\n";
  print "<html><head><title>No Name</title></head>\n";
  print "<body><h2>You didn't enter your name. Therefore, your timesheet can
not be submitted.  Please press the <b>BACK</b> button to return to the
form.</h2>\n";
  print "</body></html>\n";

# Log The Error
if ($uselog eq '1') {
open (LOG, ">>$guestlog");
print LOG "$ENV{'REMOTE_HOST'} - [$shortdate] <b>ERR</b> - No Name<br>\n";
close (LOG);
}
  exit;
}

#########
# Options

# Mail Option
if ($mail eq '1') {
 open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n";
 print MAIL "Reply-to: $FORM{'username'} ($FORM{'realname'}\n";
 print MAIL "From: $FORM{'username'} ($FORM{'realname'}\n";
 print MAIL "Subject: Entry to Guest Book\n\n";
 print MAIL "You have a new entry in your guest book:\n\n";
 print MAIL
"------------------------------------------------------------\n";
 print MAIL "$FORM{'comments'}\n";
 print MAIL "$FORM{'realname'}";
  if ( $FORM{'username'} ){
    print MAIL " ($FORM{'username'})";
  }
 print MAIL "\n";
  if ( $FORM{'city'} ){
    print MAIL "$FORM{'city'},";
  }
  if ( $FORM{'state'} ){
    print MAIL " $FORM{'state'}";
  }
  if ( $FORM{'country'} ){
    print MAIL " $FORM{'country'}";
  }
 print MAIL " - $date\n";
 print MAIL "----------------------------------------------------------\n";
close (MAIL);
}

# Print Out Initial Output Location Heading
if ($redirection eq '1') {
  print "Location: $server$guestbookurl\n\n";
}
else { &redirection }

# Redirection Option
sub redirection
{
# Print Beginning of HTML
print "Content-Type: text/html\n\n";
print "<html><head><title>Thank You</title></head>\n";
print "<body><h1>Thank You</h1>\n";

# Print Response
print "Here is what you submitted to Accounting:<hr>\n";
print "<b>$FORM{'periodending'}</b><br>\n";
print "<b>$FORM{'timesheetsdue'}</b><p>\n";
print "Employee Name: <b>$FORM{'realname'}</b>";
  if ( $FORM{'username'} ){
     if ($linkmail eq '1') {
       print " (<a
href=\"mailto:$FORM{'username'}\">$FORM{'username'}</a>)";
     }
     else { print " ($FORM{'username'})" }
  }
print "<br>\n";
  if ( $FORM{'costcenter'} ){
    print "Cost Center: <b>$FORM{'costcenter'}</b><p>\n";
print "<b><u>Date and Work Status</u></b><br>\n";
  }
  if ( $FORM{'day1'} ){
    print "<b> 01: </b>$FORM{'day1'} \n";
  }
  if ( $FORM{'day2'} ){
    print "<b> 02: </b>$FORM{'day2'} \n";
  }
  if ( $FORM{'day3'} ){
    print "<b> 03: </b>$FORM{'day3'} \n";
  }
  if ( $FORM{'day4'} ){
    print "<b> 04: </b>$FORM{'day4'} \n";
  }
  if ( $FORM{'day5'} ){
    print "<b> 05: </b>$FORM{'day5'} \n";
  }
  if ( $FORM{'day6'} ){
    print "<br><b> 06: </b>$FORM{'day6'} \n";
  }
  if ( $FORM{'day7'} ){
    print "<b> 07: </b>$FORM{'day7'} \n";
  }
  if ( $FORM{'day8'} ){
    print "<b> 08: </b>$FORM{'day8'} \n";
  }
  if ( $FORM{'day9'} ){
    print "<b> 09: </b>$FORM{'day9'} \n";
  }
  if ( $FORM{'day10'} ){
    print "<b> 10: </b>$FORM{'day10'}\n";
  }
  if ( $FORM{'day11'} ){
    print "<br><b> 11: </b>$FORM{'day11'} \n";
  }
  if ( $FORM{'day12'} ){
    print "<b> 12: </b>$FORM{'day12'} \n";
  }
  if ( $FORM{'day13'} ){
    print "<b> 13: </b>$FORM{'day13'} \n";
  }
  if ( $FORM{'day14'} ){
    print "<b> 14: </b>$FORM{'day14'} \n";
  }
  if ( $FORM{'day15'} ){
    print "<b> 15: </b>$FORM{'day15'} \n";
  }
  if ( $FORM{'day16'} ){
    print "<b> 16: </b>$FORM{'day16'} \n";
  }
  if ( $FORM{'day17'} ){
    print "<b> 17: </b>$FORM{'day17'} \n";
  }
  if ( $FORM{'day18'} ){
    print "<b> 18: </b>$FORM{'day18'} \n";
  }
  if ( $FORM{'day19'} ){
    print "<b> 19: </b>$FORM{'day19'} \n";
  }
  if ( $FORM{'day20'} ){
    print "<b> 20: </b>$FORM{'day20'} \n";
  }
  if ( $FORM{'day21'} ){
    print "<br><b> 21: </b>$FORM{'day21'} \n";
  }
  if ( $FORM{'day22'} ){
    print "<b> 22: </b>$FORM{'day22'} \n";
  }
  if ( $FORM{'day23'} ){
    print "<b> 23: </b>$FORM{'day23'} \n";
  }
  if ( $FORM{'day24'} ){
    print "<b> 24: </b>$FORM{'day24'} \n";
  }
  if ( $FORM{'day25'} ){
    print "<b> 25: </b>$FORM{'day25'} \n";
  }
  if ( $FORM{'day26'} ){
    print "<br><b> 26: </b>$FORM{'day26'} \n";
  }
  if ( $FORM{'day27'} ){
    print "<b> 27: </b>$FORM{'day27'} \n";
  }
  if ( $FORM{'day28'} ){
    print "<b> 28: </b>$FORM{'day28'} \n";
  }
  if ( $FORM{'day29'} ){
    print "<b> 29: </b>$FORM{'day29'} \n";
  }
  if ( $FORM{'day30'} ){
    print "<b> 30: </b>$FORM{'day30'} \n";
  }
  if ( $FORM{'day31'} ){
    print "<b> 31: </b>$FORM{'day31'} \n";
  }
  print "<br>\n";
  if ( $FORM{'vacation'} ){
    print "<br>Vacation Hours: $FORM{'vacation'}\n";
  }
  if ( $FORM{'sick'} ){
    print "<br>Sick Hours: $FORM{'sick'}\n";
  }
  if ( $FORM{'other'} ){
    print "<br>Other (Explain): $FORM{'other'}\n";
  }
print "<br><br><b><u>Project Allocation Summary</u></b><br>\n";
  if ( $FORM{'project1'} ){
    print "Project: <b>$FORM{'project1'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour1'} ){
    print "Hours: <b>$FORM{'hour1'}</b><br>\n";
  }
  if ( $FORM{'project2'} ){
    print "Project: <b>$FORM{'project2'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour2'} ){
    print "Hours: <b>$FORM{'hour2'}</b><br>\n";
  }
  if ( $FORM{'project3'} ){
    print "Project: <b>$FORM{'project3'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour3'} ){
    print "Hours: <b>$FORM{'hour3'}</b><br>\n";
  }
  if ( $FORM{'project4'} ){
    print "Project: <b>$FORM{'project4'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour4'} ){
    print "Hours: <b>$FORM{'hour4'}</b><br>\n";
  }
  if ( $FORM{'project5'} ){
    print "Project: <b>$FORM{'project5'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour5'} ){
    print "Hours: <b>$FORM{'hour5'}</b><br>\n";
  }
  if ( $FORM{'project6'} ){
    print "Project: <b>$FORM{'project6'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour6'} ){
    print "Hours: <b>$FORM{'hour6'}</b><br>\n";
  }
  if ( $FORM{'project7'} ){
    print "Project: <b>$FORM{'project7'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour7'} ){
    print "Hours: <b>$FORM{'hour7'}</b><br>\n";
  }
  if ( $FORM{'project8'} ){
    print "Project: <b>$FORM{'project8'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour8'} ){
    print "Hours: <b>$FORM{'hour8'}</b><br>\n";
  }
  if ( $FORM{'project9'} ){
    print "Project: <b>$FORM{'project9'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour9'} ){
    print "Hours: <b>$FORM{'hour9'}</b><br>\n";
  }
  if ( $FORM{'project10'} ){
    print "Project: <b>$FORM{'project10'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour10'} ){
    print "Hours: <b>$FORM{'hour10'}</b><br>\n";
  }
  if ( $FORM{'project11'} ){
    print "Project: <b>$FORM{'project11'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour11'} ){
    print "Hours: <b>$FORM{'hour11'}</b><br>\n";
  }
  if ( $FORM{'project12'} ){
    print "Project: <b>$FORM{'project12'}</b> &#160 &#160 \n";
  }
  if ( $FORM{'hour12'} ){
    print "Hours: <b>$FORM{'hour12'}</b><br>\n";
  }
print "<br>\n";
#print " - $date<p>\n";

# Print End of HTML
print "Comments: <b>$FORM{'comments'}</b><br>\n";
print "<hr>\n";
print " Back to <a href=\"http://intranet\"><b>AEI Intranet
Site</b></a><p>";
print "</body></html>\n";
exit;
}
#################################End Code##########################




------------------------------

Date: 08 Jul 2003 16:09:49 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: Why is it Not Writing to File on Netware 5 Box?
Message-Id: <eto65mcacwi.fsf@wormtongue.emschwar>

"Chris Abraham" <cja@dds.nl> writes:
> I am having a very frustrating experience with one of Matt's guestbook CGI
> scripts. 

This one's easy:  Don't Do That(tm).  Matt's scripts are universally
acknowledged (even by Matt himself) to be poorly written, buggy, and a
pain in the arse to maintain.  Check out the replacements at
http://sourceforge.net/projects/nms-cgi/ instead.

-=Eric
-- 
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
		-- Blair Houghton.


------------------------------

Date: Tue, 08 Jul 2003 23:17:17 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Why is it Not Writing to File on Netware 5 Box?
Message-Id: <3f0b5068.371233234@news.erols.com>

"Chris Abraham" <cja@dds.nl> wrote:

: I have fears that it has nothing to do with Perl,

Probably right.

: I WAS NOT able to get the PERL SCRIPT to write to the guestbook html file:

: The Perl script is to follow, as I got it, before I localized it for the BSD
: box:

[snip]
: open (FILE,"$guestbookreal");
[...]
: open (GUEST,">$guestbookreal");
[...]
: open (LOG, ">>$guestlog");
[...]
: open (LOG, ">>$guestlog");
[...]

Always check the return from open() for success.  If it fails, have
the program tell you what caused the failure.

    open(FILE, $filename) or die "Cannot open '$filename': $!";

Do you really want to trust a program that doesn't handle this most
basic of exceptions?  Drop it and find a competently written
replacement.

Unrelated:
"Robert" <yyyy@yyy.com> will benefit from the same advice, if he can
stop being a twit long enough to do some reading.



------------------------------

Date: Tue, 08 Jul 2003 21:18:41 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Why is module list so out of date?
Message-Id: <Xns93B2E2FA985DBsdn.comcast@206.127.4.25>

Does anyone know why http://cpan.org/modules/00modlist.long.html is so far 
out of date?

 $Revision: 3.112 $ $Date: 2002/08/27 23:28:18 $ -*- coding:utf-8 -*-

-- 
Eric
$_ =  reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print


------------------------------

Date: 9 Jul 2003 02:21:11 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Why is module list so out of date?
Message-Id: <slrnbgmv0n.s2t.sholden@flexal.cs.usyd.edu.au>

On Tue, 08 Jul 2003 21:18:41 -0500,
	Eric J. Roode <REMOVEsdnCAPS@comcast.net> wrote:
> Does anyone know why http://cpan.org/modules/00modlist.long.html is so far 
> out of date?
> 
>  $Revision: 3.112 $ $Date: 2002/08/27 23:28:18 $ -*- coding:utf-8 -*-

Because no modules have been added/removed from core since then???

-- 
Sam Holden



------------------------------

Date: Wed, 09 Jul 2003 05:33:58 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Why is module list so out of date?
Message-Id: <Xns93B342CCAC7F2sdn.comcast@206.127.4.25>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

sholden@flexal.cs.usyd.edu.au (Sam Holden) wrote in
news:slrnbgmv0n.s2t.sholden@flexal.cs.usyd.edu.au: 

> On Tue, 08 Jul 2003 21:18:41 -0500,
>      Eric J. Roode <REMOVEsdnCAPS@comcast.net> wrote:
>> Does anyone know why http://cpan.org/modules/00modlist.long.html is
>> so far out of date?
>> 
>>  $Revision: 3.112 $ $Date: 2002/08/27 23:28:18 $ -*- coding:utf-8 -*-
> 
> Because no modules have been added/removed from core since then???
> 

No... the module list contains far more modules than just core modules, or 
modules that are included with Perl distributions.

It was my understanding that the module list contains all modules that have 
an officially registered namespace, but maybe I have that wrong.

- -- 
Eric
$_ =  reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPwvvlWPeouIeTNHoEQK40QCglHPActOszKNyRjNBJQx9bBG0nZ8AnRDy
7ZO+8mSqdXc8l5LKnRmKJDwI
=F2y2
-----END PGP SIGNATURE-----


------------------------------

Date: 9 Jul 2003 14:33:00 GMT
From: randy@theoryx5.uwinnipeg.ca (Randy Kobes)
Subject: Re: Why is module list so out of date?
Message-Id: <slrnbgo8tq.np.randy@theoryx5.uwinnipeg.ca>

On Wed, 09 Jul 2003 05:33:58 -0500, 
  Eric J. Roode <REMOVEsdnCAPS@comcast.net> wrote:
>-----BEGIN xxx SIGNED MESSAGE-----
>Hash: SHA1
>
>sholden@flexal.cs.usyd.edu.au (Sam Holden) wrote in
>news:slrnbgmv0n.s2t.sholden@flexal.cs.usyd.edu.au: 
>
>> On Tue, 08 Jul 2003 21:18:41 -0500,
>>      Eric J. Roode <REMOVEsdnCAPS@comcast.net> wrote:
>>> Does anyone know why http://cpan.org/modules/00modlist.long.html is
>>> so far out of date?
>>> 
>>>  $Revision: 3.112 $ $Date: 2002/08/27 23:28:18 $ -*- coding:utf-8 -*-
>> 
>> Because no modules have been added/removed from core since then???
>
>No... the module list contains far more modules than just core modules, 
>or modules that are included with Perl distributions.
>
>It was my understanding that the module list contains all modules 
>that have an officially registered namespace, but maybe I have 
>that wrong.

I'm not sure why this particular list is behind, but CPAN.pm
uses $CPAN/modules/02packages.details.txt.gz and
$CPAN/modules/03modlist.data.gz, which are regularly
updated.

-- 
best regards,
randy kobes


------------------------------

Date: Tue, 08 Jul 2003 15:35:47 GMT
From: rosenthd@yahoo.com
Subject: Win32 Perl 5.8.0 Compile, Undefined Reference
Message-Id: <1vllgvoslnfq9kuoeob0rdl7a327irr26j@4ax.com>

Hi,
    I finallly decided to try compiling PERL on my own, and I get this
error, from the Perl 58dll   compile step.

Environment:
   Op Sys:  Win 2000 Professional
  GCC-  Mingw 2.95-2
  Dmake = 4.1

>gcc -mdll -o ..\perl58.dll -Wl,--base-file -Wl,perl.base  -g -L"c:\new\perl\5.8.
>0\lib\MSWin32-x86-multi-thread\CORE" -L"C:\gcc-2.95.2\lib" \
>            C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mk000001
>dlltool --output-lib ..\libperl58.a \
>                --dllname perl58.dll \
>                --def perldll.def \
>                --base-file perl.base \
>                --output-exp perl.exp
>gcc -mdll -o ..\perl58.dll  -g -L"c:\new\perl\5.8.0\lib\MSWin32-x86-multi-thread
>\CORE" -L"C:\gcc-2.95.2\lib" \
>            C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mk000100
>perl.exp(.edata+0x38):fake: undefined reference to `PL_Argv'
>perl.exp(.edata+0x3c):fake: undefined reference to `PL_Cmd'
>perl.exp(.edata+0x40):fake: undefined reference to `PL_DBgv'
>..... to PL_yyval

I had to fix line 3547 of config.h 

from:
#ifndef USE_PERLIO
#USE_PERLIO		/**/
#endif

to:
#ifndef USE_PERLIO
#define	USE_PERLIO		/**/
#endif

So that av.o would compile from av.c


I seem to be missing all of the references that are defined in the
lib\Core\*.h files,  but I'm not sure how to fix this.  

Thank you,

Dan


------------------------------

Date: Wed, 9 Jul 2003 10:20:23 +1000
From: "Sisyphus" <kalinabears@hdc.com.au>
Subject: Re: Win32 Perl 5.8.0 Compile, Undefined Reference
Message-Id: <3f0b60d4$0$406@echo-01.iinet.net.au>


<rosenthd@yahoo.com> wrote in message
news:1vllgvoslnfq9kuoeob0rdl7a327irr26j@4ax.com...
> Hi,
>     I finallly decided to try compiling PERL on my own, and I get this
> error, from the Perl 58dll   compile step.
>
> Environment:
>    Op Sys:  Win 2000 Professional
>   GCC-  Mingw 2.95-2
>   Dmake = 4.1
>
> >gcc -mdll -o
 ..\perl58.dll -Wl,--base-file -Wl,perl.base  -g -L"c:\new\perl\5.8.
> >0\lib\MSWin32-x86-multi-thread\CORE" -L"C:\gcc-2.95.2\lib" \
> >            C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mk000001
> >dlltool --output-lib ..\libperl58.a \
> >                --dllname perl58.dll \
> >                --def perldll.def \
> >                --base-file perl.base \
> >                --output-exp perl.exp
> >gcc -mdll -o
 ..\perl58.dll  -g -L"c:\new\perl\5.8.0\lib\MSWin32-x86-multi-thread
> >\CORE" -L"C:\gcc-2.95.2\lib" \
> >            C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mk000100
> >perl.exp(.edata+0x38):fake: undefined reference to `PL_Argv'
> >perl.exp(.edata+0x3c):fake: undefined reference to `PL_Cmd'
> >perl.exp(.edata+0x40):fake: undefined reference to `PL_DBgv'
> >..... to PL_yyval
>
> I had to fix line 3547 of config.h
>
> from:
> #ifndef USE_PERLIO
> #USE_PERLIO /**/
> #endif
>
> to:
> #ifndef USE_PERLIO
> #define USE_PERLIO /**/
> #endif
>
> So that av.o would compile from av.c
>

I think that's the change that's documented in one of the perl source docs
(probably the win32 readme) isn't it ? If so, I had to make the same change.

>
> I seem to be missing all of the references that are defined in the
> lib\Core\*.h files,  but I'm not sure how to fix this.
>

You need the 'msvcrt' version of gcc, not the 'cdtdll' version.
I installed by running gcc-2.95.2-msvcrt.exe, and then applied the fixes by
running quote-fix-msvcrt.exe. (I've only been through this once, and it was
some time ago, but I *think* that was how it was done.)

Btw, my reading of the perl source docs was that you needed that specific
version of gcc (ie 2.95.2) - but I don't think that's the case. I've noticed
that others have built perl with much later versions. Perhaps the docs
merely intended to say that you need 2.95.2 or later.

Anyway, I've stayed with 2.95.2 and building perl was fairly trivial - which
leads me to think that your problem is with your gcc installation.

Cheers,
Rob




------------------------------

Date: 9 Jul 2003 12:04:36 -0700
From: kpowell10@hotmail.com (kpowell10)
Subject: WIN32::OLE - Printing a PDF document from Windows
Message-Id: <840ec4ee.0307091104.acb332d@posting.google.com>

Hello all,

I'm trying to go through a folder full of Words docs and create a PDF
doc for each of them using WIN32::OLE.  The problem I'm having is that
I can't get the "FileName" line to work so that I can automate the
naming of the files.

Here's the code:
*************************************************************
use Cwd 'abs_path';
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Word';
my $Word = Win32::OLE->new('Word.Application', 'Quit');
$Word->{'Visible'} = 0;
$Word->{ActivePrinter} = 'Acrobat PDFWriter on LPT1:';
$dirname = abs_path($ENV{'PWD'});

####  Fill @files with the names of every file
opendir(DIR, $dirname) or die("unable opendir $dirname: $!");
while (defined($file = readdir(DIR))){
	if ($file =~/.doc$/i){
	  push(@files,$file);
	}
}

####  For each file in the folder (inside @files), 
####  if it's a Word doc, print it to a PDF file
foreach $file (@files){
  if ($file =~/.doc$/i){
    $fullfile="$dirname\\$file";
    $_ = $fullfile;
    s/doc$//;
    $newfile=$_;
    print "Word doc - $fullfile\n";
    $Word->Documents->Open($fullfile) or die("Can't access file ",
Win32::OLE->LastError());
    $Word->ActiveDocument->PrintOut({
      ####  Here's the problem - if I comment out the line below, 
      ####  it will print, but prompts for a file name.  If 
      ####  the 'Filename' line exists at all, it doesn't 
      ####  print out the pdf file.  I want this automated 
      ####  so I'm not prompted for the filename.
      #'FileName'   => '$fullfule.pdf',
    });
    $Word->ActiveDocument->Close;
  }
}
*************************************************************

If I haven't included enough information, please let me know.  Thanks
in advance,

Kyle


------------------------------

Date: Wed, 9 Jul 2003 16:55:42 -0500
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: WIN32::OLE - Printing a PDF document from Windows
Message-Id: <bei346$e9n$1@slb4.atl.mindspring.net>

"kpowell10" <kpowell10@hotmail.com> wrote in message
news:840ec4ee.0307091104.acb332d@posting.google.com...
> Hello all,
>
> I'm trying to go through a folder full of Words docs and create a PDF
> doc for each of them using WIN32::OLE.  The problem I'm having is that
> I can't get the "FileName" line to work so that I can automate the
> naming of the files.
>
> Here's the code:
> *************************************************************
<snip>
>       #'FileName'   => '$fullfule.pdf',

What was the error message you received on account of your typo above? I
believe you meant, even though it was incorrect,

       'FileName'   => '$fullfile.pdf',

which appears to be legal Perl syntax, but does not work because $fullfile
is not evaluated. Try using the correct attribute for PrintOut, i.e.,

       OutputFileName   => "fullfile.pdf",

<snip>
> If I haven't included enough information, please let me know.  Thanks
> in advance,

Kyle, you might try a Google Groups search for "win32::ole acrobat dorey",
where you'll find some helpful information.

One of the difficulties you'll have is that this is not really a Perl
problem, as legal Perl code may fail for reasons not related to Perl.

Good luck.

Bill Segraves




------------------------------

Date: Wed, 09 Jul 2003 22:55:24 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: WIN32::OLE - Printing a PDF document from Windows
Message-Id: <3f0c9a95.455770512@news.erols.com>

kpowell10@hotmail.com (kpowell10) wrote:

: I'm trying to go through a folder full of Words docs and create a PDF
: doc for each of them using WIN32::OLE.  The problem I'm having is that
: I can't get the "FileName" line to work so that I can automate the
: naming of the files.

[snip]

:     $Word->ActiveDocument->PrintOut({
:       ####  Here's the problem - if I comment out the line below, 
:       ####  it will print, but prompts for a file name.  If 
:       ####  the 'Filename' line exists at all, it doesn't 
:       ####  print out the pdf file.  I want this automated 
:       ####  so I'm not prompted for the filename.
:       #'FileName'   => '$fullfule.pdf',
:     });

There wasn't a solution handy the last time this was asked.
See Message-ID: <3E24285E.8973C356@emirates.net.ae>

The OP did take the advice given, though.  He got what looks like a
reasonable answer in microsoft.public.vb.ole.automation, but there's
no evident followup saying whether it worked.  
See the thread starting at
Message-ID: <566501c2bbda$d67a5040$8af82ecf@TK2MSFTNGXA03> .

The API reference would be useful.
http://partners.adobe.com/asn/acrobat/docs/createpdfapi/PDFWriterAPIReference.pdf

It mentions some jive about a registry key that will suppress the
dialog box.  That sounds like the real solution.



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 5207
***************************************


home help back first fref pref prev next nref lref last post