[15878] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3291 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 8 14:10:49 2000

Date: Thu, 8 Jun 2000 11:10:26 -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: <960487826-v9-i3291@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 8 Jun 2000     Volume: 9 Number: 3291

Today's topics:
    Re: Larry Rosler interview on perl.com! <lauren_smith13@hotmail.com>
    Re: Larry Rosler interview on perl.com! <care227@attglobal.net>
    Re: Larry Rosler interview on perl.com! <lauren_smith13@hotmail.com>
    Re: Larry Rosler interview on perl.com! <aqumsieh@hyperchip.com>
        links? <wenmang01NOweSPAM@yahoo.com.invalid>
    Re: links? (Andreas Kahari)
    Re: localtime <boogiemonster@usa.net>
    Re: localtime <lr@hpl.hp.com>
        newbie seeks advice <jweisbin@mindspring.com>
    Re: newbie working on web stuff... <lauren_smith13@hotmail.com>
        Oracle DBD <eidheim@hivolda.no>
        Passing variables between 2 proccess <shaid@yellowpages.co.il>
    Re: Passing variables between 2 proccess (Simon Cozens)
    Re: Perl and memory consumption <jasonb885@my-deja.com>
    Re: Perl and memory consumption <dan@tuatha.sidhe.org>
    Re: Perl and memory consumption (Neil Kandalgaonkar)
    Re: Perl and memory consumption <danny@lennon.postino.com>
    Re: Perl and memory consumption <smerr612@mailandnews.com>
    Re: Perl and memory consumption <flavell@mail.cern.ch>
    Re: perl cgi problem. thax in advance. <raphaelp@nr1webresource.com>
    Re: perl or with system newsposter@cthulhu.demon.nl
    Re: perl or with system (Simon Cozens)
    Re: perl or with system newsposter@cthulhu.demon.nl
    Re: perl or with system <mike.solomon@eps.ltd.uk>
    Re: perl or with system (Abigail)
    Re: Perl Shortcut? <aqumsieh@hyperchip.com>
    Re: Perl Shortcut? (James Weisberg)
        PerlModule LWP / DBI <tom.mcdonnell@kneesandtoes.com>
        Premature end of script headers? (Kevin Ferron)
        Problem with perl DBI & access <hellbunnie@irelands-web.ie>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 8 Jun 2000 10:09:20 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <8hojuq$avl$1@brokaw.wa.com>


Drew Simonis <care227@attglobal.net> wrote in message
news:393F98B5.965C167@attglobal.net...
> From the interview:
>
> :There's certainly no ANSI Perl. Does Perl need the same kind of
> :official standardization that C got?
> :
> :LR: I believe that it does, in order to increase its acceptability.
> :Many organizations either cannot or will not endorse the use of
> :unstandardized languages in their business-critical activities.
>

What were the reasons given by LW for his anti-certification attitude?

Lauren





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

Date: Thu, 08 Jun 2000 13:33:12 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <393FD8D8.E72538D3@attglobal.net>

Lauren Smith wrote:
> 
> Drew Simonis <care227@attglobal.net> wrote in message
> 
> What were the reasons given by LW for his anti-certification attitude?
> 
> Lauren

Actually, he was in favor of ANSI certification for the language.
Read the whole interview at www.perl.com


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

Date: Thu, 8 Jun 2000 10:47:48 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <8hom6t$fta$1@brokaw.wa.com>


Drew Simonis <care227@attglobal.net> wrote in message
news:393FD8D8.E72538D3@attglobal.net...
> Lauren Smith wrote:
> >
> > Drew Simonis <care227@attglobal.net> wrote in message
> >
> > What were the reasons given by LW for his anti-certification attitude?
> >
> > Lauren
>
> Actually, he was in favor of ANSI certification for the language.
> Read the whole interview at www.perl.com

Found in C:\Perl\lib\pod\perlfaq2.pod
  Is there an ISO or ANSI certified version of Perl?

            Certainly not. Larry expects that he'll be certified
            before Perl is.

I didn't see any mention of LW's (the original Larry) opinion having changed
(although I have been known to gloss over entire parts of articles :-)

Lauren





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

Date: Thu, 08 Jun 2000 18:00:50 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <7a8zwgcass.fsf@merlin.hyperchip.com>


Drew Simonis <care227@attglobal.net> writes:

> Lauren Smith wrote:
> > 
> > Drew Simonis <care227@attglobal.net> wrote in message
> > 
> > What were the reasons given by LW for his anti-certification attitude?
> > 
> > Lauren
> 
> Actually, he was in favor of ANSI certification for the language.
> Read the whole interview at www.perl.com

You missed something:

	LW eq Larry Wall
	LW ne Larry Rosler

:-)

But I don't know the answer to the question.

--Ala


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

Date: Thu, 08 Jun 2000 09:41:19 -0700
From: wenmang <wenmang01NOweSPAM@yahoo.com.invalid>
Subject: links?
Message-Id: <02c4b8a0.0402c644@usw-ex0105-038.remarq.com>

Hi, does anyone know some links pointed to web sites
containing perl archives?
I want to "peek" how somebody else writes perl scripts and
has postedthem on web? Thanks in advance.
wm

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: 8 Jun 2000 19:01:20 +0100
From: andkaha@hello.to.REMOVE (Andreas Kahari)
Subject: Re: links?
Message-Id: <393fd160@merganser.its.uu.se>

In article <02c4b8a0.0402c644@usw-ex0105-038.remarq.com>,
wenmang  <wenmang01NOweSPAM@yahoo.com.invalid> wrote:
>Hi, does anyone know some links pointed to web sites
>containing perl archives?
>I want to "peek" how somebody else writes perl scripts and
>has postedthem on web? Thanks in advance.
>wm
>
>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
>The fastest and easiest way to search and participate in Usenet - Free!
>

The CPAN is full of scripts, pick a site from the list at
<URL:http://www.perl.com/CPAN-local/SITES.html>.

Buy a book. Read this group. See the docs.

/A

-- 
# Andreas Kähäri, <URL:http://hello.to/andkaha/>
# -----------------------------------------------------------
# All junk e-mail is reported to the appropriate authorities. 
# Quidquid latine dictum sit, altum viditur.


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

Date: Thu, 8 Jun 2000 12:45:25 -0700
From: "J. Joseph Yusko" <boogiemonster@usa.net>
Subject: Re: localtime
Message-Id: <8hoipj$cp1$1@usenet01.srv.cis.pitt.edu>

If i printf the variable $date yes it works perfectly fine but if i want to
take that variable and name that file then it gives me the error message

my $date = join '-' => (split /\s+/ => localtime)[0 .. 2, 4, 3];
 ...
 ...
$dest="C:\\BackupEventLogs\\$eventLog\\$date.evt";
 ..
 ..
 ..
"Larry Rosler" <lr@hpl.hp.com> wrote in message
news:MPG.13a84c17ab43263b98ab3b@nntp.hpl.hp.com...
> In article <8hlu8k$cva$1@usenet01.srv.cis.pitt.edu> on Wed, 7 Jun 2000
> 12:42:53 -0700, J. Joseph Yusko <boogiemonster@usa.net> says...
> >
> > "Xavier Tardy" <xavier.tardy@alcatel.fr> wrote in message
> > news:393E75DB.8F92FCD0@alcatel.fr...
> > > "J. Joseph Yusko" wrote:
> > >
> > > > can anyone assist me with this problem.  I have the following line
of
> > > > code.
> > > >  my($date)=join("-", ((split(/\s+/, scalar(localtime)))[0,1,2,4]));
> > > > and appears as Wed-Jun-7-2000.  I'd also like to append the time.
how
> > > > would i go about that? any help would be greatly apprecated.
> > >
> > > did you try
> > >
> > > my($date)=join("-", ((split(/\s+/,
> > >                 scalar(localtime(time()))))[0,1,2,4,3]));
> > >
> > yes but gave me a message saying...
> > (The filename, directory name, or volume label syntax is incorrect)
> >
> > when i remove the 3 works but the does not append the time.
>
> Where does a message like that come from?  There is no error message
> like that in perldiag.  How can it have anything to do with that Perl
> statement?
>
> I tried it without all the superfluous punctuation and defaults, and it
> worked fine.
>
>   my $date = join '-' => (split /\s+/ => localtime)[0 .. 2, 4, 3];
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com




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

Date: Thu, 8 Jun 2000 10:57:14 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: localtime
Message-Id: <MPG.13a97e5489c4838f98ab43@nntp.hpl.hp.com>

[It is much easier for others to follow the thread if you selectively 
quote what you are responding to, before the response itself.  Below is 
snipped and rearranged for coherency.]

In article <8hoipj$cp1$1@usenet01.srv.cis.pitt.edu> on Thu, 8 Jun 2000 
12:45:25 -0700, J. Joseph Yusko <boogiemonster@usa.net> says...
> "Larry Rosler" <lr@hpl.hp.com> wrote in message
> news:MPG.13a84c17ab43263b98ab3b@nntp.hpl.hp.com...
> > In article <8hlu8k$cva$1@usenet01.srv.cis.pitt.edu> on Wed, 7 Jun 2000
> > 12:42:53 -0700, J. Joseph Yusko <boogiemonster@usa.net> says...

 ...

> > > yes but gave me a message saying...
> > > (The filename, directory name, or volume label syntax is incorrect)
> > >
> > > when i remove the 3 works but the does not append the time.
> >
> > Where does a message like that come from?  There is no error message
> > like that in perldiag.  How can it have anything to do with that Perl
> > statement?
> >
> > I tried it without all the superfluous punctuation and defaults, and it
> > worked fine.

 ...

> If i printf the variable $date yes it works perfectly fine but if i want to
> take that variable and name that file then it gives me the error message
> 
> my $date = join '-' => (split /\s+/ => localtime)[0 .. 2, 4, 3];
> ...
> ...
> $dest="C:\\BackupEventLogs\\$eventLog\\$date.evt";

Ah, finally the light dawns, and the origin of the error message is 
clear.

Unlike Unix, where the only characters that may not appear in filenames 
are "\0" and '/', there is a considerable list of characters not 
permitted in Windows/DOS filenames.  The ':' that separates the 
components of time is one of those characters.

There are many ways to solve that problem, by replacing the ':' 
characters with something else or nothing.  Choose the way that suits 
you best.

While you're at it, you might replace the doubled backslashes in your 
filenames with single forward-slashes, which work just fine in 
Windows/DOS, as they do in Unix.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 08 Jun 2000 11:56:43 -0400
From: "James Weisbin" <jweisbin@mindspring.com>
Subject: newbie seeks advice
Message-Id: <8hofrl$loe$1@slb2.atl.mindspring.net>

I want to set up a web page on which users can fill out a form and submit 
their credit card and then order/download my product. I have some
programming experience (Java, C++), but am new to CGI, Perl, etc. I don't
want to re-invent the wheel. Can someone point me in the direction of the
best (fastest, cheapest, easiest) way to accomplish this? I imagine that
there must be packages already available to do this, but I don't know where
to turn to. Also, I don't know (yet) what kind of server I should look for
(Apache, unix?). Any help would be appreciated.
-----------------------------
Jim Weisbin
<jim@savagetranscendental.com>


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

Date: Thu, 8 Jun 2000 10:02:03 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: newbie working on web stuff...
Message-Id: <8hojhb$b0m$1@brokaw.wa.com>


ice station vostok <vostok@mirdesign.com> wrote in message
news:B564837D.8A77%vostok@mirdesign.com...
>
> i'm a recent perl person (up to 48 hours now) and have gotten about
halfway
> with what i'm trying to do...
>
> i have a script that will write a random server side include tag to pull
> random content into a web page...my problem is that the scritp will write
> (print) the tag, but what can i put on the page to call the script to
print
> the tag...
>
> i want people to hit the page, have it call the script for the random tag
> and then pull in the random content...
>
> anyone have suggestions?...

Get rid of all that randomness!  :-)  Haven't you heard that Perl is
deterministic in a DWIM sort of way?

Check out the CGI module.  perldoc CGI

If you have questions about programming CGI or HTML or client-side
scripting, this newsgroup may not be for you.  Check out the various groups
under the comp.infosystems.authoring.* hierarchy.

Lauren





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

Date: Thu, 08 Jun 2000 18:31:44 +0200
From: Ole Christian Eidheim <eidheim@hivolda.no>
Subject: Oracle DBD
Message-Id: <393FCA6F.C3992FF6@hivolda.no>

I'm having trouble when I compile the Oracle DBD-module. When Oracle for
Linux was available as a test-version I fetched it, installed it and
compiled the DBD-module without(almost) a problem. Now, though, when
I've gotten the latest version of Oracle Enterprise Server, the
DBD-module doesn't compile very well.

I must say that I'm abit tired of installing the whole Oracle
server-package just to get the libraries and header files I need to
connect to an Oracle-database through my perl-scripts. Also, the
java-installation that Oracle uses isn't very stable. I've spent half my
day at work today to install the thing, and it still doesn't work.

Is there a package out there with the files I need to compile the Oracle
DBD-module. Maybe an easier way to obtain them either from Oracle or
from the Enterprise CD? In other words, how do I get Oracle support in
perl in less than an hour?

Thanks,
Ole Christian Eidheim



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

Date: Thu, 08 Jun 2000 15:30:09 GMT
From: shai1234 <shaid@yellowpages.co.il>
Subject: Passing variables between 2 proccess
Message-Id: <sjvf01k6h5136@corp.supernews.com>

Hi all,

When Using fork(), how can I have a 'global' variable that is common
to both proccess? 

I mean that if one proccess changes the value of that variable , the other
proccess will 'know' the new value of that variable as well?

Can this be done? how?

thanks,

Shai

--
Posted via CNET Help.com
http://www.help.com/


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

Date: 8 Jun 2000 15:31:57 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Passing variables between 2 proccess
Message-Id: <slrn8jvf3d.bh3.simon@justanother.perlhacker.org>

shai1234 (comp.lang.perl.misc):
>When Using fork(), how can I have a 'global' variable that is common
>to both proccess? 

Try the IPC::Shareable module from CPAN.

-- 
Digital circuits are made from analog parts.
		-- Don Vonada


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

Date: Thu, 08 Jun 2000 15:12:01 GMT
From: |Odo| <jasonb885@my-deja.com>
Subject: Re: Perl and memory consumption
Message-Id: <8hod3i$1t9$1@nnrp1.deja.com>

Fascinating.

You're too smart to be so naive.  Your true goal is to amuse yourself.

I'm done amusing you.

--
Sincerely,
Jason Boxman

http://edseek.com/ -
     New Literature Message Boards!


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


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

Date: Thu, 08 Jun 2000 15:35:37 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl and memory consumption
Message-Id: <d3P%4.105717$hT2.424851@news1.rdc1.ct.home.com>

The AI that would be Gojira <godzilla@stomp.stomp.tokyo> wrote:

> Seems many here do not understand how modules work
> or, are simply looking to start an argument by 
> constantly switching debate positions to add
> fuel to your own fires.

Unfortunately you're one of the people that apparently don't understand
how modules work. This is making discussion difficult. A thorough reading
of the documntation on how modules work seems in order for you.

> Strikes me, you and others are trolls, yes?

> If you say you and others are not trolls, then
> your knowledge level of how modules work is
> rather inadequate and you should not be commenting.

A good point, and one you should take to heart, Gojira. You very obviously
don't understand how modules work, or are unable to properly discern
between generalities and specifics. I'll assume the former here.

Go read the docs. The overhead imposed by modules is very trivial. Any
other extra memory usage is directly caused by the author of the module,
not by perl's module system.

					Dan


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

Date: 8 Jun 2000 15:47:18 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: Perl and memory consumption
Message-Id: <8hof66$5v3$1@newsflash.concordia.ca>

In article <d3P%4.105717$hT2.424851@news1.rdc1.ct.home.com>,
Dan Sugalski  <dan@tuatha.sidhe.org> wrote:

>A good point, and one you should take to heart, Gojira. You very obviously
>don't understand how modules work, or are unable to properly discern
>between generalities and specifics. I'll assume the former here.

The troll has never shown any interest in learning anything, only in 
disrupting the newsgroup. She faded away for a week or two after it 
seemed people were catching on to her, but she's back again.

I think it's high time for the comp.lang.perl.misc-trolls web page.
I'll post an URL soon.

-- 
Neil Kandalgaonkar
neil@brevity.org


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

Date: 8 Jun 2000 15:33:19 GMT
From: <danny@lennon.postino.com>
Subject: Re: Perl and memory consumption
Message-Id: <8hoebv$2d9$1@lennon.postino.com>

User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i586))

Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
>> What kind of overhead is associated with using modules?
[snip]
> Best and most reliable method to prevent blowing
> a Perl radiator hose, is use of your fingers and
> your keyboard, along with some elbow grease.

> As a very loose and rough guesstimation, each
> module, averaging all modules together, represents
> a memory bloat factor of one-thousand percent over
> what your fingers can do with a keyboard.
> What your fingers and a keyboard can do is write
> your own code to do what you want without modules,
> reducing your memory bloat down to a size analogous
> to dear little Tinker Bell's head.

This looks like substituting a small reduction in memory usage
with a large increase in the time it takes to code up a solution.
Memory is cheap, labour is expensive. Why re-invent the wheel. 
Use CPAN and the modules.

-- 
Danny Aldham     Providing Certified Internetworking Solutions to Business
www.postino.com  E-Mail, Web Servers, Web Databases, SQL PHP & Perl


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

Date: Thu, 08 Jun 2000 17:01:06 GMT
From: Steven Merritt <smerr612@mailandnews.com>
Subject: Re: Perl and memory consumption
Message-Id: <8hojg6$78j$1@nnrp1.deja.com>

In article <slrn8juf9g.k63.tjla@thislove.dyndns.org>,
  tjla@guvfybir.qlaqaf.bet (Gwyn Judd) wrote:
> I was shocked! How could Godzilla! <callgirl@la.znet.com>
> say such a terrible thing:
> >Gwyn Judd wrote:
> >(snipped trolling, personal insults, harassment, sociopathic
comments)
> >
> >Whew...
<snip>

> Maybe you should go somewhere else, where you
> may be able to offer people actual help.

s/offer people actual help/get some help/

Steven
--
King of Casual Play
The One and Only Defender of Cards That Blow

My newsreader limits sigs to four lines, but I cleverly bypassed this by


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


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

Date: Thu, 8 Jun 2000 19:37:25 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl and memory consumption
Message-Id: <Pine.GHP.4.21.0006081926190.19370-100000@hpplus03.cern.ch>

On Wed, 7 Jun 2000, Joe Kline wrote:

> Can big modules cause that severe of performance problems?

In theory, yes, sure.  In theory.  But two practical points to
consider.

- if the module is intended for use with the CGI, and many people are
using it with the CGI, then why should it be specially a performance
problem for you and not for them?  After all, if it was a problem for
them, any of them could investigate why, and propose an improvement.

If you're writing your own code, only for yourself, who is going to
audit it for you? 

- if you're writing CGI scripts, then (assuming the usual CGI process
model) you are already suffering all the startup overhead of a new
process and getting a perl program started.  Using a module is likely
to be reatively lightweight compared with all of that.  So if it gets
to be a performance issue (as it surely could in heavy load
situations) then your first recourse would be to find a way of getting
rid of that process startup overhead.  

> However, I'm a huge fan of modules. I purposefully use them for
> functionality I use over and over and over and over again. It makes it
> snap to handle problems with that functionality, 

 ..and because one's own code is usually simple and straightforward, it
become so much easier to write and to debug.  There's a lot to be said
for modular programming; even if you have to write your own, it's
still better than spaghetti code.  And the subroutines/modules are 
waiting to be reused the next time you have a programming task in the
same area.

But don't mind a little overhead, now and again, in the interests of
getting the right answer.  Getting the wrong answer, fast, is no
comparison.




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

Date: Thu, 8 Jun 2000 18:06:46 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Re: perl cgi problem. thax in advance.
Message-Id: <8hog9a$8ui$1@news.online.de>

ok, I'm sorry, I did explain this wrongly: What happens is that the browser
opens a new window (if he supports it) and submits the information to that
window. Then, the results will automatically go inside that window. Of
course a server can't force you to open a new window... :-)

Tony Curtis <tony_curtis32@yahoo.com> wrote in message
news:87g0qop9qv.fsf@limey.hpcc.uh.edu...
>
> [ dejeopardising post ]
>
> >> On Thu, 8 Jun 2000 11:21:03 +0200,
> >> "Raphael Pirker" <raphaelp@nr1webresource.com> said:
>
> > Peng <peng@cs.ualberta.ca> wrote in message
> > news:7xH%4.2208$vT6.296201@news1.telusplanet.net...
> >>
> >> the cgi program pops out a new window and display
> >> message there. I will be very appreciated if someone
> >> can tell me how to use perl to do that.
>
> > inside the <form> tag, add target="_blank" and the CGI
> > Script will make the results go inside a separate
> > window!
>
> What if I'm using a text-based browser like lynx?  Or one
> with a GUI that doesn't allow new windows to be created
> (for whatever reason)?  What do webbots see?  The ultimate
> story is: you cannot force browsers to do things from the
> server-side.  This will work for some
> popular-gui-browsers-insert-names-here but not in all
> cases.
>
> (What was it?  Two weeks since we last went through this
> issue again?)
>
> hth
> t
> --
> "Trying is the first step towards failure"
>                                            Homer Simpson




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

Date: 8 Jun 2000 15:09:35 GMT
From: newsposter@cthulhu.demon.nl
Subject: Re: perl or with system
Message-Id: <8hocvf$si1$1@internal-news.uu.net>

Mike Solomon <mike.solomon@eps.ltd.uk> wrote:
> Simon,

> as I understand it that would explain why I would get a different return
> value from system but for a success I still get 0

system returns exit value.
exit value 0 is success.
exit value != 0 is failed

chdir returns 0 on failure, != 0 on success.

Erik



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

Date: 8 Jun 2000 15:16:34 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: perl or with system
Message-Id: <slrn8jve6i.bh3.simon@justanother.perlhacker.org>

newsposter@cthulhu.demon.nl (comp.lang.perl.misc):
>system returns exit value.

I don't think it does, you know.

-- 
BEWARE!  People acting under the influence of human nature.


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

Date: 8 Jun 2000 15:38:05 GMT
From: newsposter@cthulhu.demon.nl
Subject: Re: perl or with system
Message-Id: <8hoekt$si1$3@internal-news.uu.net>

Simon Cozens <simon@brecon.co.uk> wrote:
> newsposter@cthulhu.demon.nl (comp.lang.perl.misc):
>>system returns exit value.

> I don't think it does, you know.

Reread docs, and you're right.  Correction to my original statement:
    s/value/status/

Erik



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

Date: Thu, 8 Jun 2000 16:45:29 +0100
From: "Mike Solomon" <mike.solomon@eps.ltd.uk>
Subject: Re: perl or with system
Message-Id: <8hof72$bif$1@newsg2.svr.pol.co.uk>

system does return 0 for success which is why i have the problem with system
and not with chdir

<newsposter@cthulhu.demon.nl> wrote in message
news:8hoekt$si1$3@internal-news.uu.net...
> Simon Cozens <simon@brecon.co.uk> wrote:
> > newsposter@cthulhu.demon.nl (comp.lang.perl.misc):
> >>system returns exit value.
>
> > I don't think it does, you know.
>
> Reread docs, and you're right.  Correction to my original statement:
>     s/value/status/
>
> Erik
>




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

Date: 8 Jun 2000 17:10:18 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: perl or with system
Message-Id: <8hok1q$gpm$1@news.panix.com>

On Thu, 8 Jun 2000 16:45:29 +0100, Mike Solomon <mike.solomon@eps.ltd.uk> wrote:
++ system does return 0 for success which is why i have the problem with system
++ and not with chdir

system() doesn't distinguish between "success" and "failure" of the called
program. "success" for system just means it could call the program. It just
returns what the wait call returns; in which is encoded whatever the
called program returned.

It just happens that the program you called returns 0 on what it considers
success. 



Abigail


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

Date: Thu, 08 Jun 2000 15:32:02 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Perl Shortcut?
Message-Id: <7aem68qjd9.fsf@merlin.hyperchip.com>


mjtg@cus.cam.ac.uk (M.J.T. Guy) writes:

> Ala Qumsieh  <aqumsieh@hyperchip.com> wrote:
> >
> >If this is all you want then:
> >
> >	@stats{@teams} = ({wins => 0}) x @teams;
> >
> >should do what you want.
> 
> That's almost certainly *not* what the OP wants.    Do you really want
> all the values in %stats to be the *same* anonymous array?

True. My bad. Abigail has already pointed this out, and suggested a
simple fix:

	@stats{@teams} = map {{wins => 0}} 1 .. @teams;

--Ala


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

Date: Thu, 08 Jun 2000 16:47:12 GMT
From: chadbour@wwa.com (James Weisberg)
Subject: Re: Perl Shortcut?
Message-Id: <k6Q%4.4582$HD6.101354@iad-read.news.verio.net>

In article <8hmq1m$vg$2@news.panix.com>, Abigail <abigail@arena-i.com> wrote:
>On Wed, 07 Jun 2000 23:45:14 GMT, James Weisberg <chadbour@wwa.com> wrote:
>++ 	I have to say, however, that the line:
>++ 
>++ 	@stats{@teams} = ({wins => 0}) x @teams;
>++ 
>++ 	seems pretty doggone weird to me, and that's one of the reasons
>++ I asked the question to begin with. There's usually some nugget of
>++ wisdom to be gleened from looking at code like that. Constructing
>++ the key on the rhs of the statement is something I would have never
>++ considered. I didn't realize that was possible. Are there other more
>++ useful reasons to do something like that?
>
>There are very useful reasons *NOT* to do something like this. All
>references will be shared. Consider:
>
>    #!/opt/perl/bin/perl -w
>
>    use strict;
>
>    my @teams = qw /red blue green yellow/;
>    my %stats;
>    @stats {@teams} = ({wins => 0}) x @teams;
>
>    $stats {red} {wins} ++;   # Only red wins?
>
>    foreach my $team (@teams) {
>        print "$team has won $stats{$team}{wins} times\n";
>    }
>    __END__
>    red has won 1 times
>    blue has won 1 times
>    green has won 1 times
>    yellow has won 1 times
>
>
>Not really what you want, is it?

	Uh, no. Not unless my name was Bob Costas and I was trying to bring
"competitive balance" to the sport. ;-)

	Thanx for the heads-up.

	
-- 
World's Greatest Living Poster


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

Date: Thu, 08 Jun 2000 17:34:35 +0100
From: Tom McDonnell <tom.mcdonnell@kneesandtoes.com>
Subject: PerlModule LWP / DBI
Message-Id: <393FCB1B.C50F2590@kneesandtoes.com>

I have a some strange problems, this is one of them:

When pre-loading Perl modules in Apache/mod_perl it seems that any
module using a .so library causes httpd not to start, although it says
it's started OK. Have tried using startup.perl and using PerlModule xxx.
These modules work under mod_perl normally (ie not pre-loaded), as do
ones which require no .so files (like CGI.pm).

It's the Apache/Perl config as shipped with Redhat 6.2 (Perl 5.005_03,
Apache 1.3.12)

Any advice or help appreciated.

Tom McDonnell
tom.mcdonnell@kneesandtoes.com



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

Date: Thu, 08 Jun 2000 15:32:29 GMT
From: kferron@iwon.com (Kevin Ferron)
Subject: Premature end of script headers?
Message-Id: <8F4D727ECkevinvcconceptscom@24.2.68.78>

I keep getting an error in my logs everytime I try to run a script.

 Jun 08 02:13:03 2000] [error] [client 127.0.0.1] Premature end of script 
headers: c:/inetpub/keen/cgi-bin/mailinglist/subscribe.pl
[Thu Jun 08 02:13:03 2000] [error] [client 127.0.0.1] Died at 
c:/inetpub/keen/cgi-bin/mailinglist/subscribe.pl line 639.

I'm running a win98 apache win32 with Activeperl with blatmail.

I am unexperienced with Perl.

This is line 639:
Win32::Process::Create($ProcessObj, $mailprog, "Blat $tempfile\\tempfile -t 
$lines -s \"$INPUT{'mail_subject'}\" -i \"$list_mail ($list_name)\" -f 
\"$list_mail\" ", 0, DETACHED_PROCESS, ".")|| die $!;

Could someone point me in the right direction? Thank you.


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

Date: Thu, 08 Jun 2000 15:36:09 GMT
From: Kathryn Cassidy <hellbunnie@irelands-web.ie>
Subject: Problem with perl DBI & access
Message-Id: <393FBD17.D4E151F6@irelands-web.ie>

Hi there,

I'm running a script on a linux machine that uses unixodbc and
www.easysoft.com's OOB server to connect to an Access database on an NT
machine.

I have the following query:
SELECT RetailerId, retailer, Address1, Address2, Address3, Address4,
phone, fax, email, contact FROM tblRetailer WHERE Retailer LIKE '*spar*'

Now when I run this directly within access I get loads of rows returned,
but if I run the exact same query from my perl script it gets no rows
returned.

The problem is related to the wildcards as I can do normal selects fine.

If anyone has come across a problem like this before I'd be really
grateful if you could give me any details.  Alternatively, if anyone has
a similar setup (ie, unix client connecting to access db) but they're
using DBI::Proxy or www.openlinksw.com's software instead of OOB server,
if they were to run a query similar to this one and see if it works then
I could at least figure out if it's an easysoft problem or a DBI one or
whatever.

Any ideas/suggestions welcome...

Thanks,
Kathryn.


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

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


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