[17308] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4730 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 26 09:05:25 2000

Date: Thu, 26 Oct 2000 06:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <972565509-v9-i4730@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 26 Oct 2000     Volume: 9 Number: 4730

Today's topics:
    Re: [Q] Newbie question <bh_ent@my-deja.com>
    Re: ActivePerl under Windoze 98 <carvdawg@patriot.net>
    Re: another perl syntax question. <krahnj@acm.org>
    Re: CGI.pm form parameters initialization question (pro (Ulrich G. Wortmann)
    Re: Convert text from ISO 8859-x to utf8 <thunderbear@bigfoot.com>
        How can I word wrap on STDOUT? <eric.kort@vai.org>
        I hate doublequotes!!!!! <xerxes_2k@my-deja.com>
    Re: I hate doublequotes!!!!! (Bernard El-Hagin)
    Re: I hate doublequotes!!!!! <xerxes_2k@my-deja.com>
    Re: I hate doublequotes!!!!! <gellyfish@gellyfish.com>
    Re: I hate doublequotes!!!!! <xerxes_2k@my-deja.com>
    Re: I hate doublequotes!!!!! <xerxes_2k@my-deja.com>
    Re: I hate doublequotes!!!!! (Bernard El-Hagin)
    Re: I hate doublequotes!!!!! <xerxes_2k@my-deja.com>
    Re: I hate doublequotes!!!!! <james@NOSPAM.demon.co.uk>
        IBM AS/400 connectivity using Perl? <mark.warnes@limecs.com>
    Re: IBM AS/400 connectivity using Perl? <gellyfish@gellyfish.com>
    Re: Lienes disappearing when reading from file <fb@ltec.ch>
    Re: Malformed header resulting from use of mkdir() (M. van den Bos)
    Re: Monitor TCP ports <carvdawg@patriot.net>
    Re: Newbie <gellyfish@gellyfish.com>
    Re: Perl on NT <danielxx@bart.nl>
    Re: Perl on NT <josef.moellers@fujitsu-siemens.com>
    Re: problems to install perl module <thunderbear@bigfoot.com>
    Re: Regular expression help (Anno Siegel)
        Starting background process from Perl djoerg@my-deja.com
    Re: Syntax Problem for Newbie <arg@interact.net.au>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 26 Oct 2000 12:38:00 GMT
From: bh <bh_ent@my-deja.com>
Subject: Re: [Q] Newbie question
Message-Id: <8t98j8$b56$1@nnrp1.deja.com>

In article <39F7333D.DF2D0F1F@ipac.caltech.edu>,
  tim@ipac.caltech.edu wrote:
> bh wrote:
> >
> > Hi, I am new to perl, and I am interested in writing a program that
> > will let me create a table (or database or what have you) from
several
> > password files (UNIX /etc/passwd) and:
> > 1) verify all logins and UIDs are the same in all files (if they
exist)
> > 2) determine a UID in a given range (say 1000-9999) that is not in
use
> > in any of the files.
> >
> > I have started this project several times.  I've tried using hashes
and
> > arrays as the storage types, but just can't get the comparison
routines
> > to work.  Is there a better structure?
>
> If it's a particular comparison that's failing, show us a working
code snippet
> with data that reproduces the problem, and we can probably help you.
If it's
> more complicated than that, reduce your code as much as you can to
generate a
> test case and post that. We really can't help much without the
specific code in
> question.
>
> --
>
> -- Tim Conrow         tim@ipac.caltech.edu                           |
>
Here is a snippet of code.  Please don't laugh too hard.  This doesn't
work, but it should give you an idea of what I'm trying to accomplish.

foreach my $server (@HOSTS) {
    open((PASSWD),"/tmp/passwd.$server") || die "Cannot open passwd
files: $!";
    while (<PASSWD>) {
      ($login, $uid) =(split /:/)[0,2];
      $uid{$login} = $uid;
    }
    foreach $href{$_}(each (\%uid)) {
      foreach %hreg(each (\%uid)) {
        if (%href eq %hreg || %href = %hreg) {
          %key_count=%href;
        }
      }
    }
}

I'm trying to compare one key/value pair from the hash, against the
entire hash to verify that if the key exists, it has the same value
associated (ie, if the first key/value pair is root{0} then I want to
verify that if another key of 'root' exists, that is has the value
of '0'.  I also want to verify that all values of '0' share the same
key, 'root' in this case).

I know I'm not very good at explaining this, and I appreciate
everyone's patience.  Sometimes I have to be dragged kicking and
screaming into the light.  Thanks for the helping hand!

Drew


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


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

Date: Thu, 26 Oct 2000 07:41:05 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: ActivePerl under Windoze 98
Message-Id: <39F81851.CD3436E@patriot.net>

It might help if you could tell us which modules, specifically, you're
having
trouble with.  Without that info, most of the answers may be just
speculation...


schnurmann@my-deja.com wrote:

> For some reason, when I try to install perl modules via ppm, it can't
> find them.
>
> If I download them, unzip/untar and then run perl Makefile.PL, Windoze9
> then complains that the programme performed an illegal instruction.  I
> then have to reboot.  Anyone seen this before?  Is this a windoze 98
> problem?  I am running ActivePerl 5.6.0, build 618.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
Q: Why is Batman better than Bill Gates?
A: Batman was able to beat the Penguin.




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

Date: Thu, 26 Oct 2000 03:54:58 -0700
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: another perl syntax question.
Message-Id: <39F80D82.735CA912@acm.org>

Hugo Bouckaert wrote:
> 
> Hi All
> 
> What does .= refer to? I have lines in a perl script like:
> 
> $query .= "\t$lead $field = $emailid\n";

This is the same as:
$query = $query . "\t$lead $field = $emailid\n";
or
$query = "$query\t$lead $field = $emailid\n";

John


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

Date: 26 Oct 2000 14:04:45 +0200
From: uliw@erdw.ethz.ch (Ulrich G. Wortmann)
Subject: Re: CGI.pm form parameters initialization question (probably silly)
Message-Id: <m3itqfn6zm.fsf@bonk.ethz.ch>

uliw@erdw.ethz.ch (Ulrich G. Wortmann) writes:

> Hey Jay,
> 
> > > routine), and check the contents of $q->param() none of the data I
> > > entered is found on the parameter list, only the default values.
> > 
> > CGI.pm form fields have "sticky" behaviour. Try using the -force=>1
> > property. i.e.
> > print textfield(-name=>$name, -value=>$value, -force=>1);
> 
> thanks, but that doesn't help either.. I'm going to repost the problem
> in the cgi authoring group.

The problem was caused by explicitly setting params before calling
textfield. I now have all params_to_be_set on my private array, and
set them while calling textfield. 

        Cheers

                Uli
-- 
	Uli Wortmann
	Dept. of Geology       Fax (Switzerland) (1) 632  1030
	ETH-Zuerich            Fon                        3694
        Visit the SPOC-team at http://www.spoc.ethz.ch


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

Date: Thu, 26 Oct 2000 14:41:17 +0200
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: Convert text from ISO 8859-x to utf8
Message-Id: <39F8266D.429CF89D@bigfoot.com>

Filthaut wrote:
> 
> Hi,
> 
> I search a hint how to solve this problem in Perl.
> 
> I have a mail text and know the character sets e.g. ISO 8859-6 (arabic).
> I have to convert the text into a utf8 unicode text with ncs's characters
> (&#1530;).

Have a hash-table with the 256 different characters in 8859-6, where the
resulting value is the UTF-8 string for the character.  You may want to
look at the public Unicode->UTF8 conversion routines to construct this.


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


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

Date: Thu, 26 Oct 2000 09:01:21 -0400
From: "Eric" <eric.kort@vai.org>
Subject: How can I word wrap on STDOUT?
Message-Id: <8t99qd$1ea8$1@msunews.cl.msu.edu>

I have a Perl program that reads a BibTex bibliography and returns the
abstracts and reference keys matching search criteria I specify at the
prompt.  However, when it prints the abstract(s) to the screen, I wish it
would word wrap rather than just wrap at the terminal boundary (makes it a
little distracting to read).

I could split the abstract into words and print the abstract to stdout word
by word, keeping track of the line length as I go.  But is their a less
labor intensive way?

Thanks,
Eric





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

Date: Thu, 26 Oct 2000 09:58:40 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: I hate doublequotes!!!!!
Message-Id: <8t8v8f$4da$1@nnrp1.deja.com>

the script i am writing stores entries from a for into a mysql DB. this
means that every time someone uses doubles quotes in thie entry it has 2
be escaped, before it can be stored.

s/\"/\\"/g;
easy enough.
but if some clever dick decides to escape the double quote in his entry
like so \".
it more of a problem.
i thought this would work.
s/\\\"/\\"/g;#nasty i know
but it doesnt.
any ideas.

--
[][][]{}{}~~';:.<<//?|1¬!"£$$%^^&*(())__+/*+
oooh random characters i must be coool!


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


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

Date: 26 Oct 2000 10:15:20 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: I hate doublequotes!!!!!
Message-Id: <slrn8vg14r.28m.bernard.el-hagin@gdndev25.lido-tech>

On Thu, 26 Oct 2000 09:58:40 GMT, arse <xerxes_2k@my-deja.com> wrote:
>the script i am writing stores entries from a for into a mysql DB. this
>means that every time someone uses doubles quotes in thie entry it has 2
>be escaped, before it can be stored.
>
>s/\"/\\"/g;

There's no need to escape the " on the left side of the s///.

>easy enough.
>but if some clever dick decides to escape the double quote in his entry
>like so \".
>it more of a problem.
>i thought this would work.
>s/\\\"/\\"/g;#nasty i know
>but it doesnt.
>any ideas.

The following works for both escaped and unescaped "'s:

s/\\?"/\\"/g;

Cheers,
Bernard
--
perl -le'
($B,$e,$r,$n,$a,$r,$d)=q=$B$e$r$n$a$r$d==~m;
\$(.);xg;print$B.$e.$r.$n.$a.$r.$d;'


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

Date: Thu, 26 Oct 2000 10:57:32 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: Re: I hate doublequotes!!!!!
Message-Id: <8t92mr$6pm$1@nnrp1.deja.com>

nice one m8.
the only bit wrong was replacing with \\", needed to be just \"
otherwise wont work.


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


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

Date: Thu, 26 Oct 2000 11:12:07 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I hate doublequotes!!!!!
Message-Id: <bkUJ5.761$ZA5.11714@news.dircon.co.uk>

On Thu, 26 Oct 2000 09:58:40 GMT, arse Wrote:
> the script i am writing stores entries from a for into a mysql DB. this
> means that every time someone uses doubles quotes in thie entry it has 2
> be escaped, before it can be stored.
> 

Why dont you use the DBI quote() method as described in the DBI manpage ?


/J\


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

Date: Thu, 26 Oct 2000 11:10:22 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: Re: I hate doublequotes!!!!!
Message-Id: <8t93er$7af$1@nnrp1.deja.com>

am i gping round in circles here?

--
[][][]{}{}~~';:.<<//?|1¬!"£$$%^^&*(())__+/*+
oooh random characters i must be coool!


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


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

Date: Thu, 26 Oct 2000 11:22:25 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: Re: I hate doublequotes!!!!!
Message-Id: <8t945d$7p0$1@nnrp1.deja.com>

my appologies you were right in the first place. dunno what i was doin.
i am completly insane, and really am an arse

--
[][][]{}{}~~';:.<<//?|1¬!"£$$%^^&*(())__+/*+
oooh random characters i must be coool!


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


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

Date: 26 Oct 2000 11:31:13 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: I hate doublequotes!!!!!
Message-Id: <slrn8vg5j5.28m.bernard.el-hagin@gdndev25.lido-tech>

On Thu, 26 Oct 2000 10:57:32 GMT, arse <xerxes_2k@my-deja.com> wrote:
>nice one m8.
>the only bit wrong was replacing with \\", needed to be just \"
>otherwise wont work.

The exact opposite is true. The solution I posted was correct. Observe:

#my solution
$_ = 'sdfasdf"sdfas\"asdfasdf';
s/\\?"/\\"/g;
print;

Result:

sdfasdf\"sdfas\"asdfasdf

#your change in my solution
$_ = 'sdfasdf"sdfas\"asdfasdf';
s/\\?"/\"/g;
print;

Result:

sdfasdf"sdfas"asdfasdf

Which is logical if you consider that the right side of the s///
operator is treated as a double quoted string.

One more thing. If you'd like to take into account the possibility that
someone might escape a " many times use this:

s/(\\*)?"/\\"/g;

Or, if you don't want to capture the \'s:

s/(?:\\*)?"/\\"/g;

Cheers,
Bernard
--
perl -le'
($B,$e,$r,$n,$a,$r,$d)=q=$B$e$r$n$a$r$d==~m;
\$(.);xg;print$B.$e.$r.$n.$a.$r.$d;'


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

Date: Thu, 26 Oct 2000 11:49:34 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: Re: I hate doublequotes!!!!!
Message-Id: <8t95oc$8vl$1@nnrp1.deja.com>

thanx will look at that.
also just a note on the regexp before
it should be s/\\*"/\\"/g, that will cath it no matter how many slashes
ther are before it. will chop em of though.

--
[][][]{}{}~~';:.<<//?|1¬!"£$$%^^&*(())__+/*+
oooh random characters i must be coool!


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


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

Date: Thu, 26 Oct 2000 13:14:33 +0100
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: I hate doublequotes!!!!!
Message-Id: <ant2612331cbfNdQ@oakseed.demon.co.uk>

In article <8t8v8f$4da$1@nnrp1.deja.com>, arse
<URL:mailto:xerxes_2k@my-deja.com> wrote:
> the script i am writing stores entries from a for into a mysql DB. this
> means that every time someone uses doubles quotes in thie entry it has 2
> be escaped, before it can be stored.
> 
> s/\"/\\"/g;
> easy enough.

You would do better to allow the MySQL DBD to do the escaping of such
things for you so that you do not need to worry. There is a DBI method
called quote() which takes a string and returns a quoted and escaped
string suitable for inclusion in an SQL statement for whatever database
is in use. In the case of MySQL, MySQL quoting rules are used. You can
also call prepare() with placeholders in the SQL and then call execute()
with the values to go in those placeholders and the DBI will do the
quoting for you transparently. This is a much easier and more portable
solution than trying to do the escaping of quotes yourself.

> [][][]{}{}~~';:.<<//?|1¬!"£$$%^^&*(())__+/*+
> oooh random characters i must be coool!

Wow, coool! ;-)

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: Thu, 26 Oct 2000 11:11:09 +0100
From: "Mark Warnes" <mark.warnes@limecs.com>
Subject: IBM AS/400 connectivity using Perl?
Message-Id: <xrTJ5.370$sE.4606@news6-win.server.ntlworld.com>

Does anyone know of any modules or techniques for connecting to an IBM
AS/400 system through Perl?

I'd like to be able to access data on an AS/400 from a Perl script that I'm
writing but can't think of any way to get the two to communicate.

Any help greatly appreciated.

Mark




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

Date: Thu, 26 Oct 2000 11:15:41 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: IBM AS/400 connectivity using Perl?
Message-Id: <xnUJ5.762$ZA5.11714@news.dircon.co.uk>

On Thu, 26 Oct 2000 11:11:09 +0100, Mark Warnes Wrote:
> Does anyone know of any modules or techniques for connecting to an IBM
> AS/400 system through Perl?
> 
> I'd like to be able to access data on an AS/400 from a Perl script that I'm
> writing but can't think of any way to get the two to communicate.
> 

FTP, Telnet whatever.  You might find some module on CPAN that does AS/400
specific stuff but I cant remember seeing any.

/J\


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

Date: Thu, 26 Oct 2000 12:20:18 +0200
From: "Felix Brack" <fb@ltec.ch>
Subject: Re: Lienes disappearing when reading from file
Message-Id: <39f806a2@news.datacomm.ch>

The script is supposed to run on a IIS using
NT4.0 SP6. If possible, I will check it out
today on a unix system (Sun) and post the result
to the news group.

Many thanks so far, Felix

--
-----------------------------------
Felix Brack
LTEC AG
Dorfgasse 10
CH-4435 Niederdorf
SWITZERLAND
Internet: http://www.ltec.ch

Tel. +41 61 963 14 14
Fax. +41 61 963 14 13
E-Mail: fb@ltec.ch
"Jeff Zucker" <jeff@vpservices.com> wrote in message
news:39F5BA55.8C39523E@vpservices.com...
> Tad McClellan wrote:
> >
> > I'm not sure, but I'll guess that what you are doing wrong
> > is using M$'s command interpreter.
>
> While no defender of M$, I gotta report that the script works fine for
> me on win98 without any sacrificial "\n".  Original poster: what OS are
> you on?
>
> --
> Jeff




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

Date: Thu, 26 Oct 2000 11:40:53 GMT
From: mvdbos@integral.nl (M. van den Bos)
Subject: Re: Malformed header resulting from use of mkdir()
Message-Id: <39f816df.3307459@news.nl.net>

On Thu, 26 Oct 2000 00:57:03 GMT, "Ed Grosvenor"
<secursrver@hotmail.com> wrote:

>$dir  is dynamically assigned based on user input.

Are you checking the user input for system commands and other
malicious stuff?
>
>print("mkdir() ", mkdir("$dir", 0777), "\n");

are you printing a content header to the browser first? 
	print "content-type:text/html\n\n";
Or even better, use cgi.pm and use the header method.

--
Matthijs van den Bos     INTEGRAL BV
<mvdbos@integral.nl>     www.integral.nl


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

Date: Thu, 26 Oct 2000 07:36:13 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: Monitor TCP ports
Message-Id: <39F8172D.35F63454@patriot.net>

Since you're using Win98, you want to look at something like:

http://netgroup-serv.polito.it/winpcap/

After installing winpcap, you install Windump or Analyzer.  I don't know

if the Win32 port of snort (IDS) runs on Win98...

anewcomb@my-deja.com wrote:

> Can perl passively monitor TCP ports? I would
> like to write a script to monitor ports and
> output the traffic to a flat text file.
>
> Thanks,
> Aaron Newcomb
> aaron@newcombnet.com
> http://www.newcombnet.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
Q: Why is Batman better than Bill Gates?
A: Batman was able to beat the Penguin.




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

Date: Thu, 26 Oct 2000 10:22:27 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Newbie
Message-Id: <DBTJ5.759$ZA5.11607@news.dircon.co.uk>

On Wed, 25 Oct 2000 20:09:20 GMT, 5defcon5@my-deja.com Wrote:
> I am writing a web page that has a form taking in a username and
> password.  I would like to verify this username and password against
> the system password file.  

This is the wrong place to discuss this but you really, really, really
dont want to do that if your system is accessible to the wide world.

>                            Is there a module or something to help me do
> this and can someone give me an example of how this module is used.
> 

Read about crypt() in the perlfunc manpage.

/J\


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

Date: Thu, 26 Oct 2000 11:53:16 GMT
From: "Daniel van den Oord" <danielxx@bart.nl>
Subject: Re: Perl on NT
Message-Id: <MWUJ5.1931$iF1.26720@typhoon.bart.nl>

LOL haha a microsoft Perl Version OMG.. that's just like www.mslinux.org
Sorry just made me smile when I read it !!!

Daniel

"Martien Verbruggen" <mgjv@tradingpost.com.au> schreef in bericht
news:slrn8vet63.a0g.mgjv@verbruggen.comdyn.com.au...
> On Thu, 26 Oct 2000 01:48:38 +0200,
> Alex Fitterling <fe8x025@public.uni-hamburg.de> wrote:
> > Hello.
> >
> > Is Perl in NT (4.0) integrated, or has it to be installed additionally
> > ?
>
> Are you asking whether it comes as part of the OS? No. And if it did,
> I'd be very afraid to use it.
>
> http://www.activestate.com/
>
> Martien
> --
> Martien Verbruggen              |
> Interactive Media Division      | Freudian slip: when you say one thing
> Commercial Dynamics Pty. Ltd.   | but mean your mother.
> NSW, Australia                  |




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

Date: Thu, 26 Oct 2000 14:06:23 +0200
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: Perl on NT
Message-Id: <39F81E3F.A50F7F70@fujitsu-siemens.com>

Daniel van den Oord wrote:
> =

> LOL haha a microsoft Perl Version OMG.. that's just like www.mslinux.or=
g
> Sorry just made me smile when I read it !!!

> > Alex Fitterling <fe8x025@public.uni-hamburg.de> wrote:
> > > Hello.
> > >
> > > Is Perl in NT (4.0) integrated, or has it to be installed additiona=
lly
> > > ?

Why not, afaic, MS should be forced to integrate everything, from Office
Suite to Browser, Perl, tcl, tk, compilers, interpreters, database
programs, games, image manipulations to name but a very few, into
Windows. Let 'em make it a BEAST that requires at least a gigabyte of
main memory to come up before it falls over due to its complexity. Since
that's what they want, perhaps we'll finally get rid of them.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize (T.  Pratchett)


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

Date: Thu, 26 Oct 2000 14:48:34 +0200
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: problems to install perl module
Message-Id: <39F82822.446B373A@bigfoot.com>

Bo Pan wrote:
> 
> It won't. I tried and got error message of unkown flags and flag
> combination.

In order for Perl to dynamically link in C-code (which is what
XML::Parser needs to do) it must be compiled with a compatible compiler.

My experience is that cc and gcc is not compatible on the SGI platform. 
You most likely got a prebuilt Perl binary.  I would suggest ditching it
and building your own (or just leave it and put your own in /usr/local).

A bit of trouble now - will help you next time you need to build weird
libraries.

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


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

Date: 26 Oct 2000 10:08:10 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Regular expression help
Message-Id: <8t8vqa$67l$1@lublin.zrz.tu-berlin.de>

Godzilla! <godzilla@stomp.stomp.tokyo> wrote in comp.lang.perl.misc:

>zero divided by zero yields a cardinal number set of nth to the
>nth degree length, a mathematical reference to a place where 
>parallel lines meet, of course.

Oh dear.  And you were doing so well.

Anno


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

Date: Thu, 26 Oct 2000 11:59:15 GMT
From: djoerg@my-deja.com
Subject: Starting background process from Perl
Message-Id: <8t96ag$9d4$1@nnrp1.deja.com>

Hi,

I want to start a new process from a perl script, but the script always
waits until the process is complete (the new process takes very long to
complete and the webserver should get back a message from the script).
Is there any way to launch the process so that perl doesn't wait for the
child to complete?

Cheers
David


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


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

Date: Thu, 26 Oct 2000 23:40:08 +1000
From: "Andrew Gilmour" <arg@interact.net.au>
Subject: Re: Syntax Problem for Newbie
Message-Id: <3AVJ5.33$E12.1379432@news.interact.net.au>


#!

# My Base Script Page
#


&parse_form;

 # Get variables from form (change as needed)

 $action = $FORM{'action'};

# Begin Script Here
If
print "Content-type: text/html\n\n";
print "<html>\n"

print "<head>\n";
print "<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=windows-1252\">\n";
print "<meta name=\"VI60_defaultClientScript\" content=\"JavaScript\">\n";
print "<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 4.0\">\n";
print "<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">\n";
print "<title>$FORM('page')</title>\n";
print "<!--mstheme--><link rel=\"stylesheet\" type=\"text/css\"
href=\"_themes/loosegst/loos1001.css\"><meta name=\"Microsoft Theme\"
content=\"loosegst 1001, default\">\n";
print "</head>\n";

print "<body>\n";

print "<p align=\"center\"><!--webbot bot=\"Navigation\"
s-type=\"banner\"\n";
print "s-rendering=\"graphics\" s-orientation b-include-home b-include-up
u-page s-target startspan\n";
print "--><img src=\"_derived/Index.html_cmp_loosegst000_bnr.gif\"
width=\"600\" height=\"60\" border=\"0\" alt=\"Welcome to Eroding
Evolution\"><!--webbot bot=\"Navigation\" endspan i-checksum=\"24363\"\n";
print "--></p>\n";
print "<div align=\"left\">\n";
print "  <table border=\"0\" width=\"520\" height=\"100%\">\n";
print "    <tr>\n";
print "      <td width=\"162\" height=\"302\" valign=\"top\"><!--webbot
bot=\"Navigation\"\n";
print "        s-type=\"children\" s-orientation=\"vertical\"
s-rendering=\"graphics\"\n";
print "        b-include-home=\"FALSE\" b-include-up=\"FALSE\" u-page
s-target startspan --><a
href=\"BaseScript.cgi?page=What+is+Evolution,really?\"><img
src=\"_derived/ErodingArticles.htm_cmp_loosegst000_vbtn.gif\" width=\"140\"
height=\"40\" border=\"0\" alt=\"What is Evolution, really?\"></a><br><a
href=\"BaseScript.cgi?page=Communi-K\"><img
src=\"_derived/communiK.htm_cmp_loosegst000_vbtn.gif\" width=\"140\"
height=\"40\" border=\"0\" alt=\"Communi-K\"></a><br><a
href=\"BaseScript.cgi?page=About the Eroding Evolution website\"><img
src=\"_derived/about_this_site.htm_cmp_loosegst000_vbtn.gif\" width=\"140\"
height=\"40\" border=\"0\" alt=\"About this site\"></a><!--webbot
bot=\"Navigation\" endspan i-checksum=\"48404\" --></td>\n";
print "      <td width=\"344\" height=\"302\">/n"
$OpenPage=len($FORM('page'),4)+".txt"
ReadHTMLFile($OpenPage)
If (@file=""){;
print "Error: Internal Server Error.  Cannot Find file $OpenPage.  Needed
for CGI script \'BaseScript.cgi\'\n";
print "Please Email <a
href=\"mailto:agsite\@hotmail.com\">agsite\@hotmail.com</a> with \'CGI
Script Error\' as subject. /n";
}
else {
print "@file \n"
print "</td>\n";
print "    </tr>\n";
print "  </table>\n";
print "</div>\n";

print "</body>\n";

print "</html>\n";
}






# End Script Here

sub parse_form {

   read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
   if (length($buffer) < 5) {
         $buffer = $ENV{QUERY_STRING};
    }

  @pairs = split(/&/, $buffer);
   foreach $pair (@pairs) {
      ($name, $value) = split(/=/, $pair);

      $value =~ tr/+/ /;
      $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

      $FORM{$name} = $value;
   }
} #end parse_form

sub  ReadHTMLFile($filename) {

 @file=""
 #Check If the file exists first
 if (-e "$filename") {

  # Open and read file contents
  open (FILE,"$filename");
  @file = <FILE>;
  close (FILE);
    }


  } # End Read File
    #File contents is @file
# Template generated from TNL Total Solutions' Perl Scripting Tool
# http://tnl.tech-host.com






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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 4730
**************************************


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