[11838] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5438 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 21 08:07:29 1999

Date: Wed, 21 Apr 99 05:00:23 -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           Wed, 21 Apr 1999     Volume: 8 Number: 5438

Today's topics:
    Re: Any visual editor for Perl: Win32? <gellyfish@gellyfish.com>
    Re: Any visual editor for Perl: Win32? (Bart Lateur)
    Re: Any visual editor for Perl: Win32? <kai@sparc.spb.su>
        Check the user password <al-want@#--remove--#usa.net>
        Connecting to Oracle 8 on Linux <lee@old-chapel.demon.co.uk>
    Re: Database Objects In Perl <jll@skynet.be>
    Re: FAQ 3.22: How can I compile my Perl program into by <droby@copyright.com>
    Re: Headers posted from forms <gellyfish@gellyfish.com>
        HELP : install a perl module within win95 fquihi@my-dejanews.com
    Re: How can I execute non cgi PERL script under NT? (Bart Lateur)
    Re: HTTP Error while calling CGI-Script (written in Per <gellyfish@gellyfish.com>
    Re: I need solid information <gellyfish@gellyfish.com>
    Re: I need solid information (David Cantrell)
    Re: Monitoring the state of a serial port HELLLPPPPP <gellyfish@gellyfish.com>
    Re: Multiple submits on a CGI form (Andrea LN Spinelli)
    Re: Net::Ping problem <Michael.Cameron@nospam.technologist.com>
        Porting Modules across platforms. duggaraju@excite.com
    Re: Problem with writing to file. <gellyfish@gellyfish.com>
    Re: Problem with writing to file. <Michael.Cameron@nospam.technologist.com>
    Re: Problem with writing to file. smnayeem@my-dejanews.com
    Re: Q: perl process won't go away <gellyfish@gellyfish.com>
        Random value for Scalar <ours@casema.net>
    Re: Random value for Scalar <Michael.Cameron@nospam.technologist.com>
        Starting program via perl! <unix244@ai.fh-nuernberg.de>
    Re: Starting program via perl! <Michael.Cameron@nospam.technologist.com>
    Re: Suggestions and oneliners for Perl-talk? <kims@tip.net.au>
        Too many SIGCHLDs ? <dennis@bilbo.iok.net>
    Re: Uploading script. <Jan.Rooijackers@dsn.ericsson.se>
    Re: use Win32::ODBC causes script to hang in browser <gellyfish@gellyfish.com>
    Re: Which cgi tool should i use ? <gellyfish@gellyfish.com>
        why are only certain bareword hash keys ambiguous? <marty@catnmoose.com>
        win95 curses? (Tom Chen-Ming Lee)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 21 Apr 1999 11:26:38 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Any visual editor for Perl: Win32?
Message-Id: <371da7de@newsread3.dircon.co.uk>

Jim Durkin <jdurkin@gw.total-web.net> wrote:
> Hi, 
> 
> I'm a newbie to Perl.  Any visual editor commonly used with Perl on windows
> NT?  

Please check out:

<http://reference.perl.com/query.cgi?editors>

before the usual boring thread about everyones favourite editors starts

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 21 Apr 1999 10:30:28 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Any visual editor for Perl: Win32?
Message-Id: <3722a69b.1630833@news.skynet.be>

Jim Durkin wrote:

>I'm a newbie to Perl.  Any visual editor commonly used with Perl on windows
>NT?  

There's a list of editors available at

	http://www.teleport.com/~gerth/CGI/Perl_Editors.html

One that is currently (still) missing from that list is GWD from
www.gwdsoft.com .

In general, what you want (even if you don't know it) is an editor that:

 * saves files as Ascii (duh...)
 * tells you what line number your cursor is on (easier to locate syntax
errors...)
 * can shell to Perl with the script as a parameter, plus optional more
parameters to your liking, and which captures the output into an editor
window
 * optionally, gives some Perl syntax highlighting. Usually not perfect
(only perl can parse Perl...), but handy anyway.

My tips to check out are PFE, TextPad and GWD.

>Also, can you guide me to any good websites that have network related Perl
>scripts?

Start your search on http://reference.perl.com/query.cgi?communications
but you can find even more using the search engine in the home page of
http://reference.perl.com/ .

	Bart.


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

Date: Wed, 21 Apr 1999 14:42:50 +0400
From: "Arzhan I. Kinzhalin" <kai@sparc.spb.su>
Subject: Re: Any visual editor for Perl: Win32?
Message-Id: <Pine.GSO.4.02.9904211438000.1977-100000@minerva.sparc.spb.su>

On 21 Apr 1999, Jeff Wilson wrote:


->> I'm a newbie to Perl.  Any visual editor commonly used with Perl on
->windows
->> NT?  

One of the best editors for Win32 platforms I've ever seen is UltraEdit32!
Ultimate HTML-TEXT-HEX(very powerful)-PROGRAMMER'S editor. You can download it
from www.ultraedit.com, it's shareware. It's not an advertising - only my
impression on it. :)

xcore 



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

Date: Wed, 21 Apr 1999 11:13:00 -0700
From: "Albert Want" <al-want@#--remove--#usa.net>
Subject: Check the user password
Message-Id: <371da4f5.0@nnrp1.news.uk.psi.net>

I'm developing a CGI program that need to check if a password (on a Linux
system) provided by the user is correct. Since I'm running a shadow password
file, do you know how to check it without let the CGI run as root ?

Thanks in advance.

PS: Answer in mail too removing #--remove--# from the email address






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

Date: Wed, 21 Apr 1999 12:33:59 +0100
From: Lee Bennett <lee@old-chapel.demon.co.uk>
Subject: Connecting to Oracle 8 on Linux
Message-Id: <371DB7A6.48D8B152@old-chapel.demon.co.uk>


--------------2C8C2CF5C25E3302D9BB302C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi

Can perl talk directly to Oracle 8.0.5 on Linux. I have installed the
DBI driver which works fine, however the DBD driver (DBD Oracle 0.61)
fails to compile says there are files missing. Message as below:

In file included from Oracle.h:20,
                 from Oracle.xs:1:
dbdimp.h:41: oratypes.h: No such file or directory
dbdimp.h:42: ocidfn.h: No such file or directory
dbdimp.h:55: ociapr.h: No such file or directory

Lots of error messages after this point.

I am currently running the final beta release of Oracle 8.0.5 for Linux,
could this be the problem. This there another driver for the Linux
version of Oracle 8

Thanks

Lee

--------------2C8C2CF5C25E3302D9BB302C
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi
<p>Can perl talk directly to Oracle 8.0.5 on Linux. I have installed the
DBI driver which works fine, however the DBD driver (DBD Oracle 0.61) fails
to compile says there are files missing. Message as below:
<p><i>In file included from Oracle.h:20,</i>
<br><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
from Oracle.xs:1:</i>
<br><i>dbdimp.h:41: oratypes.h: No such file or directory</i>
<br><i>dbdimp.h:42: ocidfn.h: No such file or directory</i>
<br><i>dbdimp.h:55: ociapr.h: No such file or directory&nbsp;&nbsp;</i>
<p>Lots of error messages after this point.
<p>I am currently running the final beta release of Oracle 8.0.5 for Linux,
could this be the problem. This there another driver for the Linux version
of Oracle 8
<p>Thanks
<p>Lee</html>

--------------2C8C2CF5C25E3302D9BB302C--



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

Date: Wed, 21 Apr 1999 11:58:51 +0200
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Re: Database Objects In Perl
Message-Id: <VA.00000213.67529d84@lisa.infocahb>

> I have been looking for some examples of creating Database Objects in Perl, but 
> have been unsuccessful in finding any.

You may want to take a look at Tangram, available from CPAN:

    ftp://ftp.perl.org/pub/CPAN/modules/by-module/Tangram/Tangram-0.08.tar.gz
    
>From the included POD:

DESCRIPTION

Tangram is an object-relational mapper. It makes objects persist in
relational databases, and provides powerful facilities for retrieving
and filtering them. Tangram fully supports object-oriented programming,
including polymorphism, multiple inheritance and collections.
It does so in an orthogonal fashion, that is, it doesn't require
your classes to implement support functions nor inherit from a utility class.

Jean-Louis Leroy
http://ourworld.compuserve.com/homepages/jl_leroy



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

Date: Wed, 21 Apr 1999 11:31:50 GMT
From: Don Roby <droby@copyright.com>
To: lr@hpl.hp.com
Subject: Re: FAQ 3.22: How can I compile my Perl program into byte code or C?
Message-Id: <7fkcv6$q1m$1@nnrp1.dejanews.com>

[Posted and a courtesy copy mailed.]

In article <MPG.1186a1b25e00fa459898f2@nntp.hpl.hp.com>,
  lr@hpl.hp.com (Larry Rosler) wrote:
>
> In article <7fin2v$bup$1@nnrp1.dejanews.com> on Tue, 20 Apr 1999
> 20:12:18 GMT, Don Roby <droby@copyright.com> says...
> ...
> > s/min[i|u]scule/tiny/
> >
> > Both spellings are in some dictionary, but who needs this word anyway?
>
> There's a third match on that, which my dictionary doesn't have:
>
>     min|scule
>
> Hmmm...
>
> :-)
>

I guess I have to start testing my jokes before posting them.  ;-)

Or use character classes more often, so the correct syntax is ingrained.

make that s/min[iu]scule/tiny/

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 21 Apr 1999 12:39:16 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Headers posted from forms
Message-Id: <371db8e4@newsread3.dircon.co.uk>

M.R.Kanski <M.Kanski@if.pw.edu.pl> wrote:
> 
> I want to know all headers sent from my browser to server. How to do it?
> 
> Is it enough just to look in environment variables on the server and then
> compare content of
> $ENV{'HTTP_REFERER'} with header Http-referer? Aren't there any headers not
> included in these variables, that I can missed?
> 

No there will be stuff in the headers that does not transmitted as a
variable by the CGI.  The simplest way would be to use a small server
such as that posted in :

<http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=349107862>

to spit back the contents of your headers etc.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 21 Apr 1999 10:15:59 GMT
From: fquihi@my-dejanews.com
Subject: HELP : install a perl module within win95
Message-Id: <7fk8gt$mle$1@nnrp1.dejanews.com>

I want to install a perl module within win 95 (VRML.pm). How can i do it ?

NB: the line command (ppm install VRML.ppd)  doesn't  work.

thanks.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 21 Apr 1999 10:33:47 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How can I execute non cgi PERL script under NT?
Message-Id: <3721a66f.1587002@news.skynet.be>

Alejandro Eluchans wrote:

>I got Perl Builder for NT and it works great.
>
>Now, I need to run my PERL scripts (under Win NT) independently of any
>web server or PERL utility.
>Maybe using DOS line command (like UNIX) or maybe double clicking on a
>(.exe) icon?
>How do I get the PERL interpreter to "compile" my script?

Usually all you need is to associate the ".pl" file extension with
perl.exe. If that is done, you'll see a yellow dot as the file's icon.
The installer does this by default. You cannot give command line
parameters/option, nor see the output in the window, because it
disappears as soon as the script is finished.

Another option is to use an editor which allows you to run the script
and capture the output. See my reply in another thread of just a few
minutes ago.

	Bart.


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

Date: 21 Apr 1999 11:40:08 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HTTP Error while calling CGI-Script (written in Perl)
Message-Id: <371dab08@newsread3.dircon.co.uk>

Rajesh Bhave <bhaverajesh@hotmail.com> wrote:
> 
> HTTP/1.0 404 Object Not Found (The system cannot find the path specified. )
> 

That is not a Perl error - unless there is something very wrong with your
server I cant see how any CGI script could cause that by accident.



/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: 21 Apr 1999 10:56:43 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I need solid information
Message-Id: <371da0db@newsread3.dircon.co.uk>

Dan Barrett <danba@apexinteractive.com> wrote:
> 
> However, I still can't get a program to talk to another program on a
> different server. Pointers and reference is what I'm asking for, ..not
> hold-your-hand-pee-in-the-toilet shtuf, but sadly, _anything_ would
> help.
> 

The perlipc manpage, snippets in the FAQ, the Perl Cookbook ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 21 Apr 1999 10:48:50 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: I need solid information
Message-Id: <371dac97.427344508@news.insnet.net>

On Tue, 20 Apr 1999 18:35:05 -0500, Dan Barrett
<danba@apexinteractive.com> enlightened us thusly:

>Anyone--that can post some solid references for programming/using/etc.
>sockets and ports (tcp sockets are the critical item here). The Camel
>book is little help, the Panther book is ..ok, and I've got another
>network applications programming book.. all of which just don't have
>enough information to teach one how to communicate across servers. I've
>got a program by Sun Microsystems that acts as a www browser proxy,
>which has been the most help so far.

I learnt network programming out of O'Reilly's "Java Network
Programming".  The topic is discussed very well in there, and was
enough for me to get started with using sockets in perl.

[Copying newsgroup posts to me by mail is considered rude]

-- 
David Cantrell, part-time Unix/perl/SQL/java techie
                full-time chef/musician/homebrewer
                http://www.ThePentagon.com/NukeEmUp


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

Date: 21 Apr 1999 12:07:34 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Monitoring the state of a serial port HELLLPPPPP
Message-Id: <371db176@newsread3.dircon.co.uk>

vincev@pdq.net wrote:
> On Wed, 07 Apr 1999 15:32:40 GMT, gellyfish@gellyfish.com (Jonathan
> Stowe) wrote:
> 
>>On Wed, 07 Apr 1999 16:08:43 +0100, Lucio Godoy
>><lucio@corp.netcom.net.uk> wrote:
>>
>>>plz hellllllppppppp
>>>
>>>Lucio Godoy wrote:
>>>> 
>>>> Hi All;
>>>> 
>>>> I would like to monitor the state of my serial port, for instance:
>>>> 
>>
>>Ok calm down - I would go and read the perlfaq8 manpage wherein it
>>hath a section entitled:
>>
>>=head2 How do I read and write the serial port?
>>
>>which goes into some detail on this matter.
>>
>>/J\
> 
> I am in the same situations, but still searching for clues...
> I have checked that faq, already.  And no, that faq offers
> no insights on opening a serial port connection.  If you 
> found any other infos, plezzz post them .... 
> 

It might be useful if you suggested in what way the FAQ didnt provide
the answer it might also be useful if you indicated what you were trying
to do, what problems you were having and show us the piece of code
that you are having difficulty with 

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 21 Apr 1999 11:22:44 GMT
From: aspinelli@ismes.it (Andrea LN Spinelli)
Subject: Re: Multiple submits on a CGI form
Message-Id: <371db389.21462820@news.iol.it>

On Mon, 19 Apr 1999 14:46:31 +0100, "Clinton Gormley"
<clint@drtech.co.uk> wrote:

>I think what I'm asking is this :
>
>The second submit  creates a new process which detects that the request is
>already being processed.  How could you join the second process to the first
>process so that the user would see the appropriate result.

This is not a Perl question.

This fact is supported by my answer to your problem:

instead of messing up your server code, write a simple javascript
program that, when the submit button is pressed, sets
a javascript variable to 1 and calls the server.
Next time the button is pressed, check the global variable
and pop up a message box saying 'Stop hitting submit, you fool!'

A colleague of mine did it recently, and works perfectly.
It's less than twenty lines of JavaScript code and it
solves all your problems.  I will not post code,
because I am already risking flames...

Good luck!

    A.



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

Date: Wed, 21 Apr 1999 10:30:46 +0000
From: Michael Cameron <Michael.Cameron@nospam.technologist.com>
To: abelem@awi-bremerhaven.de
Subject: Re: Net::Ping problem
Message-Id: <371DA8D5.699DEB3@nospam.technologist.com>

"Andre L. Belem" wrote:

>
> #!/bios4/user1/LWperl5/bin/perl -w

Warnings are on..

>
>
> use strict;

You are using the strict pragma...

>
> use Net::Ping;
>
> # <---------------- here test if SeaWiFS and WWW-AWI are alive
>
> $alive = Net::Ping->new("tcp");  # not root! use tcp

And at the line indicated by the error message below you refer to a
variable which could be from anywhere.

You could use "my $alive;" around about here to explicitly define the
package name for this symbol.
At the risk of being flamed I would say do not use strict until you are
more familiar with perl. (keep the -w though)
See the thread Top 10 newbie errors, a posting from Clinton Pierce if you
are interested.

HTH,

Michael

>
> (defined $alive)
>         or die "Something wrong with Net::Ping procedure: $!\n";
>
> if ($alive->ping("www.awi-bremerhaven.de")) {
>         print "AWI-WWW is alive\n";
> } else {
>         print "AWI-WWW may be down\n";
> }
> $alive->close;
>



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

Date: Wed, 21 Apr 1999 10:13:19 GMT
From: duggaraju@excite.com
Subject: Porting Modules across platforms.
Message-Id: <7fk8bu$mbb$1@nnrp1.dejanews.com>

Hi All, 	Supose that I have an usefule Package in the perl
implementation on one platform.  What is the general procedure to port that
pacakge on other platform keeping the interface same (i.e., the .pm file
remains same) and  the actual implementation is taken care by some library.


Thanks in advance,
prakash

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 21 Apr 1999 10:53:39 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Problem with writing to file.
Message-Id: <371da023@newsread3.dircon.co.uk>

agniora@usa.net wrote:
> well the whole code is a little big though. hope noone minds me posting such a
> long piece of code. :o)
> 

Er generally we like to see the smallest piece of working code that
demonstrates the problem - I havent got time to read through all this
myself.


<snip huge code>

> 	printf ("Surcharge(5%) :            %7.2f\n",$total * 0.05);

<snip>

> 
> Invalid conversion in printf: "%)" at menu.pl line 192, <LOGFILE> chunk 44677.
> Invalid conversion in printf: "%)" at menu.pl line 193, <LOGFILE> chunk 44677.
> 

You need %% to print a percent sign in the format of (s)printf.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 21 Apr 1999 10:16:03 +0000
From: Michael Cameron <Michael.Cameron@nospam.technologist.com>
Subject: Re: Problem with writing to file.
Message-Id: <371DA563.12CD7769@nospam.technologist.com>

Sorry I did mean the whole code but had made the assumption that you would have
reduced it to "smallest piece of working code that
demonstrates the problem " as suggested.

I do note that you answered your own question when you used the -w flag.  Perhaps
you should you use it more often, certainly before posting. ;-)

Michael



> Er generally we like to see the smallest piece of working code that
> demonstrates the problem - I havent got time to read through all this
> myself.



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

Date: Wed, 21 Apr 1999 10:23:00 GMT
From: smnayeem@my-dejanews.com
Subject: Re: Problem with writing to file.
Message-Id: <7fk8u2$mqq$1@nnrp1.dejanews.com>

In article <lm1jf7.jv4.ln@magna.metronet.com>,
  tadmc@metronet.com (Tad McClellan) wrote:
> scraig@my-dejanews.com wrote:
>
> : It is also
> : possible to turn off the output buffering.
>
>    How do you do that?
>
>    (enabling auto-flush does not "turn off" buffering)
u need to use the $| system variable to turn off buffering.
agniora

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 21 Apr 1999 11:01:52 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Q: perl process won't go away
Message-Id: <371da210@newsread3.dircon.co.uk>

<comp.lang.perl is a no more group>

In comp.lang.perl.misc jim <ji1@home.com> wrote:
> We have some cgi scripts that is written in perl.  The web server
> is NT/IIS4.  We are using perl.exe, not perl.dll.  For some reason,
> the perl.exe process won't go away after the execution.  Eventually
> the system will run hang.  By the way, we are using activestate perl
> 5.007.  We tried 5.008 and 5.015 build.  Same problem.
> 

In case anyone gets get confused - that is ActiveState build 507 508 and
515 at Perl version 5.00502,5.00502 and 5.00503 respectively.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 21 Apr 1999 12:49:15 -0700
From: "Ours" <ours@casema.net>
Subject: Random value for Scalar
Message-Id: <7fkafo$7pv$1@news.casema.net>

Hi All,

is there a way (sure, but how) to generate a random number and assign it to
a scalar?
Something like:

$RAN_NUM = 10000+(RAND[1]*89000);

to generate a number between 10.000 and 99.000 for $RAN_NUM ??

Thanks in advance,

MW




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

Date: Wed, 21 Apr 1999 11:14:43 +0000
From: Michael Cameron <Michael.Cameron@nospam.technologist.com>
To: Ours <ours@casema.net>
Subject: Re: Random value for Scalar
Message-Id: <371DB323.623447CB@nospam.technologist.com>

Ours wrote:

> Something like:
>
> $RAN_NUM = 10000+(RAND[1]*89000);

More like

$RAN_NUM = 10000+(rand(1)*89000);

see:
perldoc -f rand

You should already have the documentation supplied with perl.  Read it before
posting.



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

Date: Wed, 21 Apr 1999 13:26:00 +0200
From: Will <unix244@ai.fh-nuernberg.de>
Subject: Starting program via perl!
Message-Id: <371DB5C8.CF5530EF@ai.fh-nuernberg.de>

Hello perl freaks,

I need your help! I wanna start a program (binary) out of a perl script.
Is there any command I can use for doing this. I have written a perl
script which is checking a text file and depending on files contents it
has to start the appropriate program.

Thanks for help
Bye,
Will

P.S. Please send a copy of your anwer also directly to me and not only
in the newsgroup. Thanxs



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

Date: Wed, 21 Apr 1999 11:53:32 +0000
From: Michael Cameron <Michael.Cameron@nospam.technologist.com>
To: Will <unix244@ai.fh-nuernberg.de>
Subject: Re: Starting program via perl!
Message-Id: <371DBC3C.60C23DA6@nospam.technologist.com>

Will wrote:

> I wanna start a program (binary) out of a perl script.

perldoc -f exec
perldoc -f system

You see, you had the answer at your fingertips all the time!  Read first,
post last.



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

Date: Wed, 21 Apr 1999 20:25:21 +1000
From: "Kim Saunders" <kims@tip.net.au>
Subject: Re: Suggestions and oneliners for Perl-talk?
Message-Id: <924690327.499985@draal.apex.net.au>


Thorbjoern Ravn Andersen wrote in message <371D9319.BE313067@bigfoot.com>...
>o regular expressions
>o dynamic arrays
>o hashes
>
>but there must be additional "power tools" within perl which would be
>suitable for the uninitiated.


What I personally consider the be the BEST think about perl is the syntax! I
would put time into showing some stuff about how friendly it is. Note that
my background is from M$ OSes and BASIC, VB. (this is a few years back...).
And then perl.

Even just LOOKING at some c code after using basic is very confusing, but
perl is much better, same general syntax, but not so formal in terms of main
procedures, vars, etc. Plus, it is written in a much more linear format.

So, how do you do a 'hello word' in C? I don't know, never used it, but
would guess:

#<include stdio.h>

main (void) {
  printf("Hello World!");
}

Not too bad, but for a newby,

print "Hello World!";

is more inviting...

The way you can just whack string names in double-quoted strings is SO COOL!
Where does this come from??? Not C, I don't think. NOT basic.... These
mystical "sed, awk" of which perl supposedly derives???

Other than that, the C syntax like curly brackets ("braces" for yanks...)
for ALL functions, loops, etc is good, it makes these blocks of code
consistent, unlike IF/END IF, WHILE/WEND, FOR/NEXT. And the MESS that is
pascal... (they make me at school....), well, that really DOES make me
greatful for perl's simple, consistent syntax.

What else... The fact you don't have to compile it is good, it just makes it
so quick and easy to code, then run instantly. The huge extent of
portability it good, perl must be one of the most portable languages around
(bar C)???

File I/O is awesome too, SO quick & easy to read, write to/from files! It's
not like this is hard in other languages, but it is so quick in perl.

I honestly don't know why perl isn't used more in education, and on windows
platforms. They make me do pascal at school, and I could do most of that
crap in about 1/10th the time in perl. It really makes things simpler not
spending half your time thinking "I know what I wanna do... now how do I do
that in this language???". With perl is working out what you wanna do that's
hard! Once you do that, it's all simple!

Regexes are great too, and hashes, arrays, but I though I would share the
things that really appealled to me about perl from a relative newby
perspective a few years back.

KimS



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

Date: Wed, 21 Apr 1999 12:14:33 +0200
From: Dennis Wetzig <dennis@bilbo.iok.net>
Subject: Too many SIGCHLDs ?
Message-Id: <371DA509.88550592@bilbo.iok.net>

Hi, 

	I have the problem that my program forks a lot of children (, which
exit correctly), whose SIGCHLDs do not seem to be caught correctly.

Look at the appended example code I wrote. I create children (which
imediately exit) until fork fails for the first time (no more processes
available). Then I run into an endless loop. 

I would expect that the signal handler would then catch all the
SIGCHLDs, and by 
this I would get rid of all the zombies.

This is not the case: Some of them I get rid of, but a lot just stays as
zombies. No matter how long I wait. 


If you have an idea, then let me know, please. 

The only thing I could imagine, is that the Signalhandler gets confused
whenever
a SIG arrives while another one is currently processed. Is that
possible?


Thanks a lot, 
Dennis

  
---- My code ----

$SIG{CHLD}=sub { wait };


for(;;)
        {

if($pid=fork)
        {
        #Parent here
        ;
        }
elsif(defined($pid))
        {
        #Child here
        ;
        exit(0);
        }
else
        {
        print "End\n";
        for(;;)
                {
                ;
                }
        }

}
~


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

Date: Wed, 21 Apr 1999 13:43:00 +0200
From: "Jan Rooijackers" <Jan.Rooijackers@dsn.ericsson.se>
Subject: Re: Uploading script.
Message-Id: <7fkcl4$q6r@newstoo.ericsson.se>

Hi,

Check http://worldwidemart.com/scripts/


Ours wrote in message <7f7f4i$atb$1@news.casema.net>...
>Hi All,
>
>I would like to have a script (write) that would upload an attachement to
my
>server.
>Idea is to be able to browse my local drives and find the source-file and
>then press UPLOAD to upload to a remote server.
>
>Is this at all possible and can someone point me in the right
direction/hand
>me the script?
>
>Thanks,
>
>MW
>
>




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

Date: 21 Apr 1999 11:18:23 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: use Win32::ODBC causes script to hang in browser
Message-Id: <371da5ef@newsread3.dircon.co.uk>

Jason Q. <pigs_can_fly@mindless.com> wrote:
> Hi
> 
> I'm learning to access an MS Access database using Perl and
> Win32::ODBC.
> 
> The script works fine when I run it from the command prompt. However,
> when I try to run it on Netscape and IE, the script fails to run and I
> get a "Trasferring data from 127.0.0.1" message on the status bar and
> eventually "Document contains no data".
> 
> I have found out that the line
> 
> use Win32:ODBC;
> 
> is the cause. Why don't the browsers recognise this line? And what
> must be done so that the script will run?
> 

The browsers dont recognize line because they never see it (presumably)
it is nothing to do with the Browser.  How did you find out that line
was the cause what diagnostic information have you got.

The fact that your program works from the Command line and not when
run by the *server* using the CGI would indicate that this infact not a Perl
problem at all but but either a CGI or server configuration problem.

I would imagine that the problem is with your ODBC DSN but I'm not
going to waste time speculating here when it would be best answered
in another group.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: 21 Apr 1999 11:25:12 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Which cgi tool should i use ?
Message-Id: <371da788@newsread3.dircon.co.uk>

Austin Ming <austin95002887@yahoo.com> wrote:
> I am a beginner of CGI.

Great. Know now that Perl is not synomous with CGI or vice versa.  
Perl is used in far more ways than writing programs to the CGI.

> I enccounter a problem as i do not know which software should i use to run
> cgi.
> Because, different people use different software.
> Any CGI expert please give me a reommendation.
> 
> [ActivePerl 515] , [ Apache HTTP Server v1.3.6 ] , [ Sambar 4.1 ]
> 
> Among these softwre, which one is the best to run CGI ??
> 

Er, if you are going to  write your CGI programs in Perl then you are
going to have to have at least two of those three - one of them being
Perl - however the choice between the other two is immaterial to this
group and should be asked in:

comp.infosystems.www.servers.ms-windows

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Wed, 21 Apr 1999 06:39:52 -0400
From: Marty Landman <marty@catnmoose.com>
Subject: why are only certain bareword hash keys ambiguous?
Message-Id: <371DAAF8.CFC9C0B0@catnmoose.com>

Occasionally I get the following type of message on a compile:

>>Ambiguous use of {title} resolved to {"title"} at EditSpec.pl line
91.<<

The program in question had references to five different keys for a hash
being assigned in the routine, all barewords but Perl only considered
two of them to be ambiguous.  What causes this and how might I deal with
it in a consistant way preferably w/o enclosing all my hardcoded keys in
quotes?

tia

--
 Marty Landman            Web Programming and Design
 Cat 'n Moose dot com     http://www.catnmoose.com/
 (914) 657-2605           marty@catnmoose.com




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

Date: 21 Apr 1999 11:05:11 GMT
From: cmlee@soda.CSUA.Berkeley.EDU (Tom Chen-Ming Lee)
Subject: win95 curses?
Message-Id: <7fkbd7$mgr$1@agate.berkeley.edu>


Hi all.  Is there a curses module for win95?  I am using ActivePerl
but don't see it in their PPM repository.  Is it possible to build
it from the source and link it with, say, PD Curses?  Thanks.


- Tom


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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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 5438
**************************************

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