[15740] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3153 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 24 18:20:54 2000

Date: Wed, 24 May 2000 15:20:32 -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: <959206832-v9-i3153@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 24 May 2000     Volume: 9 Number: 3153

Today's topics:
    Re: Perl Extention <rootbeer@redcat.com>
    Re: Perl Extention <tony_curtis32@yahoo.com>
    Re: Perl, system and Cron <rootbeer@redcat.com>
        Perl: using exec function <yesmail_99NOyeSPAM@yahoo.com.invalid>
        Sorting a Database jzoetewey@my-deja.com
    Re: SV: Accounting Systems Written In Perl??? (Mark P.)
    Re: valid email address <rootbeer@redcat.com>
    Re: valid email address <lr@hpl.hp.com>
    Re: valid email address (John Stanley)
    Re: what should i read next?? (Clinton A. Pierce)
        Where is the Perl 5.6 bug list? <sergei_kucherov@3com.com>
    Re: Where is the Perl 5.6 bug list? <Jonathan.L.Ericson@jpl.nasa.gov>
    Re: where to find lanman.pm? <rootbeer@redcat.com>
    Re: where to find lanman.pm? <carvdawg@patriot.net>
    Re: where to find lanman.pm? <carvdawg@patriot.net>
    Re: where to find lanman.pm? <rootbeer@redcat.com>
    Re: Writing a concurrent server in perl hritzman@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 24 May 2000 13:24:16 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl Extention
Message-Id: <Pine.GSO.4.10.10005241323540.14618-100000@user2.teleport.com>

On Wed, 24 May 2000, Mario Lambert wrote:

> excuse me !!!
> 
> i forgot my coor.

Must be a coor dump.

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 24 May 2000 16:15:19 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Perl Extention
Message-Id: <873dn7ira0.fsf@limey.hpcc.uh.edu>

>> On Wed, 24 May 2000 13:24:16 -0700,
>> Tom Phoenix <rootbeer@redcat.com> said:

> On Wed, 24 May 2000, Mario Lambert wrote:
>> excuse me !!!
>> 
>> i forgot my coor.

> Must be a coor dump.

You'll need the Coors::Lite module then.

t



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

Date: Wed, 24 May 2000 11:06:44 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl, system and Cron
Message-Id: <Pine.GSO.4.10.10005241103410.14618-100000@user2.teleport.com>

On Wed, 24 May 2000, e8825393 wrote:

> open(FILE, $f);

Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.

> open(FILE, "> $f");

I think you may need use the methods in Randal's fourth Web Techniques
column, which explains how to use flock() to avoid problems when multiple
processes need to modify one file.

   http://www.stonehenge.com/merlyn/WebTechniques/

> everything works fine (from commandline), since I try to run the script from
> Cron, 

Generally, when a program that works at the command line doesn't work the
same way under cron, it's relying upon something in the environment - an
environment variable, or the current directory, or something like that.

Go through the program and look for anything which may be doing this,
including external programs which your program runs.

Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 24 May 2000 15:00:10 -0700
From: yasin <yesmail_99NOyeSPAM@yahoo.com.invalid>
Subject: Perl: using exec function
Message-Id: <04f036e0.d19e96ea@usw-ex0107-049.remarq.com>


Hi,

I have a perl code sitting on the server and it executes evrytime time
it is prompted and the output it generates is placed in a file on the
server in the cgi-bin directory. Now, the file gets created and
everything works fine however when I use the function as:

 exec("filename.xml"); # the file contains the xml tags

The perl code runs in a loop and I believe it has a hard time finding
the specified file.

A similar code I place in the c-drive and it works perfectly fine.
Anybody, who has any idea about this please let me know, thanks

Yasin Esmail


* 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: Wed, 24 May 2000 20:37:25 GMT
From: jzoetewey@my-deja.com
Subject: Sorting a Database
Message-Id: <8ghei3$th3$1@nnrp1.deja.com>

This is a continuation of a question I asked earlier this month (Thanks
to all who replied...).

I've got a fixed length database that I need to be able to sort by any
field in the database.  I've read perldoc's information on sort as well
as checking a couple books, but I find myself confused about how to go
about sorting the database.

Alas, it's probably not the fault of the documentation.

A short description of the database:

It's fixed length, including a field for a unique key number as well as
first name, last, organization, address, city, state, and zip.

For sorting purposes I plan to use the unique key number as the hash key
and then use any of the other fields as the value of the hash as
necessary.

Anyway, here's the way that I was thinking of sorting the database:

1. Read values and keys from the database using unpack.
2. Sort the values via the sort function.
3. Somehow use the keys of the sorted values to determine the order of
the database (not sure exactly how I'd do this...).

Thus, its not really the sorting I'm confused about, I think.  I must
have missed some easy, obvious concept related to hashes.

If you've got an insight as to what I don't understand, I welcome your
comments.

Jim Zoetewey


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


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

Date: Wed, 24 May 2000 18:23:48 GMT
From: perl@imchat.com (Mark P.)
Subject: Re: SV: Accounting Systems Written In Perl???
Message-Id: <392c1dc0.91696602@news.ionet.net>

On Wed, 24 May 2000 07:24:14 GMT, "Thomas Åhlen" <thomas2@dalnet.se>
wrote:

>Check out http://www.webmin.com/webmin
>
What does webmin have to do with accounting? I run webmin and there
isn't an accounting module in it, or made for it!


MP


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

Date: Wed, 24 May 2000 11:32:24 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: valid email address
Message-Id: <Pine.GSO.4.10.10005241122150.14618-100000@user2.teleport.com>

On 24 May 2000, Vivek Khera wrote:

>   return q{You specified an improper Internet email address format.  Please
>            use an address like <KBD>yourname@domain.com</KBD>. If you do not
>            know what your address is, please do not guess or make one up --
>            ask your system administrator what it is.}
>   unless ($addr =~ m/\S+@[\-\w]+\.[\-\w]+/);

So, _this_ address is okay?

    <garbage junk president@whitehouse.com more junk>

Maybe you meant to put anchors around your pattern. But if you did, then
would you say that this address is _not_ valid?

    <fred@anywhere.com.au>

Now, perhaps I'm being unfair; you do have further tests....

>   return q{Email addresses may not have blanks, commas,
>            brackets, colons, or semicolons.  Please go back and correct your
>            address. If you believe your address contains these characters, you
>            are probably mistaken about what your address is.  Please check
>            with your system administrator to find out your proper address.}
>   if ($addr =~ m/[;:,\s\<\>]/);

Oh, you should really check with my friends Fred and Barney about this.
Here's their address; write to them and see what they say!

    < "fred,barney" (Fred and <Barney>; believe it or not!)@redcat.com >

Please, use the standards. Don't make up your own criteria. 

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 24 May 2000 11:31:49 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: valid email address
Message-Id: <MPG.1395bfed74f5c30e98aacc@nntp.hpl.hp.com>

In article <x7hfboj5lb.fsf@onceler.kcilink.com> on 24 May 2000 12:06:08 
-0400, Vivek Khera <khera@kciLink.com> says...
> >>>>> "UG" == Uri Guttman <uri@sysarch.com> writes:
> 
> >>>>> "TEB" == The Evil Beaver <evilbeaver.picksoft@NOSPAMzext.net> writes:
> TEB> /(\w+)\@(\w)(\w+).(\w)(\w+)/
> TEB> or something similar.
> 
> UG> or something wrong. that fails in so many ways such as 3 level
> UG> domain names.
> 
> UG> read the faq on this. email addresses cannot be fully verified. even
> UG> partially verified is difficult.
> 
> In theory yes, but in practicality, this set of matches catches a lot,
> and has had exactly one false-positive match in the 4 years of using
> it (compared against several hundred thousand email addresses people
> really use).

Astounding!  Evidently you aren't concerned about false negatives, such 
as mine:

  lr@hpl.hp.com

Or POP3 accounts hosted from my PC:

  whoever@rosler.hpl.hp.com

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


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

Date: 24 May 2000 18:46:32 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: valid email address
Message-Id: <8gh828$rlq$1@news.NERO.NET>

In article <x7hfboj5lb.fsf@onceler.kcilink.com>,
Vivek Khera  <khera@kciLink.com> wrote:
>In theory yes, but in practicality, this set of matches catches a lot,
>and has had exactly one false-positive match in the 4 years of using
>it (compared against several hundred thousand email addresses people
>really use).

Hmmm. Let's see... (I modified your code to return "ok" when it thought
there was no error.)

stanley@-.-
ok

No, this is patently absurd. 

stanley@[128.193.64.68]
You specified an improper Internet email address format.  Please
           use an address like <KBD>yourname@domain.com</KBD>. If you do not
           know what your address is, please do not guess or make one up --
           ask your system administrator what it is.

No, again patently absurd. That address is quite valid.

stanley@cx.
You specified an improper Internet email address format.  Please
           use an address like <KBD>yourname@domain.com</KBD>. If you do not
           know what your address is, please do not guess or make one up --
           ask your system administrator what it is.

Non-trivially absurd. How do you intend on differentiating between the
"FQDN" 'cx' and the shorthand for cx.localdomain 'cx' unless you allow
periods at the end? Note that the mail system accepts @cx. -- and that
is how you differentiate.

stanley <stanley@foo.example>
Email addresses may not have blanks, commas,
           brackets, colons, or semicolons.  Please go back and correct your
           address. If you believe your address contains these characters, you
           are probably mistaken about what your address is.  Please check
           with your system administrator to find out your proper address.

If you believe that email addresses cannot contain the characters you
claim, you are probably mistaken and need to read RFC822.



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

Date: Wed, 24 May 2000 19:36:56 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: what should i read next??
Message-Id: <sbWW4.86485$h01.625659@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <8gg2ek$bof$1@neptunium.btinternet.com>,
	"Todd Carlson" <todd.carlson@bigfoot.com> writes:
> I'm just about finished reading O'Reilly's "Learning Perl on Win32 Systems".
> I am not clear on which book(s) I should move on to next.

Once you've got the fundamentals of Perl down, The Perl Cookbook
provides a bunch of real-life coding problems and solutions with clear
and lucid explanations.  Most of the time.  :)

-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Wed, 24 May 2000 20:38:57 GMT
From: sergei_kucherov <sergei_kucherov@3com.com>
Subject: Where is the Perl 5.6 bug list?
Message-Id: <8gheku$thr$1@nnrp1.deja.com>

Does a bug list for Perl 5.6 exist?
I could not find it on the web.

I would like to look at it before I report a bug.


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


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

Date: Wed, 24 May 2000 14:24:52 -0700
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
Subject: Re: Where is the Perl 5.6 bug list?
Message-Id: <392C48A4.FA963BA3@jpl.nasa.gov>

sergei_kucherov wrote:
> Does a bug list for Perl 5.6 exist?
> I could not find it on the web.
> 
> I would like to look at it before I report a bug.

Bug reports end up posted (and often discused) on the p5p mailing list. 
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/ is the archive
going back to 1995.  I believe that current bugs are tracked at
http://bugs.activestate.com.

Jon
-- 
Knowledge is that which remains when what is
learned is forgotten. - Mr. King


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

Date: Wed, 24 May 2000 13:35:37 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: where to find lanman.pm?
Message-Id: <Pine.GSO.4.10.10005241335030.14618-100000@user2.teleport.com>

On 24 May 2000, Young H Lee wrote:

> Subject: where to find lanman.pm?
> 
> Does anyone know where to find this module? 

Ask whoever told you about it! :-)

But does this do anything for you?

    http://search.cpan.org/search?mode=doc&query=lanman

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 24 May 2000 17:47:32 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: where to find lanman.pm?
Message-Id: <392C4DF4.BA74E9D6@patriot.net>

ppm install http://jenda.mccann.cz/perl/Win32-Lanman.ppd

Young H Lee wrote:

> Does anyone know where to find this module? I looked in cpan and i tried
> to use the "PPM" thing on my command line, all to no avail..  Any help
> would be appreciated.  (This is all on a winNT box)
>
> --
> -----
> Young H. Lee
>
> "Never try to teach a pig to sing.  It wastes your time and annoys the pig."



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

Date: Wed, 24 May 2000 17:49:00 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: where to find lanman.pm?
Message-Id: <392C4E4C.7C83D44E@patriot.net>


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

> But does this do anything for you?
>
>     http://search.cpan.org/search?mode=doc&query=lanman

Probably about as much good as when you ran it, Tom.

Cheers!

Carv


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

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>

<blockquote TYPE=CITE>But does this do anything for you?
<p>&nbsp;&nbsp;&nbsp; <a href="http://search.cpan.org/search?mode=doc&query=lanman">http://search.cpan.org/search?mode=doc&amp;query=lanman</a></blockquote>
Probably about as much good as when you ran it, Tom.
<p>Cheers!
<p>Carv
<br>&nbsp;</html>

--------------5BD4BFFF508533870869DC0A--



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

Date: Wed, 24 May 2000 14:58:39 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: where to find lanman.pm?
Message-Id: <Pine.GSO.4.10.10005241457000.14618-100000@user2.teleport.com>

On Wed, 24 May 2000, H C wrote:

> > But does this do anything for you?
> >
> >     http://search.cpan.org/search?mode=doc&query=lanman
> 
> Probably about as much good as when you ran it, Tom.

Well, since I don't have Windows, it didn't do anything for me. But it did
report something which may or may not have been relevant to the OP's
request. That it might be helpful seemed plausible to me. In fact, it
still does.

Of course, you didn't mean your remark sarcastically, so I won't take it
that way. :-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 24 May 2000 18:10:33 GMT
From: hritzman@my-deja.com
Subject: Re: Writing a concurrent server in perl
Message-Id: <8gh5ua$mnd$1@nnrp1.deja.com>


>
> This is described quite well in 'perlipc'. I suggest you read it if
you
> haven't done so already.
>
> ...
>
> >           $SIG{CHLD} = sub { wait };
>
> You have to reset $SIG{CHLD} after each call to it. So, try the answer
> given in 'perlipc' :
>
>            sub REAPER {
>                $waitedpid = wait;
>                # loathe sysV: it makes us not only reinstate
>                # the handler, but place it after the wait
>                $SIG{CHLD} = \&REAPER;
>            }
>            $SIG{CHLD} = \&REAPER;

Thanks for the pointer to the perl interprocess communications stuff,
unfortunately I get the same behavior using the REAPER that re-installs
itself each time.  I also tried the more elaborate version that they
show using a non-blocking waitpid call in a loop.

Interestingly in re-reading perlipc, they mentioned that
SIG{CHLD} = 'IGNORE' will prevent zombies on some Unix systems.  This
doesn't work on our Dec Alpha (perl version 5.004_04 built for
alpha-dec_osf), but _does_ work on our Solaris system (5.005_03 built
for sun4-solaris).

Any further thoughts, besides getting rid of our Alphas ;-) , would be
welcome.


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


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

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


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