[17021] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4433 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 26 11:10:25 2000

Date: Tue, 26 Sep 2000 08:10:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <969981013-v9-i4433@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 26 Sep 2000     Volume: 9 Number: 4433

Today's topics:
        More Newbie Help <jon.klaff@rdel.co.uk>
    Re: Need help on Hash ? <ren.maddox@tivoli.com>
        Perl for Win 3.1 <stevehaysom@hotmail.com>
    Re: Perl for Win 3.1 <thunderbear@bigfoot.com>
        Perl vs. PHP/Java (Tony Balazs)
    Re: Perl vs. PHP/Java fritz.heinrichmeyer@fernuni-hagen.de
    Re: Perl vs. PHP/Java (Rafael Garcia-Suarez)
    Re: Perl vs. PHP/Java <anders@wall.alweb.dk>
        perl_call_* funcs and multiple interpreter instances <broomfondle@bigpond.com>
    Re: Portable equivalent of `cat`? nobull@mail.com
    Re: Programmer Needed! (Martien Verbruggen)
        Question about fork/exec <Me@you.com>
        redirect script <Keat@beal.org.uk>
    Re: redirect script <anders@wall.alweb.dk>
    Re: redirect script <amonotod@netscape.net>
    Re: regexp woes w/ Text-BibTeX <jdhunter@nitace.bsd.uchicago.edu>
    Re: Send HTMLmail via Perl Script joshfeingold@my-deja.com
    Re: Send HTMLmail via Perl Script <c960334@student.dtu.dk>
    Re: sendmail (Villy Kruse)
        Uncaught exception question <dbohl@sgi.com>
    Re: Uncaught exception question <anders@wall.alweb.dk>
    Re: Warning message in Win32::ODBC module (Philip Lees)
    Re: West Chester, PA 19380 Perl Users Group? <gellyfish@gellyfish.com>
    Re: Windows 98 / Active Perl / CGI oi03_2000@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 26 Sep 2000 14:26:38 GMT
From: "Jonathan Klaff" <jon.klaff@rdel.co.uk>
Subject: More Newbie Help
Message-Id: <01c027c5$d41684a0$30b815ac@ntwc0585>

I have found a way around my earlier problem, but would also like to know
how I can source a shell script from a perl script.

Please excuse my newbiesness.

Jon


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

Date: 25 Sep 2000 20:06:35 -0500
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: Need help on Hash ?
Message-Id: <m3snqo9d2c.fsf@dhcp11-177.support.tivoli.com>

Tim Conrow <tim@ipac.caltech.edu> writes:

> tvn007@my-deja.com wrote:
> > 
> > Hi,
> > 
> > Could someone please help me on this ?
> > 
> > I have two files:
> > 
> > File #1
> > 
> > A3   34
> > B33  100
> > 
> > File #2
> > 
> > Station1   A3
> > Station2   B33
> > 
> > I would like to have the output as follow:
> > 
> > Station1  34
> > Station2  100
> 
> If the files are of modest size:
> 
> open(my $fh1,"<file1name") or die "file1: $!";
> open(my $fh2,"<file2name") or die "file2: $!";
> my %file1 = split(" ",join("",<$fh1>));
> my %file2 = split(" ",join("",<$fh2>));
> print $file1{$file2{Station1}}."\n";

Which prints:

34

I would use something like:

#!/usr/bin/perl -w
use strict;

my $file1 = shift;
my $file2 = shift;
die "Usage: $0 file1 file2\n" unless defined $file1 and defined $file2;

open my $fh1, $file1 or die "Could not open $file1: $!\n";
my %file1 = map split, <$fh1>;
close $fh1;

open my $fh2, $file2 or die "Could not open $file2: $!\n";
while ( <$fh2> ) {
  my @fields = split;
  print "$fields[0] $file1{$fields[1]}\n";
}
close $fh2;
__END__

-- 
Ren Maddox
ren@tivoli.com


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

Date: Tue, 26 Sep 2000 11:39:16 +0100
From: "Stephen Haysom" <stevehaysom@hotmail.com>
Subject: Perl for Win 3.1
Message-Id: <39d07da4$1@news.telinco.net>

Does anyone know where to find Perl for Win 3.1. I can't find anything on
the usual sites.

Thanks

Steve Haysom




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

Date: Tue, 26 Sep 2000 14:26:27 +0200
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: Perl for Win 3.1
Message-Id: <39D095F3.B247CA6D@bigfoot.com>

Stephen Haysom wrote:
> 
> Does anyone know where to find Perl for Win 3.1. I can't find anything on
> the usual sites.

Start here:  http://www.cpan.org/ports/index.html#win31

-- 
  Thorbjørn Ravn Andersen         "...plus...Tubular Bells!"
  http://bigfoot.com/~thunderbear


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

Date: Tue, 26 Sep 2000 10:14:15 GMT
From: tbalazs-this-must-go@netcomuk.co.uk (Tony Balazs)
Subject: Perl vs. PHP/Java
Message-Id: <39d074d4.6302178@1.0.0.119>

We are soon going to upgrade our Website (we are a recruitment agency)
to include functionality for recruiters to update vacancies online and
for candidates to search a database for vacancies of interest to them
(standard stuff).  We would probably have no more than 200 vacancies
in the database at any one time.

It has been recommended to us that we use either Java or PHP to
implement the development, which will necessitate hosting our site at
a new ISP as our current one doesn't support PHP, ASP or that kind of
stuff.

I have said that I think that a small site such as ours should be able
to be implemented using Perl only, which would be supported where we
are currently hosted.  Do you think that this is the case?  Are update
and search utilities pretty usual for Perl implementations?

Thank you for any advice.

Tony Balazs.


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

Date: 26 Sep 2000 13:06:07 +0200
From: fritz.heinrichmeyer@fernuni-hagen.de
Subject: Re: Perl vs. PHP/Java
Message-Id: <ufog1be7kw.fsf@jfh00.fernuni-hagen.de>

Hello,

i consider the move from php to perl, as i think there are at least
three phantastical replacements for php, even Zope (Mason, Embperl,
Apache::ASP) and perl is more powerful (multiple return, read syntax for
nested hashes and nested list, "a breath of lisp" btw. )

Is there a php_to_perl perl program anywhere?


-- 
Fritz Heinrichmeyer mailto:fritz.heinrichmeyer@fernuni-hagen.de
FernUniversitaet Hagen, LG ES, 58084 Hagen (Germany)
tel:+49 2331/987-1166 fax:987-355 http://www-es.fernuni-hagen.de/~jfh


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

Date: Tue, 26 Sep 2000 11:39:43 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Perl vs. PHP/Java
Message-Id: <slrn8t134e.ej9.rgarciasuarez@rafael.kazibao.net>

fritz.heinrichmeyer@fernuni-hagen.de wrote in comp.lang.perl.misc:
>Hello,
>
>i consider the move from php to perl, as i think there are at least
>three phantastical replacements for php, even Zope (Mason, Embperl,
>Apache::ASP) and perl is more powerful (multiple return, read syntax for
>nested hashes and nested list, "a breath of lisp" btw. )

The thing I miss the most with PHP is regular expressions. Other things
are not so important for most CGI programs.

-- 
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/


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

Date: Tue, 26 Sep 2000 15:22:45 +0200
From: Anders Lund <anders@wall.alweb.dk>
Subject: Re: Perl vs. PHP/Java
Message-Id: <Mr1A5.2389$Pf.126220@news010.worldonline.dk>

Tony Balazs wrote:

> We are soon going to upgrade our Website (we are a recruitment agency)
> to include functionality for recruiters to update vacancies online and
> for candidates to search a database for vacancies of interest to them
> (standard stuff).  We would probably have no more than 200 vacancies
> in the database at any one time.
> 
> It has been recommended to us that we use either Java or PHP to
> implement the development, which will necessitate hosting our site at
> a new ISP as our current one doesn't support PHP, ASP or that kind of
> stuff.
> 
> I have said that I think that a small site such as ours should be able
> to be implemented using Perl only, which would be supported where we
> are currently hosted.  Do you think that this is the case?  Are update
> and search utilities pretty usual for Perl implementations?
> 
> Thank you for any advice.
> 
> Tony Balazs.

Of cause, for such things perl is *the choice*.

Look at the docs for DBI, you can use a flat file text db for that.

-anders


-- 
[ the word wall - and the trailing dot - in my email address
is my _fire_wall - protecting me from the criminals abusing usenet]


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

Date: Tue, 26 Sep 2000 11:36:06 GMT
From: "Steve Gibson" <broomfondle@bigpond.com>
Subject: perl_call_* funcs and multiple interpreter instances
Message-Id: <GS%z5.7049$Z06.55686@news-server.bigpond.net.au>

Hi all,

I'm in the process of developing a shared library in C that uses an embedded
Perl interpreter. This aim is to allow the application user to define
callback functions, that would ordinarily have to be written in C, to be
written in Perl.

My question relates to the perl_call_* functions, and how they interact with
multiple instances of the Perl interpreter. The application that calls the
library is multi-threaded, and the safest/fastest way to make sure the
library is thread safe is to run a new instance of Perl for each thread
using the library. However, the perl_call_* functions do not take any
arguments relating to the Perl instance.

Does anybody know how calls to perl_call_* will react in an environment
where multiple Perl instances exist, or is there a way to define which
instance the perl_call_* functions will use?

Thanks in advance

 ---
Steve Gibson <sgibson@verity.com>
National Systems Engineer, Verity Australia Pty Ltd
Level 20, 99 Walker Street, North Sydney, 2060
Ph: +61 2 9657 1055  Fx: +61 2 9657 1059  Mb: +61 4 1959 0682




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

Date: 26 Sep 2000 12:13:50 +0100
From: nobull@mail.com
Subject: Re: Portable equivalent of `cat`?
Message-Id: <u9vgvj76dt.fsf@wcl-l.bham.ac.uk>

Tim Richardson <ter@my-deja.com> writes:

>  In a script I want to send the contents of a file to stdout.

> File::Copy seems to be one solution.

And a damn good one too.

> The problem seems so trivial, I wonder if I'm missing something.

No, you could, of course, simply do the same as File::Copy using
the primative open()/read()/print()/close() functions but that's not
really any better is it?

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Tue, 26 Sep 2000 21:52:33 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Programmer Needed!
Message-Id: <slrn8t0vvh.jr6.mgjv@martien.heliotrope.home>

On Mon, 25 Sep 2000 00:44:36 GMT,
	April Melton <aprmelton@earthlink.net> wrote:
> I have a partially perl written program. The script is functional
> except for one sub-routine that doesn't work properly. It's
> probably a simple error I can't see after hours of looking for it.
> 
> The sub-routine is sub delete.

Hmmm...

# perldoc -f delete
       delete EXPR
               Given an expression that specifies a hash element,
               array element, hash slice, or array slice, deletes
               the specified element(s) from the hash or array.
               In the case of an array, if the array elements
               happen to be at the end, the size of the array
               will shrink to the highest element that tests true
               for exists() (or 0 if no such element exists).

> It is  supposed to take some submitted form
> information, write it to a temporary file & close the file.
> Then it should open a flat file datebase, read the
> information & unlink corresponding files. And finally,
> it should re-open the temp file and create new files to
> replace the old.

Maybe you should pick subroutine names that are not already taken by
perl's builtins, _and_ that actually describe what they do. 'delete'
just doesn't translate to all the stuff you write above. In fact, all
the stuff you wrote above is probably much more than should be done in
one sub.

> If you'd like to take a stab at this freelance project,
> please email me for further details & tell me your hourly rate.

Sorry, not for hire. And I'm not entirely sure you'd be willing to pay
me what I'd ask anyway :)

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Can't say that it is, 'cause it
Commercial Dynamics Pty. Ltd.   | ain't.
NSW, Australia                  | 


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

Date: Tue, 26 Sep 2000 14:01:10 GMT
From: "Me@You.com" <Me@you.com>
Subject: Question about fork/exec
Message-Id: <G_1A5.20789$nk3.1003267@newsread03.prod.itd.earthlink.net>

I am willing, as a complete newbie, to take any flames as a result of my
post...
Help me, Obi-Perl-Kanobi, you're my only hope!

I construct an sql statement and put it into a file in /tmp.  I want to run
the file through dbaccess (Informix).  The sql creates an output file in
/tmp as well.  I want to make sure that the sql is successful, and that the
resulting output file is created.

The problem:  when the code is executed as written below, the sql doesn't
seem to run, and the output file is not created by the dbaccess/sql!   If I
put an '&' at the end of the exec statement, and run the dbaccess in the
background, the sql is completed, and the file is created!  I have gone
through the Perl Cookbook, and "Learning Perl" (from where this code
fragment was taken), but I am unable to find out why my program doesn't wait
for the exec to finish...
 ...
 ...
if (!defined($kidpid = fork() ) )
{       #       fork returned undef,it failed
        die "Cannot Fork for dbaccess process: $!";
}
elsif ($kidpid == 0)
{       #       fork returned a zero, so this branch is the "child"
#
# when I use the following statement, the program just runs on, and doesn't
wait
# for the dbaccess to complete.  for some reason, the file from the sql is
NOT
# created!
        exec("dbaccess the_db /tmp/sql_stmt.sql ");

# If I use the ampersand here, the sql runs, completes, and the output file
# is created!!
#        exec("dbaccess the_db /tmp/sql_stmt.sql &");
# ===============================^

        #       if the exec fails, this next statement will execute!
        die "Cannot exec dbaccess statement!: $!";
}
else
{       #       fork returned neither 0 nor undef, so this branch is the
parent
        print "Waiting\n";              ## for debug
        waitpid($kidpid, 1);
}
 ...
 ...





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

Date: Tue, 26 Sep 2000 14:04:18 +0100
From: "Keat" <Keat@beal.org.uk>
Subject: redirect script
Message-Id: <8qq6lh$fi6$1@gxsn.com>

I'm looking for a perl script that will automatically open up another url
when exiting the original,  I know its possible as I've seen it done on the
xxx sites, but I cant seem to find a script anywhere. Does anyone have any
ideas where I can find such a script....????

Please reply to keat@beal.org.uk
Keaton Roebuck




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

Date: Tue, 26 Sep 2000 15:14:31 +0200
From: Anders Lund <anders@wall.alweb.dk>
Subject: Re: redirect script
Message-Id: <2k1A5.2386$Pf.126286@news010.worldonline.dk>

Keat wrote:

> I'm looking for a perl script that will automatically open up another url
> when exiting the original,  I know its possible as I've seen it done on
> the xxx sites, but I cant seem to find a script anywhere. Does anyone have
> any ideas where I can find such a script....????
> 
> Please reply to keat@beal.org.uk
> Keaton Roebuck
> 
> 

Post cgi questions to cgi newsgroups, and http questions to http 
newsgroups!!

That said,

#!/usr/bin/perl

print "location: http://www.sucks.com\n\n" or die "the world isn't what it 
used to be...($!)\n";

-- 
[ the word wall - and the trailing dot - in my email address
is my _fire_wall - protecting me from the criminals abusing usenet]


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

Date: Tue, 26 Sep 2000 13:41:56 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: redirect script
Message-Id: <8qq930$hsi$1@nnrp1.deja.com>

In article <8qq6lh$fi6$1@gxsn.com>,
  "Keat" <Keat@beal.org.uk> wrote:
> I'm looking for a perl script that will automatically open up another
> url when exiting the original,  I know its possible as I've seen it
> done on the xxx sites, but I cant seem to find a script anywhere. Does
> anyone have any ideas where I can find such a script....????
http://www.geocities.com/amonotod

>
> Please reply to keat@beal.org.uk
> Keaton Roebuck
No, you post to the newsgroups, you check the newsgroups.

amonotod

--
    `\|||/                     amonotod@
      (@@)                     netscape.net
  ooO_(_)_Ooo________________________________
  _____|_____|_____|_____|_____|_____|_____|_____|


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 26 Sep 2000 09:31:00 -0500
From: John Hunter <jdhunter@nitace.bsd.uchicago.edu>
Subject: Re: regexp woes w/ Text-BibTeX
Message-Id: <1r66njns2j.fsf@video.bsd.uchicago.edu>

>>>>> "Keith" == Keith Calvert Ivey <kcivey@cpcug.org> writes:

    Keith> John Hunter <jdhunter@nitace.bsd.uchicago.edu> wrote:
    >> sub texsafe { my $arg = shift; #quote any nonquoted special
    >> chars my $special_chars = '%$#&_'; $arg
    >> =~s/([^\\])([$special_chars])/$1\\$2/g; #this is the
    >> problematic line $arg =~
    >> s/([^\\])\"([^"]*)([^\\])\"/$1``$2$3''/g; #fix double quotes
    >> return $arg; }

    Keith> I can't reproduce your problem.  Can you post a complete
    Keith> program, with sample data, that demonstrates it?

Unfortunately not, I tried to do that and failed.  The problem arose
in running two different scripts each of which is 400-500 lines long
so I didn't want to post them...

    Keith> I do think your regular expressions could be improved with
    Keith> negative look-behind.  As it is, they don't work at the
    Keith> beginning of a string, and they don't work if you have two
    Keith> special characters in a row (maybe that's the problem
    Keith> you're having?).  These are better:

    Keith>     $arg =~ s/(?<!\\)([$special_chars])/\\$1/g; 
    Keith>     $arg =~ s/(?<!\\)"([^"]*)(?<!\\)"/``$1''/g;

I knew about the first char problem but didn't know how to deal with
it.  I have updated my function with your improved regexps.  I have
not used the (?> construct before.  The perlre page says its
experimental and may be dropped...  From your syntax, apparently
anything matched by this operator is not fed into the substitution; is
this what the man pages mean by zero width or 'give nothing back'?  If
you care to enlighten me a bit about this operator, I am all ears...

JDH


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

Date: Tue, 26 Sep 2000 13:21:59 GMT
From: joshfeingold@my-deja.com
Subject: Re: Send HTMLmail via Perl Script
Message-Id: <8qq7t1$gfq$1@nnrp1.deja.com>

Thanks to all for your help.

Below is the code (which I have cut and pasted) and the error I
received. Please note that the first line of the code is line 114.

CODE:

open(MAILINPUT, "|/usr/bin/mailx -s $msu $mto >$temp");
print "Content-type: text/html\n\n";
print MAILINPUT <<"TEST";
<HTML><b>Hello $your_name</b></HTML>
TEST

close(MAILINPUT);

ERROR:

Can't find string terminator "TEST" anywhere before EOF at warranty.pl
line 116.


Any help would be appreciated!

Josh


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Tue, 26 Sep 2000 16:11:53 +0200
From: Andrass Ziska Davidsen <c960334@student.dtu.dk>
Subject: Re: Send HTMLmail via Perl Script
Message-Id: <39D0AEA9.EF564864@student.dtu.dk>

joshfeingold@my-deja.com wrote:
> 
> Thanks to all for your help.
> 
> Below is the code (which I have cut and pasted) and the error I
> received. Please note that the first line of the code is line 114.
> 
> CODE:
> 
> open(MAILINPUT, "|/usr/bin/mailx -s $msu $mto >$temp");
> print "Content-type: text/html\n\n";
> print MAILINPUT <<"TEST";
> <HTML><b>Hello $your_name</b></HTML>
> TEST

You ought to terminate it with "TEST" rather than TEST (the doublequotes
should be included).

> close(MAILINPUT);
> 
> ERROR:
> 
> Can't find string terminator "TEST" anywhere before EOF at warranty.pl
                               ^    ^ the quotes

-- 
Andrass Ziska Davidsen
mailto:c960334@student.dtu.dk
DTU-stud.no.: c960334


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

Date: 26 Sep 2000 10:43:34 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: sendmail
Message-Id: <slrn8t0vem.57n.vek@pharmnl.ohout.pharmapartners.nl>

On 26 Sep 2000 08:51:22 GMT, Abigail <abigail@foad.org> wrote:


>ldbarlet (ldbarlet@email.msn.com) wrote on MMDLXXXIII September MCMXCIII
>in <URL:news:egZAI54JAHA.358@cpmsnbbsa07>:
>][ Can anyone point me in the right direction to learn how to use sendmail to
>][ send email in html format?
>
><news:comp.mail.sendmail>
>
>But what makes you think that this group is the appropriate place to ask?
>Did someone put up a sign, "we keep track of what is discussed in 80,000
>different newsgroups"? I don't think so.
>
>
>Abigail



For attachements, check out MIME::Lite, available at a CPAN archive near
you.


Also perlfaq9 have a few tips.


-- 
Villy


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

Date: Tue, 26 Sep 2000 09:38:44 -0500
From: Dale Bohl <dbohl@sgi.com>
Subject: Uncaught exception question
Message-Id: <39D0B4F4.A9FFDEC0@sgi.com>


   Can anyone tell me what the below 
Uncaught exception from user code: error means?  I've 
done some looking at the diags but did not see anything
there for it.  Any help is greatly appretiated.

Improper link???


Line 125 is
 rename ($tmpfile2, $filename) or die "Can't rename $tmpfile2 to
$filename: $!";


$tmpfile2 is /tmp/tmpfile2
$filename is /export/home/cheetah1/heilmann/public_html/SN1/fs/index.htm

Uncaught exception from user code:
        Can't rename /tmp/tmpfile2 to
/export/home/cheetah1/heilmann/public_html/SN1/fs/index.htm: Improper
link at ./chgword_homes line 125.
        main::replace() called at ./chgword_homes line 90
        main::search() called at ./chgword_homes line 56
        main::getfiles() called at ./chgword_homes line 28

-- 

Thanks,
Dale

Dale Bohl
SGI Information Services
dbohl@sgi.com
(715)-726-8406
http://wwwcf.americas.sgi.com/~dbohl/
JAPH


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

Date: Tue, 26 Sep 2000 16:42:59 +0200
From: Anders Lund <anders@wall.alweb.dk>
Subject: Re: Uncaught exception question
Message-Id: <%C2A5.2695$T3.130546@news000.worldonline.dk>

Dale Bohl wrote:

> 
>    Can anyone tell me what the below
> Uncaught exception from user code: error means?  I've
> done some looking at the diags but did not see anything
> there for it.  Any help is greatly appretiated.
> 
> Improper link???
> 
> 
> Line 125 is
>  rename ($tmpfile2, $filename) or die "Can't rename $tmpfile2 to
> $filename: $!";
> 
> 
> $tmpfile2 is /tmp/tmpfile2
> $filename is /export/home/cheetah1/heilmann/public_html/SN1/fs/index.htm
> 
> Uncaught exception from user code:
>         Can't rename /tmp/tmpfile2 to
> /export/home/cheetah1/heilmann/public_html/SN1/fs/index.htm: Improper
> link at ./chgword_homes line 125.
>         main::replace() called at ./chgword_homes line 90
>         main::search() called at ./chgword_homes line 56
>         main::getfiles() called at ./chgword_homes line 28
> 

you forgot to check the source file.
if (-f $tmpfile2) ...

-anders

-- 
[ the word wall - and the trailing dot - in my email address
is my _fire_wall - protecting me from the criminals abusing usenet]


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

Date: Tue, 26 Sep 2000 10:34:25 GMT
From: pjlees@ics.forthcomingevents.gr (Philip Lees)
Subject: Re: Warning message in Win32::ODBC module
Message-Id: <39d07a76.76025418@news.grnet.gr>

On Mon, 25 Sep 2000 10:56:18 -0700, Larry Rosler <lr@hpl.hp.com>
wrote:

This is from ODBC.pm (Win32::ODBC).

>    foreach (@Results) {
>        next unless defined;
>        s/ +$//; # HACK
>        ...
>
>or, equivalently:
>
>    foreach (grep defined, @Results) {
>        s/ +$//; # HACK


OK, but there's some other stuff that I think needs to be done in the
loop anyway. Making it:

    foreach (@Results){
        s/ +$// if defined; # HACK
        $self->{'data'}->{ ${$self->{'fnames'}}[$num] } = $_;
        $num++;
    }

does the trick and makes the warnings go away.

Thanks for the help.

Phil (modifying modules now - whatever next?)
--
Philip Lees
ICS-FORTH, Heraklion, Crete, Greece
Ignore coming events if you wish to send me e-mail
'The aim of high technology should be to simplify, not complicate' - Hans Christian von Baeyer


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

Date: Tue, 26 Sep 2000 11:47:12 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: West Chester, PA 19380 Perl Users Group?
Message-Id: <410A5.2661$Yb3.65843@news.dircon.co.uk>

On Tue, 26 Sep 2000 00:02:02 GMT, David Steuber Wrote:
> Does anyone know of any Perl users groups in the West Chester PA area?
> Zipcode 19380.
> 
> Or how to find such a group?
> 

<http://www.pm.org/groups/north_america.shtml>


/J\


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

Date: Tue, 26 Sep 2000 14:05:34 GMT
From: oi03_2000@my-deja.com
Subject: Re: Windows 98 / Active Perl / CGI
Message-Id: <8qqaet$jef$1@nnrp1.deja.com>

In article <slrn8su50n.5dd.tim@degree.ath.cx>,
  tim@degree.ath.cx (Tim Hammerquist) wrote:
> oi03_2000@my-deja.com <oi03_2000@my-deja.com> wrote:
> > I'm running Windows 98, personal web server. I've
> > downloaded Active perl (I'm a beginning Perl
> > programmer) and installed it successfully.
> > Tested couple of perl scripts from the dos window
> > and they work fine.
>
> Are you sending the Content-type string?
>
> > Now I wrote a perl script for cgi programming to
> > talk to a HTML form. I copied the script in
> > inetpub\wwwroot\cgi-bin directory.  I tried to
> > execute this cgi script from my html form, but
> > getting a server 500 error.
>
> A 500 server error is actually a good start with W98/PWS.  My first
> guess would be to make sure you're sending the content-type header.
If
> you can find the error log, check it for any more info.
>
> > Question is what do I have to do to get this
> > working?  I saw couple of answers like change
> > registry or change permissions for the scripts
> > but no detailed answers.
>
> If PWS isn't just dumping the text of the script, chances are your
> registry is fine.  And permissions don't apply to individual scripts
on
> Win98/PWS.  PWS sets virtual directory permissions, but a 500 error
> means you probably have execute permissions set for the directory the
> script is in.
>
> --
> -Tim Hammerquist <timmy@cpan.org>
> Pride gets no pleasure out of having something,
> only out of having more of it than the next man.
> 	-- C. S. Lewis
>



Tim, thanks for your direction. It was really helpful.  I was in a hurry
to get the script working, so I did not read my book thoroughly.  Yes, I
missed the "Content type" in my script, secondly there was another minor
syntactical error in the script (html part) because of which the script
did not work.

But the script never ran on Personal web server though.  So I
downloaded/installed Apache server on win 98 and every thing is working
fine now.  Excepting that the line "content type" shows up on my output
page on the web browser.  I'm sure that's not supposed to happen, still
need to figure that out.

I'm very excited about apache and perl and the myriad things you can do
with perl. Thanks again for the help.


Mark.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 4433
**************************************


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