[9732] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3326 Volume: 8

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

Date: Mon, 3 Aug 98 09:00:21 -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: 3326

Today's topics:
    Re: cgi.pm and upload <bowlin@sirius.com>
    Re: comp.lang.perl.announce redux (Abigail)
    Re: comp.lang.perl.announce redux (Gary L. Burnore)
    Re: comp.lang.perl.announce redux (Gary L. Burnore)
        file modification wilgro@my-dejanews.com
    Re: file modification (Larry Rosler)
    Re: file modification <jdporter@min.net>
    Re: Form Data Question (I.J. Garlick)
    Re: Good Book? (Chris Nandor)
    Re: help with string problem (Larry Rosler)
        Help: Problem with Win32::Process <asupcsi@cyberramp.net>
    Re: hiding user input (Chris Nandor)
    Re: hiding user input <upsetter@ziplink.net>
    Re: hiding user input <upsetter@ziplink.net>
    Re: hiding user input (Gary L. Burnore)
    Re: hiding user input (Chris Nandor)
    Re: hiding user input (Gary L. Burnore)
    Re: pb with dbm file <jdporter@min.net>
        Perl 5.004_74 for Win32 Installation <rhu@amherst.edu>
        perl under redhat 5.1 <jean-christophe.remy@bigfoot.com>
    Re: Perl+MS SQL (Peter Seebach)
    Re: regex question (Matt Knecht)
    Re: regex question (Larry Rosler)
    Re: regex question (Matt Knecht)
    Re: Regular expressions for Perl 5 drive@mbox4.singnet.com.sg
        Sendmail in Perl never ends <bill.cheers@sk.sympatico.ca>
        Trying to run a SCO app under RedHat 5.0 eculpepper@hcc-care.com
        Win32: System() batch file arguments not working mstorer@my-dejanews.com
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Mon, 03 Aug 1998 08:47:05 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: Brandon Pulsipher <Brandon@xmission.com>
Subject: Re: cgi.pm and upload
Message-Id: <35C5DB79.EC8508D0@sirius.com>

Brandon Pulsipher wrote:
> 
>     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.

Most likely this is a limit that is built into the web server.

>     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.

I think the implicit assumption that there is a problem with CGI.pm is
incorrect.  Read the CGI.pm docs carefully especially the section about
"Avoiding Denial of Service Attacks".

You can also test the size limits by POST'ing a large file.  Create
a textarea form and copy and paste a > 50k file to it.  This should
fail just like the file upload.

HTH -- Jim Bowlin


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

Date: 3 Aug 1998 15:11:28 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q4jv0$do1$1@client3.news.psi.net>

birgitt@my-dejanews.com (birgitt@my-dejanews.com) wrote on MDCCXCVIII
September MCMXCIII in <URL: news:6q3uj4$d66$1@nnrp1.dejanews.com>:
++ In article <6q3hmj$8h8$2@client3.news.psi.net>,
++   abigail@fnx.com wrote:
++ > Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCVIII September
++ > ++
++ > ++ Actually it does.  If the group moderator posts/reads English, then ther
++ > ++ should be an English restriction.  How else would he/she know that a pos
++ > ++ valid for inclusion?
++ >
++ > Then the question would be is: why restrict outself to one moderator
++ > who can only read one language?
++ 
++ Is that your assumption that the current moderator can read
++ just the English and the Perl language (sounds very sufficient to me)
++ or do you know that for a fact ?

I wasn't making any assumptions. Gary raised a 'what if' question.

++ Suggestion:
++ 
++ Any post in a language other than English
++ *should* be accompanied by a translation. If the poster can't translate
++ or forgot, the non-English version could still be posted with the
++ request to anybody who is native in the original language to translate it.
++ 
++ Sounds to me like worldwide cooperation. Good enough ?

Sounds assymmetric to me. Why not have all English posts accompanied
by a Spanish translation? ;)



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Mon, 03 Aug 1998 15:24:32 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35d3d60f.81710060@nntpd.databasix.com>

On Mon, 03 Aug 1998 14:53:25 GMT, in article <35C5CF6C.7D53@min.net>, John
Porter <jdporter@min.net> wrote:

>Gary L. Burnore wrote:
>> 
>> Tom Christiansen <tchrist@mox.perl.com> wrote:
>> >Oh, it's true.  The current moderator is just another hopelessly
>> >monolingual American.  This is easily remedied. :-)
>> 
>> Right. The moderator could send posts in languages he doesn't understand to
>> someone he knows understands it for translation.
>
>I don't think that's what Tom meant.

I know.

>He's alluding to his own polyglottalism.

Cool big word though. 
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD 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, 03 Aug 1998 15:25:49 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35d4d64e.81772753@nntpd.databasix.com>

On 3 Aug 1998 15:11:28 GMT, in article <6q4jv0$do1$1@client3.news.psi.net>,
abigail@fnx.com (Abigail) wrote:

>birgitt@my-dejanews.com (birgitt@my-dejanews.com) wrote on MDCCXCVIII
>September MCMXCIII in <URL: news:6q3uj4$d66$1@nnrp1.dejanews.com>:
>++ In article <6q3hmj$8h8$2@client3.news.psi.net>,
>++   abigail@fnx.com wrote:
>++ > Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCVIII September
>++ > ++
>++ > ++ Actually it does.  If the group moderator posts/reads English, then ther
>++ > ++ should be an English restriction.  How else would he/she know that a pos
>++ > ++ valid for inclusion?
>++ >
>++ > Then the question would be is: why restrict outself to one moderator
>++ > who can only read one language?
>++ 
>++ Is that your assumption that the current moderator can read
>++ just the English and the Perl language (sounds very sufficient to me)
>++ or do you know that for a fact ?
>
>I wasn't making any assumptions. Gary raised a 'what if' question.
>
>++ Suggestion:
>++ 
>++ Any post in a language other than English
>++ *should* be accompanied by a translation. If the poster can't translate
>++ or forgot, the non-English version could still be posted with the
>++ request to anybody who is native in the original language to translate it.
>++ 
>++ Sounds to me like worldwide cooperation. Good enough ?
>
>Sounds assymmetric to me. Why not have all English posts accompanied
>by a Spanish translation? ;)
>

Why Spanish?  Why not one of the other languages of the world?  Why not ALL of
the languages of this world?  (I don't know any languages from out of this
world so...>
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD 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, 03 Aug 1998 14:56:57 GMT
From: wilgro@my-dejanews.com
Subject: file modification
Message-Id: <6q4j3p$4vp$1@nnrp1.dejanews.com>

Hello,

  I am looking for a program that will take a text file and add a line to it
at the beginning without needing to pull the whole file in, modify it and
then save it again.  I think this is what C does.  It takes to many resources
if the file is very large.  Does anyone know if this is true for C.  If not,
how can I use C to accomplish my goal.	If so, what program(s) are out there
to do this? Will Perl do it?  I have been told yacc and lex can do this.  Are
their any libs out there that I can hook into.	I will be doing this on UNIX
and PC platforms and would like the source code if I can get it.  Also, I
need a parser that will read the first line of the file in order to extract
the written information once the file has been closed.	Any help will be
greatly appreciated.

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


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

Date: Mon, 3 Aug 1998 08:43:59 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: file modification
Message-Id: <MPG.102f7a9b691a994b9897b3@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <6q4j3p$4vp$1@nnrp1.dejanews.com> on Mon, 03 Aug 1998 14:56:57 
GMT, wilgro@my-dejanews.com <wilgro@my-dejanews.com> says...
>   I am looking for a program that will take a text file and add a line to it
> at the beginning without needing to pull the whole file in, modify it and
> then save it again.  I think this is what C does.  It takes to many resources
> if the file is very large.  Does anyone know if this is true for C.  If not,
> how can I use C to accomplish my goal.	If so, what program(s) are out there
> to do this? Will Perl do it?  I have been told yacc and lex can do this.  Are
> their any libs out there that I can hook into.	I will be doing this on UNIX
> and PC platforms and would like the source code if I can get it.  Also, I
> need a parser that will read the first line of the file in order to extract
> the written information once the file has been closed.	Any help will be
> greatly appreciated.

You are asking for magic.  No language can do what you want.  The magic 
can be supplied by any DBM, but not by C or Perl, let alone yacc or lex 
(!).

Your question is one of the most frequently asked FAQs here.  The answer 
is in perlfaq5:  "How do I change one line in a file/delete a line in a 
file/insert a line in the middle of a file/append to the beginning of a 
file?"  But it takes many resources if the file is very large.

As for "a parser that will read the first line of the file in order to 
extract the written information once the file has been closed", you can 
extract information only from a file that is open for reading (though you 
can close it thereafter :-).  The perl expression <HANDLE> will by 
default produce a string whose value is the first line of the file 
*opened* with filehandle HANDLE.

open FILE, $filename or die "Couldn't open $filename. $!.";
my $first_line = <FILE>;
close FILE;

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Mon, 03 Aug 1998 15:56:34 GMT
From: John Porter <jdporter@min.net>
Subject: Re: file modification
Message-Id: <35C5DE39.36D9@min.net>

Since it's unlikely that you know how to read the perl FAQ, let
alone have read the one called

     How do I change one line in a file/delete a line in a
     file/insert a line in the middle of a file/append to the
     beginning of a file?

I will give the relevant part here for your benefit:

     Although humans have an easy time thinking of a text file as
     being a sequence of lines ... computers usually see the
     text file as a sequence of bytes.  In general, there's no
     direct way for Perl to ... insert text into a file....

     The general solution is to create a temporary copy of the
     text file with the changes you want, then copy that over the
     original.

PLEASE NOTE that this is true, regardless of the programming
language.  It will not be any easier (and will probably end up
being harder) in C.


wilgro@my-dejanews.com wrote:
> 
> I am looking for a program that will take a text file and add a line to it
> at the beginning without needing to pull the whole file in, modify it and
> then save it again.  I think this is what C does.

Nope. Sorry.

> It takes to many resources if the file is very large. 
> Does anyone know if this is true for C. 

Yep.  The language is irrelevant.

> Will Perl do it?  I have been told yacc and lex can do this. 

You're talking to the wrong people.  Yacc and lex may make it easier to
*read* the file, than coding in straight C; but they won't help you
solve
the problem of prepending lines to the file.

> I will be doing this on UNIX
> and PC platforms and would like the source code if I can get it.  Also, I
> need a parser that will read the first line of the file in order to extract
> the written information once the file has been closed. 

Perl is the best tool for jobs like this.
But if you don't know perl already, you will have at least that
learning curve to climb.  But it will be well worth the trouble.
And you know where to come for help!


-- 
John Porter


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

Date: Mon, 3 Aug 1998 14:58:45 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
To: brian_fredette@vnet.ibm.com
Subject: Re: Form Data Question
Message-Id: <Ex4C9x.9J@csc.liv.ac.uk>

[Posted and mailed]

In article <6q4dhj$u03$1@nnrp1.dejanews.com>,
brian_fredette@vnet.ibm.com writes:
> Greetings.
> 
> I have a form with several text fields.  These fields are named
> editcol1,editcol2,editcol3 ... and so on.
> 
> I want to check if these fields are blank, if they are not then the value of
> $new_data will equal the value of $form_data{'editcoln'} ... where n is the
> number 1,2,3...
> 
> I am trying to set this up in a loop such as:
> 
> for($i=1,$i<=$total,$i++) {      # $total is set earlier
>      $new_data = $form_data{'editcol$i'};
> }                             /|\
>                                |
>                                |
This doesn't realy suprise me. I take it you don't have a key called 
editcol$i in your hash because that's what it is looking for.

> Most likely the trouble is  ---|   I can't get the $i to
> work inside the $form_data.
> 
> Any suggestions?
> 
I suggest you go and read the relevant faq's amd man pages, paying special
attention to how Perl interprets single and double quoted strings.


-- 
--
Ian J. Garlick
ijg@csc.liv.ac.uk

Your conscience never stops you from doing anything.  It just stops you
from enjoying it.


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

Date: Mon, 03 Aug 1998 11:07:23 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Good Book?
Message-Id: <pudge-0308981107230001@192.168.0.3>

In article <35C1DA18.51EC@min.net>, jdporter@min.net wrote:

# Tom Christiansen wrote:
# > 
# > Dave Mckeown <dmckeown@istar.ca> writes:
# > :I just bought "Perl 5 Complete"...
# > :Is [it] any good?
# > :any one read it?
# > :any opinions??
# > 
# > See http://www.perl.com/perl/critiques/
# 
# The Camel Critiques page is indispensible for deciding
# what books to use.
# 
# But it is of little help it determining whether a book
# is useful, which does not appear in its list.

Something else interesting that I started doing is listing Perl books
available from Amazon.com with Tom's rating, Amazon.com user ratings, and
sales rankings (a new feature of Amazon.com, I believe).  So you can get a
wider range of information about a book that way.

    http://pudge.net/macperl/books.html

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Mon, 3 Aug 1998 08:21:41 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: help with string problem
Message-Id: <MPG.102f756494dbb2149897b1@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <902148658.2439.0.nnrp-04.c3ad0896@news.demon.co.uk> on Mon, 3 
Aug 1998 13:52:17 +0100, Brett Lawrence <Brettl@datent.com> says...
 ... 
> dec     oct      hex      char    but also dec
> 148     0224    0x94    v          246
> 129     0201    0x81    |          252
> 132     0204    0x84    d          228
> 130     0202    0x82    i          233
> 138     0212    0x8a    h          232
> 133     0205    0x85    `          224
> 153     0231    0x99    V          214
> 154     0232    0x9a    \          220
> 142     0216    0x8e    D          196
> 
> Is there away to force perl not to use the value between 128-159 in the
> ascii table but to use the high end equivalent?
> This I think would solve my problem.

Make a translation hash that looks like this:

my %trans = ( 148 => 246, 129 => 252, ... );

Then this regex will do what you want:

$string =~ s/(.)/defined($trans{ord $1}) ? chr $trans{ord $1} : $1/eg;

You can simplify this by using the actual characters in either or both 
sides of the hash instead of their ordinal values, as you prefer.

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 3 Aug 1998 15:43:06 GMT
From: "Clay Isaacs" <asupcsi@cyberramp.net>
Subject: Help: Problem with Win32::Process
Message-Id: <01bdbef5$c1eb4c10$671415ac@fusat36_124>

Hello,

I cannot get Win32::Process to pass command line options that use the dash
"-"
as a delimeter to work under the WinNT platform. I am using the standard
5.004_04 perl distribution. Below is sample code. When run, the app
complains
about invalid option passed. Is Win32::Process supposed to
be able to do this? If not, any suggestions?

Thanks,
Clay

use Win32::Process;
$obj = 'd:\\temp\\testrun\\foo.exe';

$rc = Win32::Process::Create($ProcessObj, $obj, '-bar temp.txt', 0,
NORMAL_PRIORITY_CLASS, ".")|| die ErrorReport();

sleep(5);
$ProcessObj->Suspend();

sleep(5);

$ProcessObj->Resume();
$ProcessObj->Kill(1);

sub ErrorReport {
	print Win32::FormatMessage( Win32::GetLastError() );
}

exit(0);

-----== 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 11:00:10 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: hiding user input
Message-Id: <pudge-0308981100100001@192.168.0.3>

In article <35c6c6df.77821311@nntpd.databasix.com>,
whatpartofdontemailme@dontyouunderstand wrote:

# If any of his admins (And management> have a clue, they'll see that his
# continued emailing after being warned to stop is harassment.

Don't be a bitch.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: 3 Aug 1998 15:00:45 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: hiding user input
Message-Id: <6q4jat$auq@fridge.shore.net>

Gary L. Burnore <gburnore@databasix.com> wrote:
:>
:>You replied with a threat.

: No threat. Just a message that further emails from you would be considered
: harassment and would be reported to your provider as such. That is NOT a
: threat.

That is a threat. Buy a dictionary.

--Art

--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: 3 Aug 1998 14:58:25 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: hiding user input
Message-Id: <6q4j6h$auq@fridge.shore.net>

Greg Bacon <gbacon@cs.uah.edu> wrote:
: In article <6q0dgc$2be@mozo.cc.purdue.edu>,
: 	gebis@noble.ecn.purdue.edu (Michael J Gebis) writes:
: : gbacon@cs.uah.edu (Greg Bacon) writes:
: : }Please tell us that you've stopped beating your poor wife.
: : 
: : Dammit not this again.

: There was a time when I had mistaken you for someone of clue.

And if he's gotten sick of your childishness, that means he's clueless?
You severely overestimate your importance, Greg.

--Art

--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Mon, 03 Aug 1998 15:07:45 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35cdd1d2.80624211@nntpd.databasix.com>

On Mon, 03 Aug 1998 14:49:50 GMT, in article <35C5CE95.5A53@min.net>, John
Porter <jdporter@min.net> wrote:

>Gary L. Burnore wrote:
>> 
>> his continued emailing after being warned to stop is harassment.
>
>Is it harassment?  Or is it spam?

Accounts would be toast faster if it were SPAM.  It's not SPAM so you can't
call it that.

>
>And what's this "warned"?  Don't you mean "asked"?

The statement "Further email from you will be considered harassment and will
be forwarded to your provider"  wouldn't quite be asking, more like a warning.

>Or did you threaten legal action?

Threatning things you know you won't do and others know you won't do is
idiotic.  
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD 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, 03 Aug 1998 11:21:22 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: hiding user input
Message-Id: <pudge-0308981121220001@192.168.0.3>

In article <35cdd1d2.80624211@nntpd.databasix.com>,
whatpartofdontemailme@dontyouunderstand wrote:

# The statement "Further email from you will be considered harassment and will
# be forwarded to your provider"  wouldn't quite be asking, more like a warning.

If you don't want e-mail replies to posts, then don't post.  You expect me
to remember that YOU don't want e-mail replies, but other people do?  You
think so highly of yourself that you believe I am supposed to remember
your preferences?  Why should I care what you want?  If you post, expect
some e-mail replies.  Deal with it, or leave.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Mon, 03 Aug 1998 15:23:19 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35d2d5d0.81646515@nntpd.databasix.com>

On 3 Aug 1998 15:00:45 GMT, in article <6q4jat$auq@fridge.shore.net>,
Scratchie <upsetter@ziplink.net> wrote:

>Gary L. Burnore <gburnore@databasix.com> wrote:
>:>
>:>You replied with a threat.
>
>: No threat. Just a message that further emails from you would be considered
>: harassment and would be reported to your provider as such. That is NOT a
>: threat.
>
>That is a threat. Buy a dictionary.
>

You have yours handy? Look up promise.
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD 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, 03 Aug 1998 15:06:01 GMT
From: John Porter <jdporter@min.net>
Subject: Re: pb with dbm file
Message-Id: <35C5D260.755F@min.net>

mj058-1 wrote:
> 
> >  dbmopen(%bd,"bd_oe","0666");
> >  for(; ($clef,$val)=each %offres;)
> >   { $bd{$clef}=$val; }
> >  dbmclose(%bd);

Well, I would suggest using TIEHASH, as that is the
"officially prefered" way currently.
But right off the bat, I can see a problem in
your code:  that "0666" should not be quoted!

  dbmopen( %bd, "bd_oe", 0666 );

The documentation for dbmopen mentions that
there are "restrictions on how much you can put
into a bucket".  But who knows what those limits
might be for you, or if that's what you're
banging up against.

-- 
John Porter


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

Date: Mon, 3 Aug 1998 11:50:19 -0400
From: "Roger Hu" <rhu@amherst.edu>
Subject: Perl 5.004_74 for Win32 Installation
Message-Id: <35c5dbe9.0@amhnt2.amherst.edu>

Question:

    I've tried to install Perl 5.004_74 for Win32 using cygwin32b19.
    I used the sh Configure command and it goes through all the checks
    When it comes to the gcc2 check, I can't get the prompt to allow me to
specify gcc
    Cygwin32b10 has a gcc, but no gcc2.  Configure tells me that it can't
find a compiler.

    What should I do?

    I've gotten egcs 1.0.2 for cygwin32 and tried another install.  Still
didn't work.
    Can anyone help??


                Roger




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

Date: Mon, 3 Aug 1998 16:18:32 +0200
From: "Jean-Christophe Remy" <jean-christophe.remy@bigfoot.com>
Subject: perl under redhat 5.1
Message-Id: <6q4ita$62k$1@platane.wanadoo.fr>

I just install redhat 5.1 and when I start perl -v
I get the following message:

perl: warning: setting locale failed.
perl: warning: Please check that your locale settings:
                    LC_ALL=(unset),
                    LANG="fr"
                      are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C")

This is perl, version 5.004_04 built for i386-linux.



I don't know what is wrong or missing.
Can somebody hely me ??


Ralf Meuser




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

Date: Mon, 03 Aug 1998 15:58:10 GMT
From: seebs@plethora.net (Peter Seebach)
Subject: Re: Perl+MS SQL
Message-Id: <m6lx1.135$H11.540024@ptah.visi.com>

In article <6q3bbj$n0s$1@nnrp1.dejanews.com>,  <mike808@my-dejanews.com> wrote:
>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.

Can you clarify this?  I'm a bit weak on how SQL really works under the hood,
am I correct in inferring that you apparently must have some SQL stuff
already installed on a machine to connect to an SQL server?  If so, what's
a good free one?  :)

-s
-- 
Copyright '98, All rights reserved.  Peter Seebach / seebs@plethora.net
C/Unix wizard, Pro-commerce radical, Spam fighter.  Boycott Spamazon!
Not speaking for my employer.  Questions on C/Unix?  Send mail for help.
Visit my new ISP <URL:http://www.plethora.net/> --- More Net, Less Spam!


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

Date: Mon, 03 Aug 1998 15:11:51 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: regex question
Message-Id: <Xqkx1.434$9t2.4290749@news3.voicenet.com>

Larry Rosler <lr@hpl.hp.com> wrote:
>> $var='aaa';
>> 
>> Now $var=~s/a/b/g; would make $var=='bbb';
>> 
>> How can I make $var=='aba'; or said different: What 
>> does the regex have to look like to match only the 
>> 2nd time the 'a' occurs?
>
>s/(a){2}/$1b/;

Or, a little more general purpose:

$doubles = 'a|b|c|d';

s/($doubles)\1/$1b/g;


Salt and pepper to taste.

-- 
Matt Knecht - <hex@voicenet.com>


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

Date: Mon, 3 Aug 1998 08:30:06 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: regex question
Message-Id: <MPG.102f775b949f1c989897b2@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <Xqkx1.434$9t2.4290749@news3.voicenet.com> on Mon, 03 Aug 1998 
15:11:51 GMT, Matt Knecht <hex@voicenet.com> says...
> Larry Rosler <lr@hpl.hp.com> wrote:
 ...
> >s/(a){2}/$1b/;
> 
> Or, a little more general purpose:
> 
> $doubles = 'a|b|c|d';
> 
> s/($doubles)\1/$1b/g;
> 
> Salt and pepper to taste.

My taste would be *much* more efficient than that:

> $doubles = 'acd';
> 
> s/([$doubles]){2}/$1b/go;

But I was leaving the generalization as an exercise for the reader...

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Mon, 03 Aug 1998 15:56:13 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: regex question
Message-Id: <x4lx1.603$NJ5.4343665@news2.voicenet.com>

Larry Rosler <lr@hpl.hp.com> wrote:
>> >s/(a){2}/$1b/;
>> $doubles = 'a|b|c|d';
>> s/($doubles)\1/$1b/g;
>> Salt and pepper to taste.
>My taste would be *much* more efficient than that:
>> $doubles = 'acd';
>> 
>> s/([$doubles]){2}/$1b/go;

I forgot the cardinal rule.  Use character classes instead of
alteration whenever possible.

In my own defense, this could be changed to:

$doubles = '(?:word)|(?:another_word)'

>But I was leaving the generalization as an exercise for the reader...

I was the reader. ;-)

-- 
Matt Knecht - <hex@voicenet.com>


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

Date: Fri, 31 Jul 1998 01:28:14 +0800
From: drive@mbox4.singnet.com.sg
Subject: Re: Regular expressions for Perl 5
Message-Id: <35C0AD2E.EDA715D6@mbox4.singnet.com.sg>

Hello,

Happen to come across this discussion which is quite similar to what I
have encountered.....I hope you guys can offer me your expert advice on
the following problems that I had encountered......

I have a text file that contains line after line of "subject titles". I
have written a perl script to read in these strings and compare them one
by one to see if it matches a specific string "$input".

I used :

If ($subject = ~/$input/) {
 ......}
else {........}

I encountered the error saying ".....nested +?*....." 'cos  $input
contains "???" at the end of the string (eg. What is wrong???) which is
valid. Is there a way to compare this string no that I would not have
problems with "nested ?" ?

Besides "?", does this error also occur with "!", ",", "." ?


In addition, what do these 2 lines do ?
1) $input =~ s/\&/\&amp\;/g;
2) $input =~ s/"/\&quot\;/g;


And also, how do I replace " with '

      $input =~ s/"/'/g;   ---- does this work?


Thanks,   :)
Candice Lam
from Singapore

========pls reply to drive@mbox4.singnet.com.sg================
---------------------------------------------------------------


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

Date: Mon, 03 Aug 1998 09:27:25 -0500
From: Bill Cheers <bill.cheers@sk.sympatico.ca>
Subject: Sendmail in Perl never ends
Message-Id: <35C5C8CD.E88D68BF@sk.sympatico.ca>

The mail gets sent in the following script but the script seems to hang
closing sendmail. Any help would be greatly appreciated.

use CGI qw(:standard);
  $fv{"toaddress"} = 'bill.cheers@sk.sympatico.ca';
  $fv{'fromaddress'} = 'bill.cheers@sk.sympatico.ca';
  $fv{"toaddress"} =~ s/\@/\@/;
  $fv{"fromaddress"} =~ s/\@/\@/;
  $fv{'toname'} = "Max";
  $fv{'fromname'} = "Bill";
  $subject = "Test email...";
  open(MAIL, "|/usr/sbin/sendmail $fv{'toaddress'}");
  print MAIL "To: $fv{'toaddress'}\n";
  print MAIL "From: $fv{'fromaddress'}\n";
  print MAIL "Subject: $subject\n";
  print MAIL '-' x 60;
  print MAIL "\nDear $fv{'toname'}:\n\n";
  print MAIL "Love $fv{'fromname'}\n";
  print MAIL '-' x 60;
  close(MAIL);
  print header, start_html("Testing"), h1("YOU ARE HERE");
  print "we never ever get here";
  print end_html;
  exit;


cheers



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

Date: Mon, 03 Aug 1998 15:05:12 GMT
From: eculpepper@hcc-care.com
Subject: Trying to run a SCO app under RedHat 5.0
Message-Id: <6q4jj9$5gf$1@nnrp1.dejanews.com>

I'm trying to run an application originally written for Transoft's UBB/UBL on
a SCO platform.

Technically the application *works* in so far as it launches UBB and from
there I can access the app. The first hurdle I'm faced with is that at some
point the UBB queries the OS to determine the tty the user is launching the
app from. My problem (the problem) is that RedHat numbers the console tty's
as tty1-tty12 where SCO is tty01-tty12. The end result is the application
thinks its running from /dev/stderr.

I'm theorizing this is an environment problem and not a problem with the app?
Anyone else experienced something similar to this problem in moving apps from
SCO to Linux where the app was looking for terminals and getting /dev/stderr
instead?

Any help appreciated.

Eric Culpepper
eculpepper@hcc-care.com

-----== 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 15:26:40 GMT
From: mstorer@my-dejanews.com
Subject: Win32: System() batch file arguments not working
Message-Id: <6q4krg$7ah$1@nnrp1.dejanews.com>

I am having trouble using parameters passed to a batch file called from a
perl script using system(). In the batch file I can use the passed parameters
as %1, %2 etc. and I can even set environment variables using them:

SET DBNAME=%1
SET TABLE=%2
etc.

however trying to use the environment variables that I set above does not work
ie

echo %TABLE%

gives:-

ECHO is off.

I've also tried setting the environment variables using

$ENV{TABLE}="usertab";

but I can't even see the environment variables fromt the batch file if I set
them like that.

Any help much appreciated.

Martin

-----== 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 3326
**************************************

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