[8164] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1782 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 1 13:11:22 1998

Date: Sun, 1 Feb 98 10:00:30 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 1 Feb 1998     Volume: 8 Number: 1782

Today's topics:
        ANNOUNCE: YAWP 0.01 maurice@hevanet.com
    Re: boston.pm.org (Chris Nandor)
    Re: can variables be generated on the fly <tchrist@mox.perl.com>
    Re: cgi file saving problem... <sbekman@iil.intel.com>
        data format <jahnel@xarch.tu-graz.ac.at>
    Re: data format (Mike Stok)
    Re: data format (Honza Pazdziora)
        don't kill me, but <mikael@inmedia.com>
    Re: don't kill me, but (Gabor)
    Re: don't kill me, but (I R A Aggie)
        How to use Mail in Perl ? /$wl007$/ wim.lambrechts@NoSPAM-2206.usa.net
        How to use Mail in Perl ? /$wl007$/ wim.lambrechts@NoSPAM-2206.usa.net
    Re: How to use Mail in Perl ? /$wl007$/ (I R A Aggie)
    Re: How to use Mail in Perl ? edlund@smileyface.com
    Re: Please help! (Michael Budash)
    Re: PRINT (Michael Rubenstein)
    Re: PRINT (Martin Vorlaender)
    Re: print<< into variable? (Tony L. Svanstrom)
    Re: Public Response to Private Flame (albeit machine-ge (I R A Aggie)
    Re: Public Response to Private Flame (albeit machine-ge (Steve Linberg)
        Puplic Response to Public Flame (Was: Public Response t (Martin Vorlaender)
        Recommendation for "howto" PERL DBI sql programming sou (John Armsby)
        recursive regex? <mwrostron@imation.com>
    Re: recursive regex? (Abigail)
    Re: Some possible bugs shaker@netusa1.net
        tie/untie problem with GDBM, perl bug? Gerben_Wierda@RnA.nl
    Re: Trouble getting to run from web page <jrj120@psu.edu>
    Re: under what shell system(...) runs the unix command? (Hasan Diwan)
    Re: Win32 Venting & The Answer (was Re: Win32: Any scri (Marc Haber)
    Re: Win32 Venting & The Answer (was Re: Win32: Any scri (Troy Denkinger)
    Re: Win32: Any scripts to shut down all services? (Jim Michael)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sun, 01 Feb 1998 01:51:54 -0600
From: maurice@hevanet.com
Subject: ANNOUNCE: YAWP 0.01
Message-Id: <886319374.855441420@dejanews.com>

YAWP 0.01 (Yet Another Web Pre-processor)

  This module is an HTML pre-processor for use within CGI scripts.
  It accepts specially written HTML documents, transforms them, and
  then displays the resulting HTML.  This helps to separate the
  code from the display information, and often makes web sites more
  maintainable, flexible, and pretty.

  YAWP recognizes special, proprietary tags within your HTML
  documents which, when processed by this module, allow variable
  interpolation and encoding, flow-control, inclusion of other
  documents, and the execution of Perl code.

Please see the POD for details.  Comments, suggestions, and criticisms
may be directed to <maurice@hevanet.com>.

The module may be obtained at:

  http://olympia2.adhost.com/~maurice/YAWP-0.01.tar.gz

Maurice Aubrey <maurice@hevanet.com>

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Sun, 01 Feb 1998 09:14:36 -0500
From: pudge@pobox.com (Chris Nandor)
Subject: Re: boston.pm.org
Message-Id: <pudge-0102980914380001@ppp-5.ts-1.kin.idt.net>

Alright, we have a mailing list up.  I did not auto-subscribe anyone who
has replied to me, so if you want on the list, follow the instructions
below.  Thanks to NY.pm and brian d foy again ... especially for the
stolen material from their module.

#!/usr/bin/perl -wT
use strict;
package Boston;
sub new { my $c=shift; my $s={}; bless $s; return $s }
sub motto { return "just another Boston perl hacker" }
sub hockey {
  return "the Boston Bruins beat up on the NY Rangers yesterday :)"
}
sub pod {
  return (<DATA>);
}
1;

__DATA__

=head1 NAME

boston-pm@twinlights.org - the Boston Perl M* mailing list.

=head1 SYNOPSIS

    Subscribing:
        To: majordomo@twinlights.org
        From: you
        Subject: (anything you like)

        subscribe boston-pm

    Posting
        To: boston-pm@twinlights.org
        From: you
        Subject: (something descriptive)

        > their message here

        your message here

    Unsubscribing
        To: majordomo@twinlights.org
        From: you
        Subject: (anything you like)

        unsubscribe boston-pm

=head1 DESCRIPTION

Welcome to boston-pm, the mailing list for Boston.pm, or
/Boston Perl M((o|u)ngers|aniacs)*/, following in the footsteps
of NY.pm (http://ny.pm.org/).  This info file and everything
about the group and list is unabashedly stolen from them.

We will be having events (re: dinner) and maybe even do some
other cool stuff.  And maybe not.  It is all up to you.  This
list is for discussion of any and all of what may or may not be
related to Perl, for the purpose of Boston Perl programmers to
get to know each other and to establish and foster a community
in the Boston area.

=head1 THE Boston.pm MODULE

    #!/usr/bin/perl -wl
    use Boston;
    my $data = new Boston;
    print $data->motto();

=head1 LIST MOM

Chris Nandor <pudge@pobox.com>

=head1 AUTHOR

Original material stolen from brian d foy <comdog@computerdog.com>

=head1 DATE

Last modified Sun, Sunday, February 1, 1998


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

Date: 1 Feb 1998 04:41:29 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: can variables be generated on the fly
Message-Id: <6b0udp$8ik$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Zenin <zenin@best.com> writes: :: Can a varibale be generated - this syntax is not correct but shows idea I'm on about:
:	$a = "var1";
:	${$a} = "value of generated variable";

Once more: 

    +--------------------------------------+
    | that * only * works * for * globals  |
    +--------------------------------------+

On the other hand:

    my $x = 30;			# create local var
    $soft_ref = 'x';  		# capture name (of global var)
    $hard_ref = \$x; 		# capture reference (of local var)
    $$soft_ref++;		# fails: affects global
    $$hard_ref++;		# works: affects local
    eval "\$$soft_ref++";	# also works: affect local (YANETUT)

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    X-Windows: It was hard to write; it should be hard to use.
	--Jamie Zawinski


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

Date: Sun, 01 Feb 1998 09:53:26 +0200
From: Bekman Stanislav <sbekman@iil.intel.com>
To: Quasimodo <mahubbar@mail.vt.edu>
Subject: Re: cgi file saving problem...
Message-Id: <34D429F6.794B@iil.intel.com>

Quasimodo wrote:
> 
> I'm very new to Perl, and to CGI in general, but I wrote a little
> script that takes the data from a form, parses it, and is then
> supposed to give it HTML headers and save it to an html file.  I can
> view the $string outputted, and it all works correctly, but it spits
> out errors when it gets to the file saving part.
> 
> Here's the code that is supposed to name and write the file:
> #---------
> $unique = charname;
> $char_file =
> "http://www.geeksusa.com/mahubbar/characters/".$unique.".html";
> 
> open (DUMMY, ">$char_file");
> print DUMMY $message;
> close (DUMMY);
> 
> unlink($char_file);
> #--------
> 
> This is mostly gleened from examples, so I'm probibly completely off
> the mark here... anyway, please let me let me know what I'm doing
> wrong :)

First the group for CGI stuff is called
comp.infosystems.www.authoring.cgi

Second, you can't save to URL!!!
It must be a file on your local filesystem

Third, consider using CGI.pm it will do all the job for you (including
saving to a file)

Hope this helps


______________________________________________________________________
Stas Bekman     mailto:sbekman@iil.intel.com [just another webmaster]
Home Page:      http://www.eprotect.com/stas
A must visit: 	http://www.eprotect.com/stas/TULARC (Java,CGI,PC,Linux)
Linux-il Home:  http://www.linux.org.il/


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

Date: Sun, 01 Feb 1998 17:36:28 +0100
From: Jahnel Klaus <jahnel@xarch.tu-graz.ac.at>
Subject: data format
Message-Id: <34D4A48C.6690AE23@xarch.tu-graz.ac.at>

how can i make an output of a simple calcuation like this:
this is the calculation:
100/3=
the result is 33.33333333333
i want to have the result like this
33.333
so 3 numbers after the "."
Tia Klaus
(sorrx for the english to state this problem)




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

Date: 1 Feb 1998 12:05:10 -0500
From: mike@stok.co.uk (Mike Stok)
Subject: Re: data format
Message-Id: <6b2a06$1ae$1@stok.co.uk>

In article <34D4A48C.6690AE23@xarch.tu-graz.ac.at>,
Jahnel Klaus  <jahnel@xarch.tu-graz.ac.at> wrote:
>how can i make an output of a simple calcuation like this:
>this is the calculation:
>100/3=
>the result is 33.33333333333
>i want to have the result like this
>33.333
>so 3 numbers after the "."

You can use

  $formatted = sprintf '%.3f', $result;

which uses perl's implementation of the sprintf library function from the
C library.  

This is described more fully in section 4 of the faq - if you have a
recent perl installation then

  perldoc perlfaq4

should get it, otherwise browsing http://www.perl.com/ and checking out
the documentation there might save you some time in the future.

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: Sun, 1 Feb 1998 17:07:10 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: data format
Message-Id: <adelton.886352830@aisa.fi.muni.cz>

Jahnel Klaus <jahnel@xarch.tu-graz.ac.at> writes:

> how can i make an output of a simple calcuation like this:
> this is the calculation:
> 100/3=
> the result is 33.33333333333
> i want to have the result like this
> 33.333
> so 3 numbers after the "."

Please check the perlfaq4 man page that comes with your Perl package,
especially the first paragraph named

	Why am I getting long decimals (eg, 19.9499999999999)
	instead of the numbers I should be getting (eg, 19.95)?

Hope this helps,

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Sun, 1 Feb 1998 03:02:06 -0600
From: "michael a. martinez" <mikael@inmedia.com>
Subject: don't kill me, but
Message-Id: <6b1e1f$lj3$1@news.onramp.net>

I'm trying, I'm reading, I'm doing the work... I'm not slacking and trying
to get off easy. I promise who ever reads this.  I just picked up Learning
Perl from O' Reilly, because I'm told it's the best.  If it is anything like
the other O'Reillys' I believe it...  O'Reilly rules,

Anyway, I've written a simple "hello world" ".pl" file, O'Reilly assumes as
it should that I know enough Unix to execute this file, but I have not
reached that level yet....

If anyone can help me, I would be so thankful.






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

Date: 1 Feb 1998 16:05:12 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: don't kill me, but
Message-Id: <slrn6d9720.jh1.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, michael a. martinez <mikael@inmedia.com> wrote :
# I'm trying, I'm reading, I'm doing the work... I'm not slacking and trying
# to get off easy. I promise who ever reads this.  I just picked up Learning
# Perl from O' Reilly, because I'm told it's the best.  If it is anything like
# the other O'Reillys' I believe it...  O'Reilly rules,
# 
# Anyway, I've written a simple "hello world" ".pl" file, O'Reilly assumes as
# it should that I know enough Unix to execute this file, but I have not
# reached that level yet....
# 
# If anyone can help me, I would be so thankful.

you have two choices
1.  use the 'shebang line'
    it looks something like this, depending where the perl binary is
    #!/usr/local/bin/perl
2.  just use perl to execute it
    perl script.pl
    assuming that the perl binary is in your PATH

gabor.
--
    Even if you aren't in doubt, consider the mental welfare of the person who
    has to maintain the code after you, and who will probably put parens in
    the wrong place.
        -- Larry Wall in the perl man page 


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

Date: Sun, 01 Feb 1998 11:57:44 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: don't kill me, but
Message-Id: <fl_aggie-0102981157440001@aggie.coaps.fsu.edu>

In article <6b1e1f$lj3$1@news.onramp.net>, "michael a. martinez"
<mikael@inmedia.com> wrote:

[posted && cc'd]

+ Anyway, I've written a simple "hello world" ".pl" file, O'Reilly assumes as
+ it should that I know enough Unix to execute this file, but I have not
+ reached that level yet....

_Unix in a Nutshell_, Another Fine O'Reilly Publication (AFORP).

+ If anyone can help me, I would be so thankful.

In the mean time...if your file is called 'hello.pl', then try this:

unix_prompt> chmod u+x hello.pl
unix_prompt> hello.pl

That presumes that the #!/path/to/perl reflects your reality. If it doesn't,
you should get a 'command not found' error. Alternatively:

unix_prompt> perl hello.pl

should give you satisfaction, too.

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 1 Feb 1998 10:49:26 GMT
From: wim.lambrechts@NoSPAM-2206.usa.net
Subject: How to use Mail in Perl ? /$wl007$/
Message-Id: <6b1jvm$47c$1@orthanc.reference.com>

Hi,

I'm pretty new to Perl, but I would like to use this language to put a script on the 
free.prohosting.com-server (uses Perl 5 in #!/usr/bin/perl).
I would like to make a simple program to send me some E-mail when someone hits http://free.prohosting.com/~wim/cgi-bin/test.pl in his/her browser

#!/usr/bin/perl
use Mail::Send;
$msg->to("wim.lambrechts@no-spam.usa.net");
$msg->subject("just for testing");
$msg->close();

The free.prohosting.com-server also allows to use a POP-mail account. Anyone any idea what's causing the server to respond  'Internel server error' when  launch the script from my browser ? Maybe the module 'Mail'  (if so: how do I detect whether I can uses the module or not  ?)
Or does anyone have experience with the free.prohosting.com-service ?

Thanks in advance !
Sincere greetings,

Wim Lambrechts


  -------------------------------------------------------------------- 
  Posted using Reference.COM                  http://WWW.Reference.COM 
  FREE Usenet and Mailing list archive, directory and clipping service 
  -------------------------------------------------------------------- 


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

Date: 1 Feb 1998 10:51:41 GMT
From: wim.lambrechts@NoSPAM-2206.usa.net
Subject: How to use Mail in Perl ? /$wl007$/
Message-Id: <6b1k3t$47m$1@orthanc.reference.com>

Hi,

I'm pretty new to Perl, but I would like to use this language to put a script on the 
free.prohosting.com-server (uses Perl 5 in #!/usr/bin/perl).
I would like to make a simple program to send me some E-mail when someone hits http://free.prohosting.com/~wim/cgi-bin/test.pl in his/her browser

#!/usr/bin/perl
use Mail::Send;
$msg->to("wim.lambrechts@no-spam.usa.net");
$msg->subject("just for testing");
$msg->close();

The free.prohosting.com-server also allows to use a POP-mail account. Anyone any idea what's causing the server to respond  'Internel server error' when  launch the script from my browser ? Maybe the module 'Mail'  (if so: how do I detect whether I can uses the module or not  ?)
Or does anyone have experience with the free.prohosting.com-service ?

Thanks in advance !
Sincere greetings,

Wim Lambrechts


  -------------------------------------------------------------------- 
  Posted using Reference.COM                  http://WWW.Reference.COM 
  FREE Usenet and Mailing list archive, directory and clipping service 
  -------------------------------------------------------------------- 


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

Date: Sun, 01 Feb 1998 12:03:36 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: How to use Mail in Perl ? /$wl007$/
Message-Id: <fl_aggie-0102981203370001@aggie.coaps.fsu.edu>

In article <6b1k3t$47m$1@orthanc.reference.com>,
wim.lambrechts@NoSPAM-2206.usa.net wrote:

+ The free.prohosting.com-server also allows to use a POP-mail account.
Anyone any idea what's causing the server to respond  'Internel server
error' when  launch the script from my browser ? Maybe the module 'Mail' 
(if so: how do I detect whether I can uses the module or not  ?)
+ 

AAAAARRRRRRRRRGGGGGGGHHHHHH...don't take this personally, but your line
wrapping sux rox.

Anyway, have you tried to invoke the perl syntax checker?

perl -c _script_name_

will tell if it is syntactically correct perl. This should be done on
the system the script is to be run on. It will tell you if the Mail
module is available.

You should also try to take a look at the WWW server's error log. I don't
know if you can do that, tho...

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 1 Feb 1998 12:20:49 GMT
From: edlund@smileyface.com
Subject: Re: How to use Mail in Perl ?
Message-Id: <6b1pb1$ffr$1@news.capgemini.se>


When you have a true cgi-bin URL like that you have to spit something back to the client requesting the script. Like

print "Content-type: text/plain\n\n";
print "yepps, email sent\n";

or whatever. If you don't, the server will think something went wrong inside the server and spit out that 'Internal Server error' message.

//peter.

>The free.prohosting.com-server also allows to use a POP-mail account. Anyone any idea
> what's causing the server to respond  'Internel server error' when  launch the scrip
>t from my browser ? Maybe the module 'Mail'  (if so: how do I detect whether I can us
>es the module or not  ?)
>
>Sincere greetings,
>
>Wim Lambrechts
>
>
>  --------------------------------------------------------------------
>  Posted using Reference.COM                  http://WWW.Reference.COM
>  FREE Usenet and Mailing list archive, directory and clipping service
>  --------------------------------------------------------------------
-- 
-------------------------
Peter Edlund
UNIX development engineer
Cap Gemini
peter.edlund@capgemini.se


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

Date: Sun, 01 Feb 1998 00:25:05 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: Please help!
Message-Id: <mbudash-0102980025060001@d38.pm.sonic.net>

In article <34D21227.53D6@cubik.com>, Andrew Chandler <andrew@cubik.com> wrote:

>> I'm working on an NT server.  I'm running a script that calculates
>> a 25% discount, and the value invariably contains more than 2 decimal
>> places--how can I round this number to 2 decimals, or is there a library
>> I can use?  Thanks!!

check out perl's sprintf (and printf) functions

-- 
Michael Budash, Owner * Michael Budash Consulting
mbudash@sonic.net * http://www.sonic.net/~mbudash
707-255-5371 * 707-258-7800 x7736


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

Date: Sun, 01 Feb 1998 15:16:43 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: PRINT
Message-Id: <34da9157.56542543@nntp.ix.netcom.com>

On Sat, 31 Jan 1998 00:22:13 +0800, Walter Archie <warchie@att.net.hk>
wrote:

>How do you do a print statement so that it does think your trying to
>print a variable instead of the variable text. Like so:
>
>e.g.
>
>$status="Test"
>print "$status = $status"
>         ^^^^^^
>I want the output to be:
>$status = Test

One way is

	print "\$status = $status";

There are many other ways.
--
Michael M Rubenstein


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

Date: Sun, 01 Feb 1998 11:38:00 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: PRINT
Message-Id: <34d45088.524144494f47414741@radiogaga.harz.de>

Walter Archie (warchie@att.net.hk) wrote:

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

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

Please configure your newsreader not to spit out MIME type messages (and
especially not text/html MIME messages). UseNet is a text forum.

: How do you do a print statement so that it does think your trying to
: print a variable instead of the variable text. Like so:

: e.g.

: $status="Test"
: print "$status = $status"
:          ^^^^^^
: I want the output to be:
: $status = Test

1. Quote the text you don't want to be interpolated using single
   instead of double quotes, and concatenate:

     print '$status = '.$status;

2. Escape the $:

     print "\$status = $status";


Hope it helps,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: Sun, 1 Feb 1998 14:03:34 +0100
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: print<< into variable?
Message-Id: <1d3mcw5.1uqtkgxtvt8uzN@du167-253.ppp.algonet.se>

Tom Phoenix <rootbeer@teleport.com> wrote:

> Is that somehow better than using the append operator?
> 
>     $text .= $newtext;
> 
> This is certainly easier to type. :-)  Hope this helps!


Thanx to all those trying to help me; since you can't "print" to a
variable the "append operator" was what I was looking for.


     /Tony
-- 
                               /\___/\ 
                               \_@ @_/ 
        ---------------------oOO-(_)-OOo----------------------
           "We only live to please those we love" -- Aphrael
        ----------------------ttt---ttt-----------------------
          http://tls.base.org \O/   \O/ )Tony Svanstrom 1997


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

Date: Sun, 01 Feb 1998 11:53:07 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Public Response to Private Flame (albeit machine-generated)
Message-Id: <fl_aggie-0102981153070001@aggie.coaps.fsu.edu>

In article <34D3FC01.3F2@earthling.net>, lovegod@earthling.net wrote:

+ Before I go rage on this "tchrist" guy (what does "tchrist" stand for,
+ after all, "The Christ??" who in The World does this guy think he is?

I suspect he thinks he's "Tom Christiansen".

+ The OWNER of Perl? The owner of the NG? Did he check with Larry?

Nope. Nope. Nope -- but he's pretty high up on the perl totem, and I
suspect there are times when Larry checks with him... :)

+ I think probably not)

That's pretty obvious...

+ I thought I should quote the ACTUAL responses I've
+ received from this character, in response to what I thought were
+ well-thought-out posts, doing my best to keep to the conventions and
+ etiquette of the NewsGroup:

You realize its against netiquette to repost email?

+ It looks like you've been hoodwinked into using a newsreader that wraps
+ lines for you incorrectly.

And its true, Rich. I do notice that you've _fixed_ the line wrapping,
at least in this rant.

+ Apparently, this "TheChrist" guy is so High-and_f????ing_Mighty
+ that he has MACHINES flame us because he can't spare the time from
+ his gatesian-nine-thousand-dollares an hour job to answer our 
+ questions

I don't make that much an hour, but I do get enough mail that I run
it thru a filter (mailagent, if you must know). I can only imagine the
amount of mail that Tom (or Randal or Chip or Any of the Other Perl Wizards
that post publicly) gets.

+ I submit that those kind of people are contrary to the spirit in which
+ perl was offered to the world: It was developed by people that believe
+ that perl was meant to be a language that should be freely distributed.

I submit that people like you would be perl's undoing, if you could.
Fortunately, you can't. The key word, Mr. Grise, is "freely". As such,
no one is under _any_ obligation to answer any question -- and along with
that, no one, including you, has any right to _demand_ satisfaction.

+ So, if your application makes money, cool. But it's really arrogant and
+ among those of us who are:
+ A) in the trenches doing the actual work

I bet Tom's glad he got promoted out of the trenches!!

+ B) still out here hanging on to our connection to the world

In your case, rather tenously.

+ that's such an arrogant attitude that You, Mr. The Christ, probably
+ never deserved to have perl bestowed upon you in the first place!

At this point, I'm reminded of _Indian Jones and The Last Crusade_:
*slap* that's for blasphemy.

+ By The Way, did you ever check with Larry about your arrogation of 
+ perl itself?

Why should Larry care? he gave Perl under a free license to any who would 
use it. Microslug is even distributing perl these days...

+ Did you write the etiquette/protocol for Usenet?

Nope. Thousands upon thousands of users who where around well before you
found Usenet are the ones that came up with netiquette. Most of us try
to abide by it, since it helps things get along.

+ Rich again.

Nah, more like "poorer, again"...Followups...

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: Sun, 01 Feb 1998 12:48:42 -0500
From: see-below@crocker.com (Steve Linberg)
Subject: Re: Public Response to Private Flame (albeit machine-generated)
Message-Id: <see-below-0102981248420001@pri03-024.oldcity.dca.net>

In article <34D3FC01.3F2@earthling.net>, lovegod@earthling.net wrote:

<self-indulgent tripe snipped with gusto>

I have never seen a post more deserving to be char-broiled.  Can you
read?  Did you read this paragraph of Tom's, at the end of his email?

> If you can think of any way to make this message more helpful, please
> let me know.  I apologize in advance if this message comes off sounding
> unkind to you; it wasn't meant to be.  I'm honestly just trying to help
> to make the Net a better place for all of us.

Dope slap for you, sir.  You have now been informed by others who
"tchrist" is, and we'll let that dust settle.  If you want to know who
someone is in the future, go to deja news and do a little research.  Your
profile there is interesting.  Seems that under your current name, you
have been around in this group for all of three weeks.  Remember that all
of your flames and rants are etched there for all the world to see.  Try
taking a deep breath and being a little more humble.

Is that the sound of bulging killfiles I hear?  Mine sure is.  Followups
to the usual place.

-- 
slinberg@        com
         crocker.

Try that one, spambots!


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

Date: Sun, 01 Feb 1998 12:00:37 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Puplic Response to Public Flame (Was: Public Response to Private Flame (albeit machine-generated))
Message-Id: <34d455d5.524144494f47414741@radiogaga.harz.de>

Before I even try to write an answer to this crap:
Tom, keep your auto-scripts running!

Rich Grise (lovegod@earthling.net) wrote:
: Before I go rage on this "tchrist" guy (what does "tchrist" stand for,
: after all, "The Christ??"

How about a 7-letter abbreviation of "Tom Christiansen"?

: who in The World does this guy think he is?
: The OWNER of Perl? The owner of the NG? Did he check with Larry? I think
: probably not)

Tom Christiansen is one of the authors of "Programming Perl" (_the_ Perl
standard [just in case you never heard of it] - the other two being
Larry Wall and Randal L. Schwartz) and author of numerous texts about Perl.
And I find his work for Perl very valuable and his numerous posts to clpm
very helpful, thank you.

: I thought I should quote the ACTUAL responses I've
: received from this character, in response to what I thought were
: well-thought-out posts, doing my best to keep to the conventions and
: etiquette of the NewsGroup:

I think I won't quote any more of this not-well-thought-out, non-keeping-
netiquette post.

I find it embarrasing that newsreaders (especially PC ones) won't
do the simple task of inserting a newline character into a message
after at most 76 columns (even if they do make the user believe so).
I regard anyone arrogant who rages upon a message trying to be helpful
as to the formatting of his posts. If you have such a badly broken newsreader,
it's your task to insert the newlines manually (or get a decent one).
And if you want to flame someone: start with Mr. William H. Gates III.

Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: Sun, 01 Feb 1998 03:09:53 GMT
From: jaws@atl.mindspring.com (John Armsby)
Subject: Recommendation for "howto" PERL DBI sql programming sources
Message-Id: <6b23f9$ov1@camel21.mindspring.com>

I have installed postgresql and DBI/DBD on a slackware 2.0.27 Linux
box.  I have the Linux Database Book.  I can perform simple queries.
I am now ready for big time.  The DBI/DBD FAQ as well as the test.pl
script give me an indication of the perl syntax to get data in and out
of a database.

Is there a more complete source of perl examples to implement DBI?

Thanks,

john
john.w.armsby-jr@boeing.com



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

Date: Sun, 1 Feb 1998 06:01:01 -0600
From: "Mark Rostron" <mwrostron@imation.com>
Subject: recursive regex?
Message-Id: <6b1o86$mt61@zinc.imation.com>

hi,
am writing a parser and would like to use regex to easily decode nested
funcion calls - any ideas?




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

Date: 1 Feb 1998 12:31:44 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: recursive regex?
Message-Id: <6b1pvg$cpc$1@client2.news.psi.net>

Mark Rostron (mwrostron@imation.com) wrote on 1615 September 1993 in
<URL: news:6b1o86$mt61@zinc.imation.com>:
++ hi,
++ am writing a parser and would like to use regex to easily decode nested
++ funcion calls - any ideas?

That can't be done with a single regex (well, at least not with the
current perl). You need a tokenizer and a state machine.


Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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

Date: Sun, 01 Feb 1998 11:22:39 -0600
From: shaker@netusa1.net
Subject: Re: Some possible bugs
Message-Id: <886353443.1784217609@dejanews.com>

In article <6at179$fvf@panix.com>,
  clay@panix.com (Clay Irving) wrote:
>
>
> ...and there are no plans to make it Y2K compliant. :)
>

(1) Another set of magic words seem to be 'this will get us CMM Level 'n'
certification', to get doors opened miraculously.

(2) A few years ago (in another town, in another project), I wanted to
use perl but gave up rather than fight the 'it is not a commercial
software' battle. It may not have been much of a battle, either. I
brought it up in a couple of meetings. When it was not readily accepted,
I went on to code in 'c'. The project involved converting data in a 4 gig
Ingres database to an Ingres database of a different structure. Knowing
what I know now, Perl would have worked out very well. [Story of my life
too :-) I have only had one business idea that I considered seriously -
around 1988 or so, I was wondering whether I could make a living somehow
involving the Internet, providing a service - my brother talked me out of
it. :-) :-) ]

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Sun, 1 Feb 1998 16:14:56 GMT
From: Gerben_Wierda@RnA.nl
Subject: tie/untie problem with GDBM, perl bug?
Message-Id: <EnpJsw.HGL@RnA.NL>

I am using perl 5.00404. I have a server program that on receiving a signal 
re-reads a gdbm file. This signal is sent by another program as soon as this 
gdbm file has changed. I have a problem, though. The server program's tie 
fails, because it 'the operation would block'. But I have untied in the other 
program, so this condition should not happen. And indeed, if I put a couple 
of seconds of sleep between the untie and the sending of the signal, I don't 
have the problem. This suggests that perl actually does not close the file 
until some time after I have untied. The error message comes from gdbm. Here 
is the code, the first snippet from the program that sends the signal, the 
second from the server.
===============================================================
my %activedb;
my $dbref;
if ($dbref = tie %activedb, 'GDBM_File', $ACTIVEDB_NAME, &GDBM_WRCREAT, 0600) 
{
    # Actions on db file removed from this snippet.

    $dbref->reorganize();
    $dbref = undef;
    untie %activedb;
    sleep 5;    # Without it, the server complains about block on db
    &signal_pidfileprocs( 'ALRM');
}
else {
    die "Cannot write to $ACTIVEDB_NAME: $!\n";
}
===============================================================
    # Copy Active DB file to in-memory store
    undef %activedb;
    my %tmpactivedb;
    # This tie fails sometimes:
    if (tie %tmpactivedb, 'GDBM_File', $ACTIVEDB_NAME, &GDBM_READER, 0600) {
        %activedb = %tmpactivedb;
        untie %tmpactivedb;
    }
    else {
        &gordlog( 'warning', "Cannot open $ACTIVEDB_NAME: $!\n");
===============================================================

Any idea what is going on here?

-- 
Gerben_Wierda@RnA.nl (Gerben Wierda)
"If you don't know where you're going, any road will take you there"
Paraphrased in Alice in Wonderland, originally from the Talmud.

Dass man fuer die Philosophie ein Interesse zeigt, bezeugt noch keine
Bereitschaft zum Denken -- Martin Heidegger


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

Date: Fri, 30 Jan 1998 22:09:27 +0000
From: James Juran <jrj120@psu.edu>
To: george@asia-net.com
Subject: Re: Trouble getting to run from web page
Message-Id: <34D24F97.78B0DAC0@psu.edu>

[posted & mailed]

george wrote:

> I am a Perl rookie to say the least.  I am writing a CGI that simply
> takes some data from the user of a web page and adds it to a list.  I am
> using Perl5 for this program.  I can run everything perfectly from the
> command line ... it does exactly what I want.  But when I try to run it
> from the web page where the data is taken, I get this error...
[Server Error]
> 
> 1. I checked my permissions and groups and owners ... they are all
> fine.  It has the same permissions as other CGI's running from the same
> directory.
> 2.  I CAN run the following script from the web page :
> 
> #!/usr/local/bin/perl5

You should always use the -w switch (i.e, #!/usr/local/bin/perl5 -w). 
This will provide helpful warning messages.

> print "Content-type: text/html\n\n";

CGI.pm privides helpful functions to make sure you do the header
correctly.  You should change the above line to:

print header(), start_html(); #This will print the header and the
<HEAD></HEAD></BODY>.

> 3. BUT I cannot run the following program from the web page (but from
> the command line it works OK):
> 
> #!/usr/local/bin/perl5
> use CGI;
> print "Content-type: text/html\n\n";
> my $in = new CGI;
> print $in;
> print "hello";
> 
> 4.  I am running version 5.00307 on my machine ... but I noticed before
> I started running programs that the CGI.pm was missing ... so I ftp'd it
> from another machine to my machine.  Why will it run from the command
> line but not from the web site if the permissions and everything are OK?
> ... I am really stumped.

CGI.pm may depend on other modules to work correctly.  You shold get the
latest version of Perl (available from http://www.perl.com) and install
it.  It will contain a working version of CGI.pm, as well as lots of
helpful documentation you may not have (man perltoc will get you started
after you install it).

Also have a look at The Idiot's Guide to Solving Perl CGI Problems
(http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html).  It
will help cure many CGI problems (please don't be offended by the name).

If that doesn't fix it, there is other information available under
http://www.perl.com .

BTW, CGI questions (even if the CGI application is written in Perl) are
best asked in comp.infosystems.www.authoring.cgi.

Good luck, and please let me know how it works out.

--
James Juran
jrj120@psu.edu


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

Date: 1 Feb 1998 11:46:38 -0500
From: hdiwan@shell.clark.net (Hasan Diwan)
Subject: Re: under what shell system(...) runs the unix command?
Message-Id: <6b28te$ege@shell.clark.net>

	That depends on whatever is defined as /bin/sh on Linux and
Solaris. I think that is part of POSIX (/bin/sh), so any system that
is POSIX compliant should have it.
mwang@alhena.ibk.ml.com (Michael Wang) writes:

>under what shell system(...) runs the unix command?
>ksh or sh or the shell that starts the perl? And where 
>it is documented? Thanks.

-- 
Hsiang Huang
University of California at Berkeley
Department of Electrical Engineering/Computer Science
hasandiwan@writeme.com


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

Date: Sun, 01 Feb 1998 10:58:14 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Win32 Venting & The Answer (was Re: Win32: Any scripts to shut down all services?)
Message-Id: <6b1kgd$pfg$1@nz12.rz.uni-karlsruhe.de>

troy@whadda.com (Troy Denkinger) wrote:
>In article <6b0i68$ev4$2@nz12.rz.uni-karlsruhe.de>, 
>Marc.Haber-usenet@gmx.de (Marc Haber) wrote:
>Here's the real answer.  Read the Win32::Service module documentation 
>that comes with the Win32 5.004_2 port from Sarathy.  This will answer 
>the question at hand.

I know about the Win32::Service module. Everyone is preaching about
"re-using code", so I took the liberty of asking if that special kind
of wheel has already been invented. I am absolutely sure this is a
four-liner, but before I get to work myself I just wanted to make sure
this four-liner does not already exist.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: Sun, 01 Feb 1998 16:39:02 GMT
From: troy@whadda.com (Troy Denkinger)
Subject: Re: Win32 Venting & The Answer (was Re: Win32: Any scripts to shut down all services?)
Message-Id: <6b28td$e0i$1@nntp3.interaccess.com>

[no reply cc'ed to original poster, as requested]

In article <6b1kgd$pfg$1@nz12.rz.uni-karlsruhe.de>, 
Marc.Haber-usenet@gmx.de (Marc Haber) wrote:
>troy@whadda.com (Troy Denkinger) wrote:
>>In article <6b0i68$ev4$2@nz12.rz.uni-karlsruhe.de>, 
>>Marc.Haber-usenet@gmx.de (Marc Haber) wrote:
>>Here's the real answer.  Read the Win32::Service module documentation 
>>that comes with the Win32 5.004_2 port from Sarathy.  This will answer 
>>the question at hand.
>
>I know about the Win32::Service module. Everyone is preaching about
>"re-using code", so I took the liberty of asking if that special kind
>of wheel has already been invented. I am absolutely sure this is a
>four-liner, but before I get to work myself I just wanted to make sure
>this four-liner does not already exist.

For crying out loud, man!  Make up your mind.  Using Win32::Service 
_is_ reusing code.  So far in this thread you've been given 2 
solutions: use the module or learn to do it through the Win32 API.  
Using the module is easier, imo.  

If you know what services you want to shut down, then you can probably 
call "net stop" using system, but that's untested and it may not work 
based on the security of the target system.

There, you now have three solutions.  Go write the friggin' thing.

Regards,

Troy Denkinger


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

Date: Sun, 1 Feb 1998 13:49:13 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: Win32: Any scripts to shut down all services?
Message-Id: <genepoolEnpD21.I4M@netcom.com>

Marc Haber (Marc.Haber-usenet@gmx.de) wrote:
: I have been posting numerous questions to clpm now and have not
: received a single useable response. People either point me towards the

You can do anything you wish using the API. Look in the Windows SDK and 
find the API calls you need to make, then call them from your script. HTH.


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

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

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