[9728] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3322 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 3 03:05:17 1998

Date: Mon, 3 Aug 98 00:00:27 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 3 Aug 1998     Volume: 8 Number: 3322

Today's topics:
        cannot alias $_ in perl 5.005 <mwhite@csu.edu.au>
        cgi.pm and upload <Brandon@xmission.com>
    Re: comp.lang.perl.announce redux (Abigail)
    Re: comp.lang.perl.announce redux (Gary L. Burnore)
    Re: comp.lang.perl.announce redux (Abigail)
    Re: comp.lang.perl.announce redux <dgris@rand.dimensional.com>
    Re: comp.lang.perl.announce redux (Gary L. Burnore)
    Re: comp.lang.perl.announce redux (Gary L. Burnore)
    Re: comp.lang.perl.announce redux <dgris@rand.dimensional.com>
    Re: comp.lang.perl.announce redux (Gary L. Burnore)
        contact problem (MIKE KY)
    Re: Copyright question <junk@zygotech.dyn.ml.org>
    Re: Copyright question <lajandy@fullnet.com>
    Re: hiding user input (Miguel Cruz)
    Re: hiding user input (Gary L. Burnore)
        Installing ActivePerl on Win95 system <jeremy@pdq.net>
    Re: IO::Socket problem / alternative? <dparrish@gidora.zeta.org.au>
    Re: Non-Standard Data File <webwide@writeme.com>
    Re: Non-Standard Data File (Craig Berry)
    Re: Perl+MS SQL mike808@my-dejanews.com
    Re: Problems building 5.005_01 on NT4, sp3 <humpage@teleport.com>
    Re: Q:Parsing file paths <dereks@fc.hp.com>
        Sys::Hostname, taint and linux (Norman Gaywood)
    Re: Writing 'date' format with OraPerl on a Oracle DB. mike808@my-dejanews.com
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Mon, 03 Aug 1998 16:18:03 +1000
From: Matthew White <mwhite@csu.edu.au>
Subject: cannot alias $_ in perl 5.005
Message-Id: <35C5561B.9D387B91@csu.edu.au>

Hi
	Since moving to perl 5.005 from 5.004 I cannot do aliasing
on $_. I have used this "feature" in a rather confusticated piece of
code which is now broken.

for instance, on 5.004 this worked as (*I*) expected:

perl -e '$b = "z\n"; *_ = \$b; print;'

ie, it printed "\z".

but on perl 5.005 it prints nothing. What is going on here?

sorry for the abstract/useless example but you get the picture.

Matthew White


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

Date: Sun, 02 Aug 1998 22:33:25 -0600
From: Brandon Pulsipher <Brandon@xmission.com>
Subject: cgi.pm and upload
Message-Id: <35C53D95.FCA0A00C@xmission.com>

    I am using cgi.pm to upload files.  Also, this is under ActiveState
Perl 5.0003 on NT.  Everything worked fine, and then I moved to a
different server.  Now, the upload seems to die on large files.  The
CGITempxxxx files are no larger than 50k, and the browser (both Netscape
and IE) hang when trying to upload a file larger than this.
    Any help?  I have tried to find code to just handle the upload
myself, without cgi_lib.pl or cgi.pm, but I haven't figured that out
yet.  If anyone can help there, I would appreciate it.
    THANKS.

-Brandon
-Brandon@xmission.com




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

Date: 3 Aug 1998 03:15:54 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q3a1a$7ih$6@client3.news.psi.net>

Randal Schwartz (merlyn@stonehenge.com) wrote on MDCCXCVII September
MCMXCIII in <URL: news:8cr9yzlzsy.fsf@gadget.cscaper.com>:
++ 
++     comp.lang.perl.announce is a low-volume announcement group for messages
++     that benefit the worldwide Perl programming community.  The acceptance
++     criteria are as follows:
++ 
++     4) Perl code *must* reside in the CPAN.  Non-CPAN code announcements
++        will be rejected, even if sponsored as a commercial post.  (See
++        http://www.perl.com/CPAN/modules/04pause.html for details on how to
++        submit items to the CPAN.)  Postings consisting of source code will
++        be rejected. (If it's good enough to post, it's good enough to go
++        into the CPAN.)

I don't think residence on CPAN should be a requirement. The group
should be about announcements about Perl and its community - not a CPAN
announcement group. I now hardly read clpa because about all I find
there are announcements of new uploads on CPAN.

++     7) Articles must be in English, and have a reply-able email address.

Do we really need a language restriction, and if so, why English?
It's not the person doing the announcement fault that others can't
read German or Spanish, is it? Restriction to English doesn't go well
with "worldwide".



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


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

Date: Mon, 03 Aug 1998 04:45:07 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35d24016.43310565@nntpd.databasix.com>

On 3 Aug 1998 03:15:54 GMT, in article <6q3a1a$7ih$6@client3.news.psi.net>,
abigail@fnx.com (Abigail) wrote:

>Randal Schwartz (merlyn@stonehenge.com) wrote on MDCCXCVII September
>MCMXCIII in <URL: news:8cr9yzlzsy.fsf@gadget.cscaper.com>:
>++ 
>++     comp.lang.perl.announce is a low-volume announcement group for messages
>++     that benefit the worldwide Perl programming community.  The acceptance
>++     criteria are as follows:
>++ 
>++     4) Perl code *must* reside in the CPAN.  Non-CPAN code announcements
>++        will be rejected, even if sponsored as a commercial post.  (See
>++        http://www.perl.com/CPAN/modules/04pause.html for details on how to
>++        submit items to the CPAN.)  Postings consisting of source code will
>++        be rejected. (If it's good enough to post, it's good enough to go
>++        into the CPAN.)
>
>I don't think residence on CPAN should be a requirement. The group
>should be about announcements about Perl and its community - not a CPAN
>announcement group. I now hardly read clpa because about all I find
>there are announcements of new uploads on CPAN.
>
>++     7) Articles must be in English, and have a reply-able email address.
>
>Do we really need a language restriction, and if so, why English?
>It's not the person doing the announcement fault that others can't
>read German or Spanish, is it? Restriction to English doesn't go well
>with "worldwide".

Actually it does.  If the group moderator posts/reads English, then there
should be an English restriction.  How else would he/she know that a post is
valid for inclusion?
-- 
        for i in databasix primenet ; do ; gburnore@$i ; done
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
spamgard(tm):  zamboni                |     Official Proof of Purchase
===========================================================================


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

Date: 3 Aug 1998 05:26:43 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q3hmj$8h8$2@client3.news.psi.net>

Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCVIII September
MCMXCIII in <URL: news:35d24016.43310565@nntpd.databasix.com>:
++ On 3 Aug 1998 03:15:54 GMT, in article <6q3a1a$7ih$6@client3.news.psi.net>,
++ abigail@fnx.com (Abigail) wrote:
++ 
++ >Do we really need a language restriction, and if so, why English?
++ >It's not the person doing the announcement fault that others can't
++ >read German or Spanish, is it? Restriction to English doesn't go well
++ >with "worldwide".
++ 
++ Actually it does.  If the group moderator posts/reads English, then there
++ should be an English restriction.  How else would he/she know that a post is
++ valid for inclusion?


Then the question would be is: why restrict outself to one moderator
who can only read one language?



Abigail
-- 
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'


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

Date: Mon, 03 Aug 1998 05:46:42 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q3i4e$r7n$1@rand.dimensional.com>

[posted to comp.lang.perl.misc and mailed to the cited author]

In article <35d24016.43310565@nntpd.databasix.com>
gburnore@databasix.com wrote:

>Actually it does.  If the group moderator posts/reads English, then there
>should be an English restriction.  How else would he/she know that a post is
>valid for inclusion?

Certainly it should be valid to post a message in another language
if it included an English translation.

dgris
-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: Mon, 03 Aug 1998 06:18:55 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35c5563e.48984162@nntpd.databasix.com>

On Mon, 03 Aug 1998 05:46:42 GMT, in article
<6q3i4e$r7n$1@rand.dimensional.com>, Daniel Grisinger
<dgris@rand.dimensional.com> wrote:

>[posted to comp.lang.perl.misc and mailed to the cited author]

WHY?  
-- 
        for i in databasix primenet ; do ; gburnore@$i ; done
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
spamgard(tm):  zamboni                |     Official Proof of Purchase
===========================================================================


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

Date: Mon, 03 Aug 1998 06:19:21 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35c65657.49008859@nntpd.databasix.com>

On 3 Aug 1998 05:26:43 GMT, in article <6q3hmj$8h8$2@client3.news.psi.net>,
abigail@fnx.com (Abigail) wrote:

>Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCVIII September
>MCMXCIII in <URL: news:35d24016.43310565@nntpd.databasix.com>:
>++ On 3 Aug 1998 03:15:54 GMT, in article <6q3a1a$7ih$6@client3.news.psi.net>,
>++ abigail@fnx.com (Abigail) wrote:
>++ 
>++ >Do we really need a language restriction, and if so, why English?
>++ >It's not the person doing the announcement fault that others can't
>++ >read German or Spanish, is it? Restriction to English doesn't go well
>++ >with "worldwide".
>++ 
>++ Actually it does.  If the group moderator posts/reads English, then there
>++ should be an English restriction.  How else would he/she know that a post is
>++ valid for inclusion?
>
>
>Then the question would be is: why restrict outself to one moderator
>who can only read one language?

No, it wouldn't be the question. 
-- 
        for i in databasix primenet ; do ; gburnore@$i ; done
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
spamgard(tm):  zamboni                |     Official Proof of Purchase
===========================================================================


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

Date: Mon, 03 Aug 1998 06:34:56 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q3kug$s5c$1@rand.dimensional.com>

[posted to comp.lang.perl.misc and mailed to the cited author]

In article <35c5563e.48984162@nntpd.databasix.com>
gburnore@databasix.com wrote:
[snip attribution to me]
>>[posted to comp.lang.perl.misc and mailed to the cited author]
>
>WHY?  

First, don't shout at me.                    

Second, it's emailed because that is common courtesy (something
that, your charges against Abigail notwithstanding, you have
a greater need of than anyone in this group).  Many
sites are equipped with slow or unreliable news feeds and
the e-mail response ensures that the other individual
will receive it.

Third, because my news reader is configured to automatically
cc via email and I'm not about to change it.

If it really bothers you this will fix it-

:0:
^Newsgroups:.*
/dev/null

dgris
-- 
Daniel Grisinger           dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
                           Dave Clark


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

Date: Mon, 03 Aug 1998 06:36:27 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35d05a62.50043619@nntpd.databasix.com>

On Mon, 03 Aug 1998 05:46:42 GMT, in article
<6q3i4e$r7n$1@rand.dimensional.com>, Daniel Grisinger
<dgris@rand.dimensional.com> wrote:

>[posted to comp.lang.perl.misc and mailed to the cited author]
>
>In article <35d24016.43310565@nntpd.databasix.com>
>gburnore@databasix.com wrote:
>
>>Actually it does.  If the group moderator posts/reads English, then there
>>should be an English restriction.  How else would he/she know that a post is
>>valid for inclusion?
>
>Certainly it should be valid to post a message in another language
>if it included an English translation.

I didn't read it as "can't have more than one language".  Perhaps you can find
a bunch of multi-lingual volunteers who could deal with the issue of language.


Perhaps there should be multiple names for clpa. One for each of the languages
of the world so that those who write in other languages can read the name of
the group in their own language.  Then you could suggest doing it for all of
comp.lang.perl  or even comp for that matter.  Hell, why not just write a perl
script to translate every post into all possible languages.

Or just leave it English. 
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARDS TO USENET POSTS
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups.          |     Official Proof of Purchase
===========================================================================


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

Date: Mon, 3 Aug 1998 01:18:31 -0400 (EDT)
From: MIKE_KY@webtv.net (MIKE KY)
Subject: contact problem
Message-Id: <2279-35C54827-36@newsd-153.iap.bryant.webtv.net>

I am running an ftp program on a NT server.When I try to upload or
download to other NT servers the program is fast as a jack rabbit but
when it has to contact a unix server it takes forever.Can anybody give
me an idea of how I can correct this?
                                         thanks,
                                         MIKE






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

Date: Sun, 2 Aug 1998 15:30:24 -0600
From: "Tyler Andersen" <junk@zygotech.dyn.ml.org>
Subject: Re: Copyright question
Message-Id: <35c4df4f.0@news.itsnet.com>

I would check with someone who knows the law. I've read cases where even
though the individual wrote the code, the company he works for owns the
copyright. I'm not sure if this is true/right, but you should still check
into it. Better be safe then sorry.


Dustin Cobb wrote in message <35B4C8F1.90D65F50@cyberrealm.net>...
>I'm a cgi programmer and I've written many scripts for the ISP I work
>for.  Recently, I've been told by someone else in our company that the
>scripts that we've written in Perl cannot be copyrighted due to the fact
>that Perl isn't a compiled language.  Therefore, we would have to
>re-write most of these scripts in another language (like C/C++) to
>obtain a copyright.  Is this true?  Can anyone give me an example of
>some software that is written entirely in Perl and is legitimately
>copyrighted?
>
>Thanks.
>




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

Date: Mon, 03 Aug 1998 00:39:34 -0500
From: Andy Johnson <lajandy@fullnet.com>
Subject: Re: Copyright question
Message-Id: <35C54D15.778A5451@fullnet.com>



Tyler Andersen wrote:

> I would check with someone who knows the law. I've read cases where even
> though the individual wrote the code, the company he works for owns the
> copyright. I'm not sure if this is true/right, but you should still check
> into it. Better be safe then sorry.
>
> Dustin Cobb wrote in message <35B4C8F1.90D65F50@cyberrealm.net>...
> >I'm a cgi programmer and I've written many scripts for the ISP I work
> >for.  Recently, I've been told by someone else in our company that the
> >scripts that we've written in Perl cannot be copyrighted due to the fact
> >that Perl isn't a compiled language.  Therefore, we would have to
> >re-write most of these scripts in another language (like C/C++) to
> >obtain a copyright.  Is this true?  Can anyone give me an example of
> >some software that is written entirely in Perl and is legitimately
> >copyrighted?
> >

This cannot be true, because thousands of programs are copyrighted under the
GNU GPL, incl. the Perl interpreter itself, and (obviously) the source code
for those programs are freely available.  Of course, the GNU GPL has never
been challenged in court....




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

Date: 3 Aug 1998 03:39:48 GMT
From: mnc@diana.law.yale.edu (Miguel Cruz)
Subject: Re: hiding user input
Message-Id: <6q3be4$lsq$1@news.ycc.yale.edu>

Gary L. Burnore <gburnore@databasix.com> wrote:
>mnc@diana.law.yale.edu (Miguel Cruz) wrote:
>
>Gee Michael, looks like you forgot your comment.

But I remember my name!

miguel


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

Date: Mon, 03 Aug 1998 04:13:02 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35ce3894.165781590@nntpd.databasix.com>

On 3 Aug 1998 03:39:48 GMT, in article <6q3be4$lsq$1@news.ycc.yale.edu>,
mnc@diana.law.yale.edu (Miguel Cruz) wrote:

>Gary L. Burnore <gburnore@databasix.com> wrote:
>>mnc@diana.law.yale.edu (Miguel Cruz) wrote:
>>
>>Gee Michael, looks like you forgot your comment.
>
>But I remember my name!

Best you can muster, eh?  Sorry for messing your name. Did you have a reason
for posting without a followup?  Was it just to have the post appear in
dejanews?  


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

Date: 3 Aug 1998 04:26:18 GMT
From: "Jeremy Deats" <jeremy@pdq.net>
Subject: Installing ActivePerl on Win95 system
Message-Id: <01bdbea7$9f304ac0$13e390d1@default>


I've been trying to install Perl and get it working with Personal Web
Server for a few days now 
I downloaded Perl5 and installed it, set up my path and extenshion
association) and I could
execute scripts from the command line fine. But it still wouldn't work in
the browser.

So, I installed a different web server (OmniHTTPd standard) and installed
ActivePerl, still nothing.... 
using OmniHTTPd I can access .exe CGI programs and connect to them fine,
but if I try to 
connect to a .PL script I get an error message.

Does anyone have advise as to what I should do?

Thanks,
Jeremy



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

Date: 3 Aug 1998 04:48:14 GMT
From: David Parrish <dparrish@gidora.zeta.org.au>
Subject: Re: IO::Socket problem / alternative?
Message-Id: <6q3fee$un0$1@phaedrus.zeta.org.au>

Michael Caver <michael@mcaver.com> wrote:

> What I figured out was that IO:Socket is apparently accessing the sites
> by IP address, even though I am feeding it the name address. The sites
> that are returning the "false" codes do return errors on IP addresses
> in Netscape, but not by name address. 

Try using the "Host" header in the HTTP query.

> An example URL is "http://www.maltergalleries.com/", which is IP
> address "207.115.185.150". I get a 400 error with IO:Socket and when
> I use the IP address in Netscale. The name address in Netscape works
> fine.

valhalla:~$telnet www.maltergalleries.com 80
Trying 207.115.185.150...
Connected to www.maltergalleries.com.
Escape character is '^]'.
GET / HTTP/1.0
Host: www.maltergalleries.com

HTTP/1.0 200 OK
Date: Mon, 03 Aug 1998 04:57:47 GMT
Server: WebSitePro/2.3.4
Accept-ranges: bytes
Content-type: text/html
Last-modified: Mon, 03 Aug 1998 04:57:47 GMT
Content-length: 6904

-- 
-------------------------------------------------
David Parrish            dparrish@zeta.org.au
Technical Manager
Zeta Internet            http://www.zeta.org.au/
-------------------------------------------------


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

Date: Sun, 02 Aug 1998 05:40:48 -0500
From: Glenn Dixon <webwide@writeme.com>
Subject: Re: Non-Standard Data File
Message-Id: <6q3dkm$ab4$1@news-1.news.gte.net>

well, it's not exactly what I had in mind, but I found someone who already
wrote a script for this, so that saves LOTS of frustration on my
part.........now if we can just rework it to display HTML on the fly instead
of creating hundreds and HUNDREDS of static HTML docs.......:o)

Larry Rosler wrote:

> In article <6q2eol$pg4$1@news-2.news.gte.net> on Sun, 02 Aug 1998
> 01:14:41 -0500, Glenn Dixon <webwide@writeme.com> says...
> ...
> > 0 @I1@ INDI
> > 1 REFN P1
> > 1 NAME Glenn Edward /DIXON/
> > 1 SEX M
> > 1 BIRT
> > 2 DATE 7 Jan 1961
> > 2 PLAC Fort Worth, TX
> > 1 FAMC @F3@
> > 1 FAMS @F1@
> > 1 FAMS @F2@
> >
> > the first column is "0" at the beginning of each record....
>
> The easiest way is to read it one 'record' at a time, like this:
>
> { local $/ = "\n0 ";  @records = <IN> }
>
> This will strip the leading "0 " from each record but the first.  You can
> stick an empty line in at the beginning, so all records begin the same
> way.
>
> > I *think* if it was in the following format it would work better:
> >
> > P1,Glenn Edward Dixon,M,1/7/1961,Fort Worth,TX,CF3,SF1,SF2
>
> You should be able to split the data fields out of the records in various
> ways without having to reformat it like that.  Use the 's' suffix on
> regular expressions to match '.' across the new-lines in your 'records'
> or the 'm' suffix to make '^' and '$' match at each of the new-lines.
> See perlre for more on this.  Or use split /\n/, ... for example
> (perlfunc).
>
> > again, I am in the middle of my Perl book, but I could use a good kick
> > start.....
>
> I hope it is a good book.  The easy solution to your problem is to change
> the 'input record separator' $/ as shown above, in order to define your
> records as you wish.  I don't know if introductory books deal with this
> approach.  You can read more about $/ in perlvar.
>
> --
> Larry Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com



--
Glenn E. Dixon
webwide@writeme.com.....http://home1.gte.net/webwide
glenn@thedixons.net.....http://thedixons.net
ICQ # 392271




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

Date: 3 Aug 1998 06:48:41 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Non-Standard Data File
Message-Id: <6q3mg9$44s$2@marina.cinenet.net>

Glenn Dixon (webwide@writeme.com) wrote:
: Need help with non-standard data file.

There's really no such thing as a 'standard' data file; each app defines
what it can handle.  There are a few widely recognized formats like comma-
or tab-separated text, or widely supported database file formats.

: Either
: A) transform into a standard data format, or
: B) query it directly
: 
: The format is three pieces of data per line, several lines per
: 'record'.....the number of lines per record is NOT fixed (some have 5,
: some have 9).  Here's a sample of ONE record:
: 
: 0 @I1@ INDI
: 1 REFN P1
[snip]
: 1 FAMS @F2@
: 
: the first column is "0" at the beginning of each record....

OK, that implies (to me) that you'll want to read through the file line by
line, accumulating lines, and triggering a "process this batch, then get
ready for a new batch" at 0 in col 0 and at eof.

: so far I have managed to bring this into arrays pretty much duplicating
: the existing structure, but I am rather new to Perl and am getting
: stuck.......any ideas???

Without seeing your code, it's difficult to tell where you're getting
stuck.  A 10-ish line fragment illustrating your problem tends to get the
best results on clpm.

: I *think* if it was in the following format it would work better:
: 
: P1,Glenn Edward Dixon,M,1/7/1961,Fort Worth,TX,CF3,SF1,SF2

It certainly sounds easier to process data that's in "1 line = 1 record"
format.  That's what I'd tend to want.  However, we often don't have the
luxury of defining file formats. :-)

: again, I am in the middle of my Perl book, but I could use a good kick
: start.....

You provide the (small chunk of) code, we'll provide the kicks.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Mon, 03 Aug 1998 03:38:27 GMT
From: mike808@my-dejanews.com
Subject: Re: Perl+MS SQL
Message-Id: <6q3bbj$n0s$1@nnrp1.dejanews.com>

In article <35C1F6AC.6543C163@ichat.com>,
  John Warner <support@ichat.com> wrote:
> The DBI module is a good start.  However, be careful on what you do.
Microsoft
> bought the code to Sybase 10 and used that as the basis for MS SQL.  Using
> functionality from newer Sybase versions may not work at all or may not do
what
> you want.
> mspitzer@stones.com wrote:
> > > is there any module that work(s) with Microsoft SQL Server
> > try the sybase DBI module.  I read that it might work.

DBI 0.92 and DBD::Sybase 0.08 work just fine with Sybase11 Open Client HP/UX
connecting to MS SQLServer 6.5. So far, so good.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Mon, 03 Aug 1998 06:27:28 GMT
From: Steve Humpage <humpage@teleport.com>
Subject: Re: Problems building 5.005_01 on NT4, sp3
Message-Id: <35C557DC.FB121F69@teleport.com>

I found that when compiling with VC++ v5, if you modify the makefile in the
win32 directory of the perl 5.005_01 distribution removing -nodefaultlib
from LINK_FLAGS and the PERL95EXE rules, that libwin32 v0.12 and tk800.008
compile without link errors.

With -nodefaultlib expect link errors with win32_get_osfhandle in tkglue.c
in tk800.008 and with various string functions in Internet.c and elsewhere
in libwin32 v0.12.

I'm curious about the inclusion of this option in the distributed makefile.
Earlier versions of the Perl 5 makefile for win32 did not have this option.

Jim Brewer wrote:

> David Coldrick <davidc@selectst.com> writes:
>
> > However, when I do the nmake, I get down to building Internet.c and it
> > falls in a heap with:
>
> It may have failed because you didn't have all the required libraries
> installed to build the Internet module. Make sure you have
> wininet.dll, WinINelt.lib and wininet.h available to the compiler to
> build Win32::Internet. I went through a similar problem and that was
> what it was for me. Got all the requireed library files and the
> problem was solved.
>
> Additional information for this module can be found at
> 'http://www.divinf.it/dada/perl/', which is the authors web site for
> this and several other useful Win32 modules.
>
> HTH.
>
> Jim Brewer





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

Date: Mon, 03 Aug 1998 04:34:01 +0000
From: Derek <dereks@fc.hp.com>
Subject: Re: Q:Parsing file paths
Message-Id: <35C53DB9.8420F526@fc.hp.com>

Hi Folks,

I just found the perldoc for File::Spec, which is new with perl 5.005.
This solves my problem exactly.

Thanks to those who responded to my posting.

Derek wrote:

> Folks,
>
> I have looked thru all the FAQs and man pages I can find....  Really!
>
> I want to take a filename in a scalar and convert it to an absolute
> pathname.  It must know about the file system's naming conventions (i.e.
> treat it differently depending on whether it begins with a /, etc.).
> For now I've written a little routine that tests for a leading slash and
> prepends the cwd if it is absent.  I'm extending it to understand "."
> and "..", etc.  Unfortunately, my code is very unix-specific, and I was
> wondering if a module already exists that does this in a way that is
> always appropriate for the OS in use.
>
> Note that I need it to process paths that do not (yet) exist, so it must
> purely be a string manipulation function, not something that actually
> looks at the filesystem.
>
> Suggestions?
>
> Derek.





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

Date: 3 Aug 1998 15:13:40 +1000
From: norm@turing.une.edu.au (Norman Gaywood)
Subject: Sys::Hostname, taint and linux
Message-Id: <6q3gu4$plq@turing.une.edu.au>
Keywords: perl taint hostname linux

Using perl 5.004_04 on a RH 2.0.32 linux system, the following script
fails:

#!/usr/bin/perl -Tw
use Sys::Hostname;
print Sys::Hostname::hostname(), "\n";

with the message:

Cannot get host name of local machine at ./testhostname.pl line 3

If I remove the -T, the script works fine. The script also works with
and without the -T on my Digital Unix 4 systems.

Since Sys::Sylog requires Sys::Hostname, it to fails with the same
error.

Anyone fixed this?
-- 
Norman Gaywood -- School of Mathematical and Computer Sciences
University of New England, Armidale, NSW 2351, Australia
norm@turing.une.edu.au     http://turing.une.edu.au/~norm
Phone: +61 2 6773 2412     Fax: +61 2 6773 3312


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

Date: Mon, 03 Aug 1998 03:31:15 GMT
From: mike808@my-dejanews.com
Subject: Re: Writing 'date' format with OraPerl on a Oracle DB.
Message-Id: <6q3au4$mn8$1@nnrp1.dejanews.com>

Big hint:

Use the Date::Manip module.
Use the Date::Manip module.
Use the Date::Manip module.

After you connect ot the DB, try setting your dateformat session variable
to the default internal format of the Date::Manip module.

Then oracle will automatically convert your dates into/out of Date::Manip
things. They aren't quite objects (yet).

You get date parsing for free (easy data entry) and date formatting
for converting to standardized formats. It's even multi-lingual and supports
most of the european languages.

i.e. get the text from the user input form. Parse it into a date thingy.
Use it in SQL. Because you've set your session dateformat variable, everything
works beautifully, and you don't need to stick a bunch of CONVERT functions
into your SQL. This is a problem because you have to know in advance what
fields are dates in order to "know" they need the conversion. The above tricks
avoid the need for this.

Michael King

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3322
**************************************

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