[8644] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2261 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 6 19:17:25 1998

Date: Mon, 6 Apr 98 16:00:26 -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, 6 Apr 1998     Volume: 8 Number: 2261

Today's topics:
    Re: "URGENT!" requests <rootbeer@teleport.com>
    Re: "URGENT!" requests <petdance@mc.net>
        Auction script ?? (Indkxbsklubben)
    Re: bitbucket for (,$b,,,$e,,)=split(/\,/,$string) <merlyn@stonehenge.com>
    Re: Can I execute Perl scripts with Front Page 98 ? (Jonathan Stowe)
        CGI Performance (mod_perl, fastcgi, or what). <sqltech@tiac.net>
    Re: CGI Performance (mod_perl, fastcgi, or what). (brian d foy)
    Re: CGI: Sending an image <brianm@kodak.com>
    Re: chdir in perliis (Jonathan Stowe)
        File Locking with tied [GNS]?DBM files... (Brian Wheeler)
    Re: Help on Perl (Jonathan Stowe)
    Re: How can I read a randomly generated file (Andrew M. Langmead)
    Re: How do I strip newlines from a var (Craig Berry)
    Re: How do I strip newlines from a var <ljz@asfast.com>
    Re: linux, perl, and microsoft access (David Grove)
        Need Reg Expr to yield today's cron jobs <vasile@hatespam.com>
        ORA Perl Conference Poll (Dustin Mollo)
    Re: perl/shopping cart <webmaster@visionary-western.co.uk>
        Perl/Tk memory management - advice needed <jxg161@psu.edu>
    Re: PID numbers with forground and background nums not  <vallon@pearl.fi.bear.com>
    Re: Reading unix shell environment thru browser? <rootbeer@teleport.com>
    Re: Reading unix shell environment thru browser? (Jonathan Stowe)
    Re: Statistics for comp.lang.perl.misc (Jonathan Stowe)
        text::soundex for Win32 <henry@sprucemt.com>
        using modules (Ali Mehdizadeh)
    Re: Why a FAQ is irritating (was Re: How do I strip new <ljz@asfast.com>
    Re: Win32 ODBC error - object not found (Jonathan Stowe)
        ZenSearch is looking for a Perl programmer partner <jkendall@zenation.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 6 Apr 1998 14:00:16 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Andy Lester <petdance@maxx.mc.net>
Subject: Re: "URGENT!" requests
Message-Id: <Pine.GSO.3.96.980406135755.22113D-100000@user2.teleport.com>

On 6 Apr 1998, Andy Lester wrote:

> I have an idea: Anybody who posts an URGENT! or EMERGENCY! request
> should post the circumstances behind the urgency.  "I was having sex
> with my mistress in the server room and I knocked the Linux box over and
> the hard drive crashed and so I've reinstalled everything but I still
> can't get 5_004_03 to build!" 

Yes. And the descriptions should be especially detailed if illicit sex is
involved.

;-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Mon, 6 Apr 1998 16:15:18 -0500
From: Andy Lester <petdance@mc.net>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: "URGENT!" requests
Message-Id: <Pine.BSI.3.96.980406161400.29554B-100000@maxx.mc.net>

> > I have an idea: Anybody who posts an URGENT! or EMERGENCY! request
> > should post the circumstances behind the urgency.  "I was having sex
> > with my mistress in the server room and I knocked the Linux box over and
> > the hard drive crashed and so I've reinstalled everything but I still
> > can't get 5_004_03 to build!" 
> 
> Yes. And the descriptions should be especially detailed if illicit sex is
> involved.

No kidding.  Don't just say "it crashed"; we want specific sector numbers.

Luridly yours,
xoxo,
Andy

--
Andy Lester:        <andy@petdance.com>       http://tezcat.com/~andy/
Chicago Shows List: <shows@ChicagoMusic.com>  http://ChicagoMusic.com/




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

Date: Mon, 06 Apr 1998 20:54:41 GMT
From: indkobsklubben@indkobsklubben.dk (Indkxbsklubben)
Subject: Auction script ??
Message-Id: <352940d0.17977878@news.get2net.dk>

Hello

Where do I find and good Auction script ??

Mr. Romme


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

Date: 06 Apr 1998 14:33:53 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: bitbucket for (,$b,,,$e,,)=split(/\,/,$string)
Message-Id: <8caf9yvdmm.fsf@gadget.cscaper.com>

>>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:

>> Thanks to everyone who helped me out with good answers. I found the
>> camel book had the same trick Larry Rosler mentioned. It is shown in
>> two places in "Appendix A:Exercise Answers".

Larry> You're welcome.  But that should be the Llama book :-).  No exercises in
Larry> the Camel.

Unless you count the exercise of trying to find what you are looking
for in the huge Camel book...

(...oooh, that hurts.  cut that out... :-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 147 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Mon, 06 Apr 1998 06:53:50 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Can I execute Perl scripts with Front Page 98 ?
Message-Id: <35286c3a.11332290@news.btinternet.com>

On Mon, 6 Apr 1998 13:11:11 +0200, "Hi" <nospam@noanswer.com> wrote:

>Is it possible to execute perl scripts with FrontPage 98 (under NT 4.0)
>before uploading to Unix system ?

No.  But whatever HTTP server you may be using on NT will probably be
able to do so.  Of course you will need to get perl for Win32 (from
CPAN ) and then configure your server appropriately.  The  former
would have been addressed in the Auto-response you would have received
after you posted if you had not munged your E-Mail address. The latter
is frequently asked here but better answered in a group such as
comp.infosystems.www.servers.ms-windows

/J\ 
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Mon, 06 Apr 1998 14:21:55 -0400
From: Ed Barlow <sqltech@tiac.net>
Subject: CGI Performance (mod_perl, fastcgi, or what).
Message-Id: <35291D43.8FB73573@tiac.net>

Hi.  Id like to speed up some cgi's.  They are not difficult nor
are they complex.  My home system is a sparc classic and it finds that
the time to run the script (time from my first line of code to end) is
small (1-2 seconds) compared to the time between perl start ($^T) and
end.  I assume this has something to do with loading and compiling.

What can i do.  Neither mod_perl or fastcgi are easy to understand and
5.004 does not support the compiler B.  

Any Hints

Ed
sqltech@tiac.net



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

Date: Mon, 06 Apr 1998 17:59:12 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: CGI Performance (mod_perl, fastcgi, or what).
Message-Id: <comdog-ya02408000R0604981759120001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35291D43.8FB73573@tiac.net>, Ed Barlow <sqltech@tiac.net> posted:

>What can i do.  Neither mod_perl or fastcgi are easy to understand and
>5.004 does not support the compiler B.  

well, i thought they were pretty straightforward.  however, check out
Lincoln Stein's columns in WebTechniques and The Perl Journal for
information about using mod_perl.  there is also a lot of good stuff
in the documentation.

if you have specific questions or get stuck, ask again.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: Mon, 06 Apr 1998 17:45:08 -0400
From: Brian Mathis <brianm@kodak.com>
Subject: Re: CGI: Sending an image
Message-Id: <35294CE4.DBBB33A4@kodak.com>

This is a multi-part message in MIME format.
--------------930C4AC6BCBED40AE35B827F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Pascal van Rossum wrote:
> 
> Hi,
> 
> I am trying to run a cgi script by calling it as an IMG SRC,
> this is because I cannot run it by using a SSI.
> 
> However, Netscape 3.x users see the javascript document.write
> that I use to write the IMG SRC tag to the screen.
> 
> So my question is, how on earth do I send a 1x1 transparent
> gif file to the client so that the browser is satisfied
> and won't put the javascript source on the screen.
> 
> I've tried by just using print "Content-type: image/gif\n\n"
> as well as "Location: <filelocation>". Both options do
> not work.
> 
> Thanks in advance.
> 
> Pascal van Rossum


using "Content-type: image/gif\n\n" should work, then you can just spew
out your binary data.  

However, using a counter is pretty much useless.  You should be able to
get to the logs on your server and just count things from there.
--------------930C4AC6BCBED40AE35B827F
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Brian Mathis
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Brian Mathis
n:              Mathis;Brian
org:            US&C Intranet Services
adr:            Mail Code: 01269;;343 State Street;Rochester;New York;14560-1269;6/15/KO, USA
email;internet: brianm@kodak.com
tel;work:       1(716)724-7960
tel;fax:        1(716)724-2496
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------930C4AC6BCBED40AE35B827F--



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

Date: Mon, 06 Apr 1998 06:53:45 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: chdir in perliis
Message-Id: <35286068.8305483@news.btinternet.com>

On Mon, 06 Apr 1998 00:43:30 -0400, buckaroo@albany.net wrote:

>i am having trouble with the chdir function in perl.  
>i am using perl32 & perliis (ver5 biuld 306) on a NT 4.0
>server w/ sp3, here is a test script that i am working with...
>
<etc>
This has got "its got nothing to do with perl but a lot to do with the
server" written all over it.  I'm not entirely sure how PerlIIS works
in this respect but it is possibly operating in the context of the
servers *virtual* directory structure.

The nice people over in comp.infosystems.www.servers.ms-windows might
be better placed to answer this question - if it isnt already in the
documentation somewhere, that is.

/J\ 
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: 6 Apr 1998 22:38:43 GMT
From: bdwheele@indiana.edu (Brian Wheeler)
Subject: File Locking with tied [GNS]?DBM files...
Message-Id: <6gblhj$avl$1@jetsam.uits.indiana.edu>

When tying a hash to a DBM file, does any locking occur on the file
when the value is updated or a key is added?

If not, is there a easy way to do it, or do I have to wrap each hash modify
with flock's?

Brian Wheeler
bdwheele@indiana.edu


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

Date: Mon, 06 Apr 1998 06:53:48 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Help on Perl
Message-Id: <352866c3.9933241@news.btinternet.com>

On Mon, 06 Apr 1998 04:59:24 -0600, m144103303@abonados.cplus.es
wrote:

<snip>
>Do I need something for opening and creating a new message with  Netscape's
>mail program? , here is the code I've typed in:
>
>$mailprog = 'c:\Archiv~1\Netscape\Commun~1\Program\netscape.exe -mail";
>$recipient = 'xxx@something.com';
>open (MAIL, "|$mailprog $recipient ") || die "Can't open $mailprog!\n";
>
Inspired, totally and utterly insane, but inspired nonetheless.

You dont have a cats chance in the hot place to get this to work.  The
original code you were referring to would probably have used either
"mail" or "sendmail" or somesuch unix mailer which will accept input
in the manner you are attempting (IE through STDIN) however Netscape
couldnt care less about such things and will only work via its (ahem)
friendly user interface.

You have two choices as i see it.  You could ditch Win95 altogether
and install Linux whereby this kind of stuff would probably run
"straight out of the box" or (and this is the more perl-ish and
therefore appropriate to this NG) you could get hold of the most
excellent Mail::* modules available from CPAN - read the documentation
supplied therein and then re-jig your code as appropriate.  There is a
section in the FAQ about mailing stuff which is probably a good place
to start.

Dont give up

/J\ 
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Mon, 6 Apr 1998 22:34:54 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: How can I read a randomly generated file
Message-Id: <Er0K26.EAz@world.std.com>

cmeena@hotmail.com writes:

>In my perl script, I create a random file name and write to it. I do that
>using the following commands:

If you are using random() to create a temporary file, you should know,
there are some drawbacks to creating them this way. Two programs that
start in the same second may generate the same random number and will
write to the same file.  The POSIX::tmpnam() function is documented
not to conflict with any other program creating a temporary file with
tmpnam. (Although I'm not sure every implementation deals with
networked filesystems correctly.)

Also you can use IO::File->new_tmpfile() to create a temporary file
that will automatically be removed when the program, since this file
is unlink()ed as soon as it is created. Since it is no longer visible
in the filesystem, you can't open it a second time like you do your
randomely generated filename, but you could open it in read/write mode
and use seek() to return back to the beginning.

If you don't want to use POSIX::tmpnam() or IO::File->new_tmpfile(),
you might at least want to use the process ID number (held in the
magic "$$" variable) instead of a random number. The process ID number
also will not conflict with any other instance of the program running
simultaneously.

If you don't think your program is important enough to do a
comprehensive avoidance of other temporary files, consider that
another program may play by the rules and create a temp file with the
documented methods, but your nonstandard method may conflict
(randomly.)

Also:

>$link_up_file = "lup_";
>$rand_name = int(rand(time()));  # this will give me a random number

The function rand()s argument is the maximum value to return. It is
not the seed. A separate function srand() is used to seed the random
number generator. (And in your application, you don't want to give
srand() the result of time() as an argument. If you do, you get the
problem I mentioned of two programs generating the same sequence of
random number if they are started in the same second.)

>$name .= $rand_name # this will join lup_ and the random number to create a
>                    # random file name. for example, lup_156694811 etc.

Despite what your comments mention, you do not append "lup_" to the
random number.

>open(LDDOUT, ">>/tmp/$name") || die could not open $name for writing\n";
>print LDDOUT ($device\n");  # write something to the file.

>Later on, I like to open this file for reading. All I know is that the file
>name is stored in $name.

Do you close LDDOUT first? The output is buffered, and may not be sent
to the operating systems write() call until a full block is written.

-- 
Andrew Langmead


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

Date: 6 Apr 1998 21:32:42 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: How do I strip newlines from a var
Message-Id: <6gbhlq$fr2$1@marina.cinenet.net>

Lloyd Zusman (ljz@asfast.com) wrote:
: I would be willing to bet that a high percentage of the people who
: enter clpm and post the frequently asked questions that many here find
: so annoying are *not* aware of CPAN or the existence or location of
: the FAQ at the time they post the questions.

And whose fault is that?  Finding clpm requires some work by the user, in 
order to go from suspecting such a newsgroup exists to discovering its 
exact name.  Finding and using perl.(com|org), the locally-installed 
perldoc, or other resources would take similar amounts of effort.  But 
rather than using the documents, which require attentive reading to learn 
general principles, newbies barge in here expecting tailored answers to 
their specific questions.

---------------------------------------------------------------------
   |   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: 06 Apr 1998 18:38:03 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: How do I strip newlines from a var
Message-Id: <lura3ah8z8.fsf@asfast.com>

martin@RADIOGAGA.HARZ.DE (Martin Vorlaender) writes:

> Lloyd Zusman (ljz@asfast.com) wrote:
> : catfood@apk.net (Mark W. Schumann) writes:
> : >
> : > [ ... ]
> 
> : Well, this analogy doesn't quite cut it, either, since there is no
> : booklet handed out at the door here until *after* someone makes their
> : first post and receives the automatic emailing.
> 
> : A still better analogy is for the "somebody" described above to see a
> : sign on a door that says "Experts at Telling Time Forum, Open to the
> : Public" and to walk in, asking the "Can anyone tell me what time it
> : is?"  question.  In response, some of the people in the room rudely
> : and condescendingly tell this person to go away and read the "How To
> : Tell What Time It Is Now" pamphlet, even though this person had no
> : idea prior to entering that this pamphlet even exists.
> 
> What became of the tradition of first _read_ a newsgroup for a while to
> get accustomed to the rules before writing anything?
> Taking the analogy further, our friend could have walked into the forum,
> listening for a while. Then he would have had a chance of overhearing
> some expert telling someone else to go and get the "How To Tell What
> Time It Is Now" pamphlet.

Most people do this, but some don't know about this tradition.  In my
opinion, the number of people who don't know this aspect of netiquette
is small compared to those who quietly lurk, those newcomers who do
follow netiquette, and those who are regular contributors.

There's a polite way to point someone to the FAQ without answering his
or her question in the newsgroup, and there is a rude way of doing so.

-- 
 Lloyd Zusman
 ljz@asfast.com


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

Date: Mon, 06 Apr 1998 21:52:07 GMT
From: pete@dave-world.net (David Grove)
Subject: Re: linux, perl, and microsoft access
Message-Id: <35294e3f.11400094@news.dave-world.net>

You would have to use 32-bit windows dll's to access the data, unless
you have a db access driver for linux.

>Is there any reason why I can't access microsoft access via the win32
>perl module from Linux?  Linux sees the dos partition.  If I can, then
>the next step would be to slap a web interface...
>
>john
>
>



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

Date: Mon, 6 Apr 1998 18:17:47 -0400
From: James Vasile <vasile@hatespam.com>
Subject: Need Reg Expr to yield today's cron jobs
Message-Id: <Pine.GSO.3.95qL.980406180818.24327A-100000@ciao.cc.columbia.edu>

I am new to Perl and despite my lurking here for a week, combing through
scripts found on the web, and reading a borrowed copy of the Camel book, I
still cannot fit Regular Expressions into my head. My Perl code looks like
mangled BASIC and I'm thinking of just writing this silly little thing
in C. My problem is that I need a regular expression that will return the
lines in a crontab file that will be executed on a given date, usually
today's. The format of the data in crontab files is given in the manpage
for crontab(5). My Perl script has $month, $dayofweek and $dayofmonth set
to corresponding numbers. I just want to print today's cron entries...
should be easy, but it's not so for me.

Any help would be appreciated. No need to email me (I check this group
often enough), but if you want to, please adjust my domain name to
iname.com.

Thanks in advance,
-James




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

Date: 6 Apr 1998 21:56:31 GMT
From: dustin@sonic.net (Dustin Mollo)
Subject: ORA Perl Conference Poll
Message-Id: <6gbj2f$615$1@ultra.sonic.net>

Greetings fellow Perl enthusiasts!

Some of you may know me as the www.perl.com maintainer.  Others may not. 
Either way, I've been talking with ORA about maybe doing some live RealAudio
broadcasts from this year's conference, and I was wondering how many here
might be interested in something like that.

MBONE broadcasts may be possible, but I haven't done anything with the MBONE
for about 5 years, and I would have to ramp up a lot between now and then,
plus I think a RealAudio broadcast may reach more people.

Opinions, flames etc?

-Dustin


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

Date: Mon, 06 Apr 1998 22:20:03 +0100
From: John <webmaster@visionary-western.co.uk>
To: tiles@pyramidtile.com
Subject: Re: perl/shopping cart
Message-Id: <35294703.11CA@visionary-western.co.uk>

tiles@pyramidtile.com wrote:
> 
> Does any body know of a person or persons that give training for Perl/web and
> shopping cart instructions over the phone or email?
> I would like to learn how to set up my own shopping cart on my web site.
> I know how to make web pages and just learned to telnet to my shell server.
> But would like to learn how to customize my web pages so that browsers could
> order my selection of tools.
> 
> I just don't wan't to travel to places and spend ton's of money to lean how to
> set up a shopping cart.
> Is there an economical way of doing this?
> Thanks
> Bill

Bill,

Our ShopMaster program might be of use to you. It's a budget Windows
32-bit App which writes client-side shopping basket scripts. 

The program has pulled some good reviews, for instance it was 'tool of
the day' at Slaughterhouse a few weeks ago, their review is still
on-line at http://www.slaughterhouse.com/picks/shopmaster.html

ShopMaster is Shareware, the unregistered version will run a
full-featured shop but of limited size, registration cost is 99.00 US.

The file download for ShopMaster (3.3 Meg) is
http://www.visionary-western.co.uk/smast12.exe 

Further details about the program, and the on-line demo are on the
ShopMaster home page on http://www.visionary-western.co.uk/sabout.htm

Hope this is of help,

-- 
John L - Webmaster, Visionary Western Limited

http://www.visionary-western.co.uk


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

Date: Mon, 06 Apr 1998 16:56:19 -0500
From: Jason Girard <jxg161@psu.edu>
Subject: Perl/Tk memory management - advice needed
Message-Id: <35294F83.6F7B6DA2@psu.edu>

Hi,

I am relatively new to Perl, and very new to Tk.
I recently finished writing an application which updates an image based
on a status taken every 5 minutes (if status changes, image changes;
otherwise it stays the same).  Also, I'm using bind with a button to
place another image on the canvas when the mouse is over the button, and
clears the image when it isn't.

The problem is, I don't think these images are actually being discarded
when no longer needed, and my memory usage goes up during each image
change.

Here is a snippet which I bind Enter and Leave to the Button $button1;
$canvas is a Canvas:
--------------------------------------------------------------------
$img2 = $canvas->Photo('-format' => 'gif',
	              '-file'=>Tk->findINC('demos/images/mouseon.gif'));

$button1->bind('<Enter>' => sub{$canvas->create('image',180,0, 
                                                '-anchor' => 'nw', 
                                                '-image' => $img2)});
$button1->bind('<Leave>' => sub{$img2->blank;
                                $img2=$canvas->Photo('-format' => 'gif',
                                 '-file'
                           =>Tk->findINC('demos/images/mouseon.gif'))});

----------------------------------------------------------------------
Is there some way of deleting this image object from memory and then
re-creating it when needed?
I have tried  $canvas->delete($img2)  but the picture doesn't disappear
from sight.
It looks like  $img2->blank  is clearing the area where the image was,
but not freeing up memory; I need the line after it to re-fill the
image.  Since I plan on having this application running most of the
time, keeping memory usage steady is really important.  Seeing the
percent memory usage increase by 1-2 percent after a couple image
updates is alarming.  Any other suggestions for keeping things under
control?

Thanks,
Jason 

-- 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Jason Girard
jxg161@psu.edu
http://www.personal.psu.edu/jxg161/
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


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

Date: 06 Apr 1998 17:04:50 -0400
From: Justin Vallon <vallon@pearl.fi.bear.com>
Subject: Re: PID numbers with forground and background nums not matching
Message-Id: <x6eogyemzkd.fsf@pearl.fi.bear.com>

mshavel@erols.com (Michael Shavel) writes:

> #call in background
> $pid =open RUN, "| $c . &" ;
[...]
> 
> However, if I run the sqr statment in the background (as I do in the code
> above) I get a PID number that is one (1) off. 
> Example:  perl tells me the PID number is 27312 but ps -ef tells me the
> pid number is 27313. 
> 
> Does this make sense. Does the background process "&" get its own PID
> first and then a PID is assigned to the  sqr ?

Maybe.  The '&' may cause perl to execute the command in a subshell.  
That shell actually executes the $c command.

I think the '&' is redundant in this case.  Try:

$pid = open RUN, "| $c .";

You should get the PID of sqr.

I would guess that the $pid when using '&' shows /bin/sh (or some other 
shell).

-- 
-Justin
vallon@bear.com


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

Date: Mon, 6 Apr 1998 14:03:43 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: rajasundaram@hotmail.com
Subject: Re: Reading unix shell environment thru browser?
Message-Id: <Pine.GSO.3.96.980406140204.22113E-100000@user2.teleport.com>

On Mon, 6 Apr 1998 raja@krdl.org.sg wrote:

> How to get the envirnoment variables from the shell.

That would be %ENV.

> %ENV hash always returns me undef when i GET the FastCGI/CGI script from
> the browser. 

Maybe that's the environment. (Or, there's no shell... :-)

If the calling program is not setting some variables as it should, then
it's got a bug. Hope this helps! 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Mon, 06 Apr 1998 06:53:52 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Reading unix shell environment thru browser?
Message-Id: <35287622.13690605@news.btinternet.com>

On Mon, 06 Apr 1998 02:04:26 -0600, raja@krdl.org.sg wrote:

 ...
>How to get the envirnoment variables from the shell.

Using builtin functions such as each(), keys(), values() as described
in the perlfunc manpage in the usual way.

<snip>

The rest is either Server Specific or CGI General and is best
addressed in a forum appropriate to those subjects. 

However, I will say that it is unlikely that you will have much of an
%ENV beyond that which is supplied by the server as none of the usual
means by which a shell gains its environment will apply to a CGI.

/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Mon, 06 Apr 1998 06:53:54 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <35287969.14529035@news.btinternet.com>

On 6 Apr 1998 15:11:12 GMT, Greg Bacon <gbacon@cs.uah.edu> wrote:

<snip>
>   29    48.2 ( 18.8/ 29.4/ 20.5)  Gellyfish@btinternet.com
Hmm, 
a bout of taurocoproloquy (sic) on my part.

However of more interest/concern is the number two slot for
cross-posting targets. 

Things are beginning to become a little clearer.

/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Mon, 06 Apr 1998 17:15:20 -0400
From: Henry Hartley <henry@sprucemt.com>
Subject: text::soundex for Win32
Message-Id: <352945E8.F17B8094@sprucemt.com>

A client would like to include a soundex feature in a site I'm working
on.  I know there is a text::soundex module but I need something for
Win32 (the client's server).

Does anyone know if this module will work (make?) easily on Win32?  Or
better yet, is there a premade Win32 version of this module?

I've got the source of the module from CPAN but don't really know how to
proceed.  Are there general instructions anywhere for porting a module
to Win32?  Is it a difficult task?

Thanks for your help.

Henry Hartley





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

Date: 6 Apr 1998 20:48:49 GMT
From: amehdiza@joule.ee.calpoly.edu (Ali Mehdizadeh)
Subject: using modules
Message-Id: <6gbf3h$jd1$1@isnews.csc.calpoly.edu>


Hi,
I am trying to use the ceil() function which is apparently
part of the posix module.  I have tried the following without
any luck:

ceil($num);
posix::ceil($num);

I am using perl under NT.  What am I doing wrong?

Thanks,
-Ali M.


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

Date: 06 Apr 1998 18:28:09 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Why a FAQ is irritating (was Re: How do I strip newlines from a var)
Message-Id: <luwwd2h9fq.fsf@asfast.com>

Randal Schwartz <merlyn@stonehenge.com> writes:

> >>>>> "Lloyd" == Lloyd Zusman <ljz@asfast.com> writes:
> Lloyd> Well, this analogy doesn't quite cut it, either, since there is no
> Lloyd> booklet handed out at the door here until *after* someone makes their
> Lloyd> first post and receives the automatic emailing.
> 
> Yes, but everyone gets a booklet like that *with their watch*.  The
> booklet at the door is merely a reminder that they got such a booklet
> *with their watch*.

Not every usenet poster gets this "booklet" when first firing up their
newsreader.

And I know from first-hand experience that many, many people who first
start browsing newsgroups see "news.announce.newusers" and haven't the
faintest idea that they should go there and read what that group
contains.

> Lloyd> If there was no "Open to the Public" sign on the door, or if
> Lloyd> the existence and location of the pamphlet could somehow
> Lloyd> magically be made known to people even *before* their first
> Lloyd> entrance into the Forum, then I would agree with you.
> 
> It is.  It's called "please first check the documentation *already*
> provided with your tool before bugging the entire world with your
> word-for-word FAQ".

Not everyone who happens to be running Perl at the site they are
logged on to knows about "perldoc" or even "man", for that matter.
Some of us get to be sysadmins and install Perl on our site or
machine, and others just show up at an existing site and use what's
already there, often based on somone else's advice rather than a
formal sysadmin-based introduction.

> It's also called "read the newsgroup for a week before posting your
> first question, please."
> 
> Both of these are *clearly* stated netiquette.  Or are you telling
> me that people aren't even reading the operating manuals for *Usenet*
> either, as posted in news.announce.newusers?

Some people probably don't read them.  I'd be willing to bet that a
significant percentage of the people who post here before checking the
FAQ and the other docs haven't read much of anything about usenet.

> Sheesh.  No wonder we get upset.  On the IRC EFNET #perl channel, we
> call these people KLBs, as in Known Lazy B****rds.  And we're talking
> the lazy of just "I'm clueless -- rescue me before I have to work at
> it a bit", not "Lazy" in one of the three virtues of a good programmer
> (see the Camel Glossary).

You can call the people whatever you want, but I don't think that they
all are lazy.  In fact, I think that the majority of them are
absolutely *not* lazy ... just ill informed.  At least that's my
impression on usenet.  IRC might be a different story, for all I know.

> On Usenet, you read news.announce.newusers before your first post.

Not everyone does.  Not everyone even knows about the importance of
this.

> (Shame on those news admins that permit posting before reading the few
> simple posts in the n.a.n group.)  One of *those* posts says that you
> don't just walk into a newsgroup and post before reading for a week.
> At least once a week, the mini-FAQ gets posted here, which is
> identical to what someone gets by posting for the first time.  Also
> here (and this is *why* the experts do it), is *repeated admonitions*
> to those that post off-topic or from-the-FAQ-list.

Right.  And that's why the numbers of people who manage to fall
through the cracks and miss this stuff are so low in comparison to the
quiet lurkers, those who do check the docs before posting, and the
other regular contributors.

> So the only people that are making it past those barriers are all the
> people that are in VIOLATION of NETIQUETTE and therefore CLUELESS.
> Now, do you see how we could be angry at that?

Sure.  But I still think that glib, arrogant condescension is not
called for.  One can still feel angry without choosing to behave like
a jerk.

And for the record, I want to make it clear that I am not referring to
*you* (Randal Schwartz) here.  You seem to be quite good at giving
valuable information without resorting the childish insults that
certain other prolific posters here seem to take glee in dishing out.
I will not mention names.

> [ ... ] I certainly hope so.
> Even if we quote them the answer word-for-word out of the FAQ, they've
> already demonstrated a lack of common sense, and will likely be back
> with another lame question the next time they work with Perl.  Ugh!

I think that a polite "please check the FAQ, since this is a
frequently asked question and we'd prefer that you check the docs so
as to keep the newsgroup traffic down" is much better than a
condesceding insult which states the same thing.  Furthermore, I think
that the polite words will have at least the same level of
effectiveness in encouraging people to check out the available
documentation as the insults will.

> I have *incredible* patience for people that have common sense.  I
> don't care if they haven't a clue about how Perl works.  I
> painstakingly answer each and every question in detail.  (You should
> see the volume of private email consultation I do for free, not to
> mention the the questions I answer each week I'm in front of a
> classroom.)  But I must draw the line for KLBs, that demonstrate their
> laziness by the posting of a FAQ or off-topic question to CLPM.  No.
> Just say no.

I am not suggesting that you or anyone else take up any more time
answering frequently asked questions than you already do.  I am in
favor of referring people to the FAQ as much as you are.  My main
gripe concerns the condescending, insulting, jerk-like attitudes
exhibited by certain prolific posters here.  Someone can "just say no"
politely or rudely.

I, for one, am in favor of the polite approach.

-- 
 Lloyd Zusman
 ljz@asfast.com


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

Date: Mon, 06 Apr 1998 06:53:43 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Win32 ODBC error - object not found
Message-Id: <35285623.5676773@news.btinternet.com>

On Sun, 05 Apr 1998 17:26:14 -0600, santon@nu.com wrote:

<snip>
>
>Can't locate object method "new" via package "Win32::ODBC" at test.pl line 4.
>
>I've setup the DSN etc.  I temporarily renamed ODBC.PM to ensure it is the
>module being used, and it is.  What am I missing?
>

I dont know the much about the module itself but the error would seem
to indicate that Win32::ODBC is intended to sub-class from some other
module (i.e. "new" is inherited from anotherr module) and that module
is missing.

Take a look at the ODBC.pm file.  There will be a line something like:

@ISA = qw( <some modules>);

These are the modules that ODBC can inherit methods from.  Check to
see if all the corresponding files are present somewhere in @INC.  If
any of them are missing you will need to get and install them.

Hope that helps

/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Mon, 06 Apr 1998 17:23:36 -0400
From: Jim Kendall <jkendall@zenation.com>
Subject: ZenSearch is looking for a Perl programmer partner
Message-Id: <352947D8.7E66@zenation.com>

*******************************************************
ZenSearch is Looking for Partners
(Need a Perl programmer)
Visit:
http://www.zensearch.com/Partners/
To find out  how you could own part
of one of the coolest search engines 
on the web, even if you don' have $$$!

Don't reply to this email - Visit the site for info.

*******************************************************


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.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 2261
**************************************

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