[12477] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6077 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 21 13:07:21 1999

Date: Mon, 21 Jun 99 10:00:37 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 21 Jun 1999     Volume: 8 Number: 6077

Today's topics:
    Re: 'Perl core' or 'perl core'? (Bart Lateur)
    Re: CGI.pm: submit + image? (Abigail)
        Different results when a cron job (Richard Zilavec)
        Formats bernd1615@my-deja.com
    Re: How send a file using perl on a win nt box to an em <cassell@mail.cor.epa.gov>
    Re: How send a file using perl on a win nt box to an em <cassell@mail.cor.epa.gov>
    Re: how to do this in a perl program (Abigail)
    Re: How to remove space <donny@impulsesoftware.com>
        How to test if a subroutine exists? (Michael Friendly)
    Re: How to test if a subroutine exists? <tchrist@mox.perl.com>
    Re: How to test if a subroutine exists? (Andrew Allen)
    Re: How to test if a subroutine exists? <tchrist@mox.perl.com>
    Re: how to test pl scripts.? (Abigail)
    Re: Interpreting MS-ASCII - anyone have a filter? (Abigail)
    Re: Interpreting MS-ASCII - anyone have a filter? (Bart Lateur)
    Re: Interpreting MS-ASCII - anyone have a filter? (Bart Lateur)
    Re: Interpreting MS-ASCII - anyone have a filter? (Bart Lateur)
    Re: is there any perlscript for client-side scripting? (Abigail)
    Re: Language choice for high-volume Oracle CGI interfac <gregm@well.com>
    Re: Looking for 3D Array sort... (Marcel Grunauer)
    Re: matinal musings and the madrugada (Gregory Snow)
        mod_perl references <donny@impulsesoftware.com>
    Re: mod_perl references (Mads Toftum)
    Re: mod_perl references <craig@mathworks.com>
    Re: mod_perl references <tchrist@mox.perl.com>
    Re: multiple spaces and commas (Abigail)
    Re: Need help adding Perl support to NT registry please <keithmur@mindspring.com>
    Re: Newbie help on complexity management? <cassell@mail.cor.epa.gov>
    Re: Questions <cassell@mail.cor.epa.gov>
    Re: Relocation error in Socket.so <doughera@lafayette.edu>
    Re: Search script performance (Bart Lateur)
    Re: Statistics for comp.lang.perl.misc (Randal L. Schwartz)
    Re: Using ^M within backquotes possible? <burton@lucent.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 21 Jun 1999 16:42:08 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: 'Perl core' or 'perl core'?
Message-Id: <376de9d2.1437332@news.skynet.be>

Larry Rosler wrote:

>So, which should it be, 'Perl core' or 'perl core'?

Change the wording. Replace "perl core" with "binary core" and "Perl
core" with "language core". I'd say that both work.

>The default sort runs entirely in C code in the 
>binary core, but any sortsub must execute Perl code.

>The default sort runs entirely in C code in the 
>language core, but any sortsub must execute Perl code.

Urm... "binary core" works a little better.

	Bart.


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

Date: 21 Jun 1999 09:10:59 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: CGI.pm: submit + image?
Message-Id: <slrn7mshvd.k1b.abigail@alexandra.delanet.com>

Peter Bismuti (bismuti@cs.fsu.edu) wrote on MMCXX September MCMXCIII in
<URL:news:7kkd7r$838$1@news.fsu.edu>:
:: I would like to use the submit function that display an image instead of 
:: the standard button and label.  I do NOT mean an image_button, which does 
:: not allow you to pass back a value with the name, just the coordinates 
:: where you clicked on the image.  I want it to behave *exactly* like a regular
:: submit button just with an image displayed instead of the normal labeled 
:: button.  Can this be done?  If not this is a major oversite in...CGI?...CGI.p


And your Perl question is?



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 21 Jun 1999 18:10:48 GMT
From: rzilavec@tcn.net (Richard Zilavec)
Subject: Different results when a cron job
Message-Id: <376e7d19.7758368@199.166.4.3>


The following works from command line but fails from a cron job.

push(@data, `find . -name "*.dat"`, `find /usr -name "*.dat", `find
/usr2 -name "*.dat");

When I manually execute this program, the results are correct but when
its executed by cron, only the first find is returned.  Any ideas?

Richard 




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

Date: Mon, 21 Jun 1999 15:07:39 GMT
From: bernd1615@my-deja.com
Subject: Formats
Message-Id: <7klkfh$cg8$1@nnrp1.deja.com>

Dear Readers ,

I want to save the formated output of $FileName to $OutputFile.

I got a syntax error "near write" . I suppose at this point the
script is looking for some format called OLG. But how can I convince
my script to save the formated output in $OutputFile ?

open ( LOG, "$FileName" ) || die "can`t open $FileName : $!" ;
open (OLG, "$OutputFile" ) || die "$!" ;
while (<LOG>) {
($sid, $host, $date, $time, $access, $url, $http) = split ( /:/, $_ ) ;
write  OLG;
               }
close(LOG) || die "$!" ;
close(OLG) || die "$!" ;

format STDOUT =
# format is defined ...

Many thanks for your consideration !

Markus Banach


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 21 Jun 1999 09:21:17 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How send a file using perl on a win nt box to an email addr.
Message-Id: <376E667D.7A800CF4@mail.cor.epa.gov>

Thomas Eichmann wrote:
> 
> Look at Mail::Sender
> perldoc Mail::Sender

It's not part of the default distribution.
 
> perhaps search on CPAN for it!

Yep.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Mon, 21 Jun 1999 09:31:58 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Dariush <Dariush@sympatico.ca>
Subject: Re: How send a file using perl on a win nt box to an email addr.
Message-Id: <376E68FE.F6F4BD9A@mail.cor.epa.gov>

[courtesy cc sent to poster]

Dariush wrote: 
> Hi Every one;
> 
> How can I email a file automatically with perl on a Windows NT (4.0). to an
> email address?

You'll be pleased to learn that there is an extensive answer
to this question in the docs on your hard disk (unless you did
something bad while installing ActiveState Perl).  Go to your
Start Menu and find the shortcut there to the Perl on-line
documentation.  It will open up in HTML, in your favorite
browser.

Then go to the ActivePerl FAQ and read the "Windows 95/NT"
subsection.  In there you'll find your very question, with
a complete answer and more pointers.

In future, look in your docs first.  You'll save yourself
hours of frustration, not to mention avoiding: (1) possible
wrong answers from people whose skills you have no way of
evaluating; and (2) the scorn of Perlites around the world
who will wonder why you didn't read your own copy of the
documentation.  Part (2) will help you avoid getting flamed
to a crisp.  :-)

You might also look in the docs to find out about the 
listservs which focus on Perl for win32, since this group
tends to be more unix-centric.  You can subscribe by
walking to: 
http://www.activestate.com/support/mailing_lists.htm
and picking out the mailing lists that look appropriate.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 21 Jun 1999 09:13:44 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: how to do this in a perl program
Message-Id: <slrn7msi4j.k1b.abigail@alexandra.delanet.com>

Jim Bell (jbell@263.net) wrote on MMCXX September MCMXCIII in
<URL:news:376dc925@nemo.idirect.com>:
%% 
%% How can I do something like this in a perl CGI program:


No, not reliable. But that has nothing to do with Perl, but how HTTP
works. Go ask elsewhere.



Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 21 Jun 1999 16:01:19 GMT
From: Donny Widjaja <donny@impulsesoftware.com>
Subject: Re: How to remove space
Message-Id: <376E630A.DE74177C@impulsesoftware.com>

I will do it this way:

$longString = "               the begin has 15 space";
$longString =~ s/^\s+//;


weicai@my-deja.com wrote:
> 
> Hi, Friend
> 
> I am wondering if anyone know the right way to
> remove the spaces at the begin of a new line
> 
> such as when you enter text in a text field in
> HTML
> the entered text is the following
> "               the begin has 15 space"
> 
> what I want is the folloing
> "the bigin has 15 space"
> 
> Thanks
> 
> Wei
> 
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.


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

Date: 21 Jun 1999 16:08:51 GMT
From: friendly@hotspur.psych.yorku.ca (Michael Friendly)
Subject: How to test if a subroutine exists?
Message-Id: <7klo2j$s16$1@sunburst.ccs.yorku.ca>

For a module I need to test whether a subroutine whose name is 
determined at run time exists.  I tried:

	$test = 'macdesc_head_' . $macdesc_style;
	$ref = ref(\&$test);
	print "Test: $test, ref=$ref\n";

which works, when $macdesc_style='pod' and &macdesc_head_pod exists:

Test: macdesc_head_pod, ref=CODE

but also gives ref=CODE for a name which is not a defined subroutine:

Test: macdesc_head_foo, ref=CODE


How does one do it?

--
Michael Friendly     Email: friendly@yorku.ca (NeXTmail OK)
Psychology Dept
York University      Voice: 416 736-5115  Fax: 416 736-5814
4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA


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

Date: 21 Jun 1999 10:24:08 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to test if a subroutine exists?
Message-Id: <376e6728@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    friendly@hotspur.psych.yorku.ca (Michael Friendly) writes:
:For a module I need to test whether a subroutine whose name is 
:determined at run time exists.  I tried:
:
:	$test = 'macdesc_head_' . $macdesc_style;
:	$ref = ref(\&$test);
:	print "Test: $test, ref=$ref\n";

You need defined(\&$test) instead, not ref(), but this seems
semi-dubious.  I'm wondering whether some other coding structure
wouldn't be better, like an hash of code refs.  Or maybe, ick,
object methods. :-)

--tom
-- 
I have made this letter longer than usual because I lack the time to
make it shorter.
                --Blaise Pascal


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

Date: 21 Jun 1999 16:45:37 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: How to test if a subroutine exists?
Message-Id: <7klq7h$5fv$1@fcnews.fc.hp.com>

Michael Friendly (friendly@hotspur.psych.yorku.ca) wrote:
: For a module I need to test whether a subroutine whose name is 
: determined at run time exists.

>From 'perldoc -f defined':

  You may also use C<defined()> to check whether a subroutine exists, by
  saying C<defined &func> without parentheses

a cursory check indicated that the "without parentheses" is not
necessary.

Andrew


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

Date: 21 Jun 1999 10:54:46 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to test if a subroutine exists?
Message-Id: <376e6e56@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, ada@fc.hp.com (Andrew Allen) writes:
:From 'perldoc -f defined':
:  You may also use C<defined()> to check whether a subroutine exists, by
:  saying C<defined &func> without parentheses
:a cursory check indicated that the "without parentheses" is not
:necessary.

There's a tremendous difference between

    defined &fn
and
    defined &fn()

--tom
-- 
    "You can't have filenames longer than 14 chars.  
     You can't even think about them!"
        --Larry Wall in Configure from the perl distribution


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

Date: 21 Jun 1999 09:16:07 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: how to test pl scripts.?
Message-Id: <slrn7msi92.k1b.abigail@alexandra.delanet.com>

Zam Zam Begum (begum786@rocketmail.com) wrote on MMCXX September MCMXCIII
in <URL:news:376E0EDF.332997E@rocketmail.com>:
!! Hi ..
!! 
!! I am actually coming up with a mailer program using perl and looking for
!! help in using this Perl. I would like to test it out by uploading onto a
!! site. Is it possible to test it in a "testing" site .? Or are there any
!! of such sites available.?

Of course there are. Try 'localhost'.

!!                           And also, do i have to put my perl scripts
!! under the bin/perl directory.?

No.


Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 21 Jun 1999 09:05:08 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <slrn7mshka.k1b.abigail@alexandra.delanet.com>

Kenny McCormack (gazelle@yin.interaccess.com) wrote on MMCXX September
MCMXCIII in <URL:news:7klekd$i1e$1@yin.interaccess.com>:
** 
** Maybe I missed a post or two (I am reading this in comp.lang.awk -
** maybe Abigail posted only to comp.lang.perl.misc?), but the point is
** not "How to write a program to do the translations".  Anybody can
** write such a program; it is trivial.
** 
** The real point of my post is: What *are* the translations?


That would be off-topic for both comp.lang.perl.misc and comp.lang.awk.

Perhaps you want a microsoft.* group.



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 21 Jun 1999 16:42:14 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <376e0880.4615897@news.skynet.be>

Kenny McCormack wrote:

> I have, over the years, developed a filter (in GAWK)
>to deal with this, by translating the two characters I know about - the
>MS ASCII characters for the single and double quote marks.  Then, I
>simply delete all the other high ASCII chars.

You never received any mail in French or German, did you?

Only characters that are in use on Windows, but don't mean anything in
Iso-Latin-1, need conversion. That is the range 128 to 159. I'm not sure
about 255. Let's see...

	code	description       	replacement
	130	lower single quote	,
	131	italic "f"		f
	132	lower double quote	"
	133	3 dots ("ellipsis")	...
	134	"dagger" (cross)	+
	135	"double dagger"		er.. anybody ever used this?
	136	roof shaped accent 	^
	137	promille		????
	138	large "S" with accent	S
	154	small "s" with accent	s
	139	left angular bracket	<
	155	right angular bracket	>
	140	large "OE" ligature	OE
	156	small "oe" ligature	oe
	145	single quote left 	'
	146	single quote right	'
	147	double quote left 	"
	148	double quote right	"
	149	big centered dot bullet	*
	150	narrow hyphen, n-dash	-
	151	wider hyphen, m-dash	--
	152	tilde			~
	153	TM			TM
	159	large double dotted "Y"	Y
	255	small double dotted "y"	y

Can you build a filter using that? I'd think so, except for the
"promille" sign. that needs a better replacement.

	Bart.


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

Date: Mon, 21 Jun 1999 16:42:16 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <376f0ccc.5715605@news.skynet.be>

Jim Monty wrote:

>What, pray tell, is wrong with this?
>
>    s/([\x80-\x9F])/exists $t{$1} ? $t{$1} : ''/eg;

Apart from the fact that it's unnecessarily slow?


	{
	  local $^W;
	  s/([\x80-\x9F])/$t{$1}/g;
	}

But frankly, I'd rather make sure there are no holes in the hash. Simply
deleting most characters isn't too nice.

	Bart.


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

Date: Mon, 21 Jun 1999 16:42:19 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <376e2410.42072@news.skynet.be>

Abigail wrote:

>     s/([\x80-\x9F])/exits $t{$1} && $t{$1}/eg;
>
>would be more efficient.

"I know what I write". Yeah, right.

	Bart.


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

Date: 21 Jun 1999 09:17:58 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: is there any perlscript for client-side scripting?
Message-Id: <slrn7msich.k1b.abigail@alexandra.delanet.com>

smnayeem@my-deja.com (smnayeem@my-deja.com) wrote on MMCXX September
MCMXCIII in <URL:news:7kkmu2$29k$1@nnrp1.deja.com>:
** Does anyone know where i can find some documentation on perlscripts, is
** it going to be a good scripting language for doing client side
** scripting?


It's only useful if your "clients" are able to run Perl. 



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


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 21 Jun 1999 08:56:00 -0700
From: Greg McCann <gregm@well.com>
Subject: Re: Language choice for high-volume Oracle CGI interface?
Message-Id: <376E6090.6F939EFE@well.com>

Jonathan Stowe wrote:

> I thought the question was about the best way to deal with a high volume of
> traffic on a Web based database application - the fact that the original
> poster had mentioned CGI in his subject shouldnt preclude anyone making
> other suggestions...

Yes - thank you, Jonathan.  To clarify my original question - I mentioned CGI
because that is the only way that I have handled this type of application in the
past.  I've used MS SQL Server with WebODBC, FoxPro with FoxWeb and Interbase,
and more recently Perl with Win32::ODBC.

I apologize for confusing the issue with my limited knowledge.  I'm interested
in any suitable solution, whether or not it involves CGI.

Thanks,

Greg McCann


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

Date: Mon, 21 Jun 1999 16:00:57 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Looking for 3D Array sort...
Message-Id: <376f6134.25500938@enews.newsguy.com>

On Mon, 21 Jun 1999 11:09:44 -0400, James Park
<park@nssdc.gsfc.nasa.gov> wrote:

>Hi everyone.
>
>I'm looking for a 3d array (list of lists) sorting module.  If you
>know the location of one, I would appreciate it.  I've noticed that
>standard module only has the 2d array sort.  I really don't want to
>program one myself, so any help would be great.

perlfaq4: How do I sort an array by (anything)?
perldoc perllol
perldoc perldsc

I know you wanted a canned program (fragment), but it *is* educational
to read these things. And you can probably do what you want in one or
two lines.

Marcel




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

Date: 21 Jun 1999 15:57:02 GMT
From: snow@biostat.washington.edu (Gregory Snow)
Subject: Re: matinal musings and the madrugada
Message-Id: <7klnce$iqa$1@nntp6.u.washington.edu>

In article <376f006e.241042270@news.insnet.net>,
David Cantrell <NukeEmUp@ThePentagon.com> wrote:

>  Having said that, I
>always use YYYYMMDD when there is nothing better easily available.  It
>makes that code easier for those who have to maintain it later, and
>prevents _me_ from making incorrect assumptions when coding at 4
>o'clock in the morning.

But that has y10k problems, isn't your hubris great enough to make you
think that your scripts will still be being used in 8000 years? :-)



-- 
-------------------------------------------------------------------------------
     Gregory L. Snow         |    Matter cannot be created or destroyed,
     (Greg)                  |  nor can it be returned without a receipt.
snow@biostat.washington.edu  |


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

Date: Mon, 21 Jun 1999 16:07:19 GMT
From: Donny Widjaja <donny@impulsesoftware.com>
Subject: mod_perl references
Message-Id: <376E6473.975F61DF@impulsesoftware.com>

Hi,

I am planning to use mod_perl to speed up my CGI scripts and save some
memory.
Can someone give me a reference for mod_perl other than
http://www.perl.com?

Thanks in advance.


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

Date: Mon, 21 Jun 1999 16:18:22 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: mod_perl references
Message-Id: <376e6524.239250101@news.inet.tele.dk>

On Mon, 21 Jun 1999 16:07:19 GMT, Donny Widjaja
<donny@impulsesoftware.com> wrote:

>I am planning to use mod_perl to speed up my CGI scripts and save some
>memory.
>Can someone give me a reference for mod_perl other than
>http://www.perl.com?

http://www.modperl.com/, http://perl.apache.org/guide/ and the
excellent book: http://www.oreilly.com/catalog/wrapmod/


vh

Mads Toftum, QDPH
som pe USENET reprfsenterer sig selv og ingen andre.


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

Date: Mon, 21 Jun 1999 12:17:48 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: mod_perl references
Message-Id: <376E65AC.B620B4D8@mathworks.com>

Donny Widjaja wrote:

> Hi,
>
> I am planning to use mod_perl to speed up my CGI scripts and save some
> memory.
> Can someone give me a reference for mod_perl other than
> http://www.perl.com?
>
> Thanks in advance.

http://www.oreilly.com/catalog/wrapmod/

http://perl.apache.org/tpc-2.0/advanced-modperl/slide1.html

Craig



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

Date: 21 Jun 1999 10:22:39 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: mod_perl references
Message-Id: <376e66cf@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, Donny Widjaja <donny@impulsesoftware.com> writes:
:Can someone give me a reference for mod_perl other than
:http://www.perl.com?

    http://www.modperl.com/
    http://www.oreilly.com/catalog/wrapmod/

--tom
-- 
"Those who do not understand Unix are condemned to reinvent it, poorly."
					--Henry Spencer


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

Date: 21 Jun 1999 09:21:54 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: multiple spaces and commas
Message-Id: <slrn7msijt.k1b.abigail@alexandra.delanet.com>

Peter Lavender (plaven@idl.net.au) wrote on MMCXX September MCMXCIII in
<URL:news:01beba65$049fd740$090aa8c0@winnie.sspl.net.au>:
&& Hi everyone,
&& 
&& I wish to take a like like:
&& 
&& 06/19/99  10:33pm  up 12 days,  4:23,  6 users,  load average: 0.18, 0.14,
&& 0.16
&& 
&& that has multiple spaces with commas to finish looking like:
&& 
&& 06/19/99,10:33pm,up,12 days,4:23,6,users,load average:, 0.18,0.14,0.16

So, you don't want the space between 12 and days replaced, but the space
between 6 and users should? And the space after the : stays, although an
extra comma is inserted.

I don't we can make a satisfying replacement algorith based on a single
vague example. Could you give a specification of what you really want?



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 21 Jun 1999 11:48:27 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Need help adding Perl support to NT registry please
Message-Id: <376E6CDB.7045D742@mindspring.com>

David Cassell wrote:
> 
> [courtesy cc sent to poster]
> 
> Dan Lennon wrote:
> >
> > I need help adding Perl support to the NT registry please.
> 
> If you have ActiveState Perl installed, you'll be pleased to
> know that the answer is already on your system.  Go to your
> Start Menu and find the shortcut to the Perl on-line docs
> placed there during the install.  Look at the ActivePerl
> FAQ, and check under the sections titled "Docs & Support",
> "Windows 95/NT", "Web Server Config", and "Quirks".  If you
> want to know how to change the registry via Perl as well,
> that's in the ActivePerl FAQ too!
> 
> And if you're still stuck, I've been told that there is
> help for adding Perl script support to MS webservers in
> the Microsoft Knowledge Base.  So that makes the score:
> M$ Good Things:2 ; M$ Bad Things: urr, ummm.. oh forget
> it, I'm only a mathematician, I can't count that high.
> :-)
> 
Being a mathematician, you should be able to give us the Aleph value! 
Since you at least got started counting, it's probably Aleph Null... 
:-)  
-----------------
Out, damned spot!
Out, spot, out!
      -- Shakespeare for First Grade


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

Date: Mon, 21 Jun 1999 09:09:51 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: John Callender <jbc@shell2.la.best.com>
Subject: Re: Newbie help on complexity management?
Message-Id: <376E63CF.FFD25541@mail.cor.epa.gov>

[courtesy cc sent to poster]

John Callender wrote:
> [snip]
> The intended audience for this advice is the accidental programmer
> camp; the amateurs using Perl for Web content creation and CGI scripts
> and so on who don't have the benefit of the formal programmer's
> training where I would assume this subject gets fairly extensive
> coverage. I'm working on a tutorial-type resources for this particular
> audience, and as someone who himself missed out on that formal
> training, I'd appreciate any suggestions on the most important points
> to cover.

Given the target audience, I think you might want to start at
an even lower level.  Discuss: [1] why they should use CGI.pm
and not try to fudge the functions themselves until they understand
enough Perl to know what could go wrong; [2] why subroutines
are Your Friend; and [3] how things like CGI.pm and subroutines
help keep your program looking nice and organized.  After that,
you can sort of re-write a few pieces of the perlstyle manpage 
with examples so that a newbie can actually grok the contents.

But that won't cover the main things that bug me about bad
programming style in CGI scripts:  No here-docs.  Millions
of repetitions of nearly-identical statements with no effort
[read no training] at turning the mess into subroutines or an 
efficient data structure. Re-inventing the wheel but doing it
so badly that they end up with a concrete triangle on a bent 
axis.  Could you talk about those aspects?  Something on the
"if you have to do it more than twice, maybe you should put it
in a subroutine" issue.  And the "if it looks like the same
thing repeated, there ought to be a better approach" issue.
And the "don't do that, use a hash" plaint that you see here
a dozen times a day.

And of course, symbolic references.  That would be a good
way to introduce the idea of hashes as a solution space.

> Just to save us all time, I will stipulate that this question has
> relatively little to do with Perl per se.

It seems to be quite relevant to me, since the issue is points
of Perl programming style and technique.  I'm all for good,
clear tutorials for CGI beginners.

> Anyway, I'm hopeful that anyone sufficiently annoyed by this level of
> non-topicality will have configured his or her newsreader to filter out
> articles with 'newbie' and 'help' in the subject line. Otherwise, feel
> free to respond in whatever way you deem appropriate; droll asides on
> the wrong-headedness of someone like me even trying to offer advice to
> this particular audience will be appreciated almost as much as sincere
> attempts to address the question.

Actually John, I have read some of your previous posts here,
and I think that you are fully equipped to tackle this
subject.  You know more than enough Perl, you're willing to
accept constructive criticism, and you have a good feel for
the limitations of the target audience.

Good luck,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Mon, 21 Jun 1999 09:38:40 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Questions
Message-Id: <376E6A90.E006F34F@mail.cor.epa.gov>

news.wizard.net wrote:
> 
> chop removes the last character of a string but supose I want to remove the
> first caracter?
> 
> What is the easiest way to remove say the first 5 elements of an array?
> Makeing the 6 the first.

In addition to everything else, you appear to be confusing
a Perl 'string' with a Perl 'array'.  They are not at all the
same thing.  Or are you C-ing this through the eyes of a
different programming language?  :-)

I think you'll want to read the perldata manpage to get a
handle on this.  Then read perlfunc and be sure to check out
substr() [which works on strings but not arrays] and
splice() [which works on arrays but not strings].

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Mon, 21 Jun 1999 12:23:25 -0400
From: Andy Dougherty <doughera@lafayette.edu>
Subject: Re: Relocation error in Socket.so
Message-Id: <Pine.GSU.4.05.9906211220530.2801-100000@newton.phys>

On Sat, 19 Jun 1999, Andrey Zmievski wrote:

> lib/socket.........ld.so.1: ./perl: fatal: relocation error: file
> ../lib/auto/Socket/Socket.so: symbol __inet_ntoa: referenced symbol not
> found
> 
> Why wouldn't it be able to find that symbol in libsocket.so or
> libnsl.so?

Please check out the section 
	
	=item __inet_* errors

in the INSTALL file.  I have never encountered the specific problems
described there, but that section was submitted by someone who did. If you
are able to correct, expand, or amplify that section, I'm sure it would be
appreciated by others too.

Hope this helps,

    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042



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

Date: Mon, 21 Jun 1999 16:42:21 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Search script performance
Message-Id: <377536d1.174057@news.skynet.be>

[cc'ed]
rumple1000@my-deja.com wrote:

>I have a Perl search script which takes a long time to find keywords in
>a bunch of files.
>
>The html files are about 3000 (about 2-3k each) and are stored a very
>complicated and deep structure of nested subdirectories.
>
>Would this structure of subdirectories affect the performance of the
>script which uses find.pl inside it to recurse all the subdirectories?
>
>Would this search be faster if all the files were stored in one
>directory?

No, I wouldn't think so. I think it's the opening, reading and parsing
of the files themselves, that takes a lot of time.

I think you'd better use an index mechanism, and sort that. Try to find
a copy of Doctor Dobbs Journal, january 1999, which contains the articla
"full-text searching in Perl" by Tim Kientzle. If you can't find it, or
you're a cheapo ;-), at least download the code from the article from
DDJ's website (www.ddj.com). The concept is simple: [A] you number the
files; [B] you create a (disk-stored) hash of ALL keywords found in any
file, plus as values a list of all files in which it was found. That's
it. When you need all files that contain two keywords, look up the
intersection of the two lists, and convert those file numbers back to
files/URL's.

	Bart.


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

Date: 21 Jun 1999 09:05:05 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <m1yahdtu8e.fsf@halfdome.holdit.com>

>>>>> "Greg" == Greg Bacon <gbacon@cs.uah.edu> writes:

Greg> Top 10 Posters by OCR (minimum of five posts)
Greg> ==============================================

Greg> 0.924  ( 80.8 / 87.5)    153  abigail@delanet.com

You are really gonna have to add some AI to recognize Abigail's
peculiar quoting style.  Either that, or a cancelbot to kill Abi's
postings because they don't fit Usenet tradition. :)

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


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

Date: Mon, 21 Jun 1999 11:22:26 -0500
From: Burton Kent <burton@lucent.com>
To: Alan Curry <pacman@defiant.cqc.com>
Subject: Re: Using ^M within backquotes possible?
Message-Id: <376E66C2.6D999A54@lucent.com>

> I don't get one thing though. Why put something in backquotes if you're
> redirecting its output (and errors even) to /dev/null? The backquotes return
> nothing. Then print it! Wouldn't want to miss out on printing the nothing.
> 

Good catch <grin>.  The printing is just for debugging, since I wasn't
getting what I wanted.  If it worked, then there would be
nothing returned...

As stated in the original message:
This is what I get, instead of having the program ("setnode") run properly:

" | setnode g=$GENERIC node=$ROOT >/dev/null 2>&1

Thanks,

B


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

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

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