[16039] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3451 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 22 09:05:31 2000

Date: Thu, 22 Jun 2000 06:05:14 -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: <961679113-v9-i3451@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 22 Jun 2000     Volume: 9 Number: 3451

Today's topics:
        'Wilderness' <internet@network-services.fsnet.co.uk>
    Re: 'Wilderness' (Rafael Garcia-Suarez)
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
    Re: Activeware Perl and Windows 2000 <jtalbain@nospam.kimochi3d.com>
    Re: Creating a cause from information. nobull@mail.com
    Re: Creating a cause from information. malverian@my-deja.com
    Re: Creating a cause from information. malverian@my-deja.com
    Re: Creating a cause from information. <claytons@americasm01.nt.com>
    Re: Creating a cause from information. (Anno Siegel)
        Detecting errors when embedding perl into c <steved@no-spam-please.writeme.com>
    Re: Directory spaces causing problems? (Tad McClellan)
    Re: Do any of you know how to do this? <gellyfish@gellyfish.com>
    Re: Do any of you know how to do this? <bill.kemp@wire2.com>
    Re: GCC Installation <gellyfish@gellyfish.com>
        Good Win32 Perl books for UNIX Perl programme? ddui@iee.org
    Re: Help needed building Perl 5.6 on AIX <jdrumm@blazenetme.net>
    Re: NT or Unix at runtime (Brandon Metcalf)
    Re: Perl 5.6 says 'syntax error', Perl 5.005_03 does no (Anno Siegel)
    Re: Perl contracting <gellyfish@gellyfish.com>
    Re: Perl Debugger <bill.kemp@wire2.com>
    Re: ppm: Can't find unicode character property definiti (Steve A. Taylor)
    Re: Problem installing CPAN Date::Calc <sb@muccpu1.muc.sdm.de>
    Re: Problem installing CPAN Date::Calc <abe@ztreet.demon.nl>
    Re: regex engin's undocumented behaviour? (Tad McClellan)
    Re: Sendmail alternative for win32 <gellyfish@gellyfish.com>
    Re: simple array question <abe@ztreet.demon.nl>
    Re: Simple Reg Expression Question <abe@ztreet.demon.nl>
    Re: SMS help <gellyfish@gellyfish.com>
    Re: Static Vars and ordering of subroutines <W.Hielscher@mssys.com>
    Re: Static Vars and ordering of subroutines (Anno Siegel)
    Re: Where is @INC in ActiveState Perl for Win32 ??????? (Steve A. Taylor)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 22 Jun 2000 13:35:47 +0100
From: "Dave Carney" <internet@network-services.fsnet.co.uk>
Subject: 'Wilderness'
Message-Id: <8it12c$nm2$1@news8.svr.pol.co.uk>

I have been programming(!) in PERL for a few weeks now and, in trying to
walk before I can run have attempted multi-script form processing.
The setup is, a menu is offered (HTML <option>) which works, it has two
variables which are sent to the first of 3 perl progs.  I am trying to pick
up the variables from the data $X=$FORM{'X'} and $Y=$FORM{'Y'} for
argument's sake then I am trying to produce a conditional-driven html page
(on-the-fly) using this data after cross indexing it with info in an ASCII
file (delimited by a colon) $X is OK; $Ydefies all attempts at me trying to
get it to work.  I will be most grateful for any info leading to the demise
of this problem.  It is possible that I could spare the cash for a tutorial
on the matter.





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

Date: Thu, 22 Jun 2000 12:49:44 GMT
From: garcia_suarez@hotmail.com (Rafael Garcia-Suarez)
Subject: Re: 'Wilderness'
Message-Id: <slrn8l432t.bbl.garcia_suarez@rafael.kazibao.net>

Dave Carney wrote in comp.lang.perl.misc:
>I have been programming(!) in PERL for a few weeks now and, in trying to
>walk before I can run have attempted multi-script form processing.
>The setup is, a menu is offered (HTML <option>) which works, it has two
>variables which are sent to the first of 3 perl progs.  I am trying to pick
>up the variables from the data $X=$FORM{'X'} and $Y=$FORM{'Y'} for

Looks like you're using the old cgi-lib.pl or some other homegrown method.
Learn to use CGI.pm. It is probably already installed on your system.
Lots of docs can be found about this module: its manpage, tutorials on
the web (look at www.perl.com), etc. CGI.pm is robust, easy to use, and
avoids many common bugs encountered in custom form-processing CGI scripts.

>argument's sake then I am trying to produce a conditional-driven html page
>(on-the-fly) using this data after cross indexing it with info in an ASCII
>file (delimited by a colon) $X is OK; $Ydefies all attempts at me trying to
>get it to work.  I will be most grateful for any info leading to the demise
>of this problem.  It is possible that I could spare the cash for a tutorial
>on the matter.

-- 
Rafael Garcia-Suarez


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

Date: Thu, 22 Jun 2000 10:23:01 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage961669450.29173@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 29 Apr 2000

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last _major_ update of the Perl FAQ was in Summer
of 1998; of course, ongoing updates are made as needed. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

    http://www.cpan.org/doc/FAQs/

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

For an alternative way to get answers, check out the Perlfaq website.

    http://www.perlfaq.com/

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://www.cpan.org/
    http://www.perl.com/CPAN/
    http://www.cpan.org/doc/FAQs/FAQ/html/
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

Have fun with Perl!

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


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

Date: Thu, 22 Jun 2000 20:07:40 +0800
From: "Kimochi3D" <jtalbain@nospam.kimochi3d.com>
Subject: Re: Activeware Perl and Windows 2000
Message-Id: <8isv4v$3ma$1@coco.singnet.com.sg>

Tom, Murat,
Thank you both for your assistance!

Murat:
I tried as you suggested, but the file types seems to be correctly
associated.......

Tom,
I tried this:

@key_names = keys(%ENV);

print "key names are: @key_names";

foreach $key(@key_names)
{
print "$key = $ENV{'$key'}\n";

}

On my virtual server (apache, solaris), it prints out all the unix variables
correctly as it should. However, on my win2k box, it prints out the
environment variables, but there are no values in them!!

Oh well, look like I'm stuck to a very long telnet session everynight!

Regards,
~Alvin

"Murat Uenalan" <murat.uenalan@sietec.de> wrote in message
news:3950F1A5.1D133678@sietec.de...
> Be sure that you have a correct file-association for perl ! Seems like you
have
>
> it on your w95, but not on w2k !!
>
> Follow this w2k shell procedure:
>
> C:\users\murat.uenalan\perltools\remote>assoc .pl
> .pl=perlfile
>
> C:\users\murat.uenalan\perltools\remote>ftype perlfile
> perlfile=c:\programme\perl\bin\perl "%1" %*
>
> Cheers,
> Murat
>




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

Date: 22 Jun 2000 11:06:11 +0100
From: nobull@mail.com
Subject: Re: Creating a cause from information.
Message-Id: <u9snu658to.fsf@wcl-l.bham.ac.uk>

malverian@hotmail.com writes:

>    if ($data =~ /^5 $thing/i)
>    {
>       #etc...
> 
> In this example, if  $thing = "144K*900\"  it would crash saying it had
> a failure with * in regexp, or something similar.

if ($data =~ /^5 \Q$thing/i)

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Thu, 22 Jun 2000 11:20:10 GMT
From: malverian@my-deja.com
Subject: Re: Creating a cause from information.
Message-Id: <8issp0$rt0$1@nnrp1.deja.com>


> if ($data =~ /^5 \Q$thing/i)
>

When I use this example, it just fails to notice any of them, it used
to work if they didn't contain any *, $, (, ), \, etc.
Now it just doesn't respond to it at all.


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


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

Date: Thu, 22 Jun 2000 11:23:19 GMT
From: malverian@my-deja.com
Subject: Re: Creating a cause from information.
Message-Id: <8issus$rv4$1@nnrp1.deja.com>

Nevermind.. I got it to work. I had it set to use

if ($data =~ /^5 \Q$thing .+/i)

I just took the .+ out and it worked fine, thanks alot =)


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


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

Date: Thu, 22 Jun 2000 08:29:52 -0400
From: Clayton Scott <claytons@americasm01.nt.com>
Subject: Re: Creating a cause from information.
Message-Id: <395206C0.B6CDA88A@americasm01.nt.com>

malverian@my-deja.com wrote:
> 
> Nevermind.. I got it to work. I had it set to use
> 
> if ($data =~ /^5 \Q$thing .+/i)
> 
> I just took the .+ out and it worked fine, thanks alot =)

	If you want to use the ".+" :

		if ($data =~ /^5 \Q$thing\E.+/i){...}

	perlodc perlre for more details

Clayton


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

Date: 22 Jun 2000 12:58:40 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Creating a cause from information.
Message-Id: <8it2i0$mje$1@lublin.zrz.tu-berlin.de>

 <malverian@hotmail.com> wrote in comp.lang.perl.misc:
>Sorry for the abstract subject, it was the best way I could think to
>state it.
>
>I have a Perl program that connects to a computer and recieves
>information from it constantly.
>
>while(<SOCK>)
>{
>   $data = <SOCK>;
>   #etc...

You *are* aware that you're throwing away a line from SOCK each time
through the loop?  It might be okay, but you may want to work with
$_ instead of reading a new line into $data.

Others have answered your regex question, which I snipped.

Anno


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

Date: Thu, 22 Jun 2000 21:44:18 +1000
From: "Steve Dalton" <steved@no-spam-please.writeme.com>
Subject: Detecting errors when embedding perl into c
Message-Id: <3951fc83$0$16992$7f31c96c@news01.syd.optusnet.com.au>

Hi,
I have been successfully using perl from a C++ program for some time now,
using the method described in the perlembed man page. The code is pretty
basic, just evaluating a small section of perl, built dynamically from a
database. There is a slight chance under some circumstances that a
divide-by-zero error (or similar) error could occur in the perl code --
currently the whole program just terminates displaying the perl error
message when this happens.

I have searched the man pages for a way of trapping the perl errors in the
C++ program, but have found nothing. Does anyone have any ideas? How does
the perl interpreter terminate my program? It doesn't appear to use signals
as I do not get any other error messages apart from the perl message.

Any help would be much appreciated.
Regards,
Steve

--
___________________________
Steve Dalton
Sydney, Australia




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

Date: Thu, 22 Jun 2000 05:53:22 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Directory spaces causing problems?
Message-Id: <slrn8l3s12.sk.tadmc@maxim.metronet.com>

On 22 Jun 2000 03:29:55 GMT, Tina Mueller <tina@streetmail.com> wrote:
>hi,
>
>Tom Phoenix <rootbeer@redcat.com> wrote:
>> On Tue, 2 May 2000, Tina Mueller wrote:
>
>>> maybe you have to put in a backslash to escape the
>>> whitespace:
>>> $file = "School\ Trips";
>
>> There's no backslash in that string; see the perlop manpage for more
>> information. Cheers!
>
>hm, probably i'm a little bit late with this, but why
>does this work then? 


It also works without the backslash, so you don't "have to"
put in a backslash.


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 22 Jun 2000 10:35:49 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Do any of you know how to do this?
Message-Id: <9_l45.592$My4.58170@news.dircon.co.uk>

On Wed, 21 Jun 2000 22:45:12 -0700, psycho Wrote:
> does any one know how to do something like this? <img
> src="cgi_file.cgi"> and then the cgi shows an image.
> 

Yes.  Ask in comp.infosystems.www.authoring.cgi.


/J\


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

Date: Thu, 22 Jun 2000 12:33:58 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Do any of you know how to do this?
Message-Id: <961673761.28635.0.nnrp-01.c3ad6973@news.demon.co.uk>

<snip>

>!#chitty/chitty/bang/bang/purl
>
>use LWP etc.. ever so simple;
>
>$picture = get ("whatever address");


The above complicates things slightly, as it is possible that the questioner
wants to just read the picture off the disk.

>
>print "Content-Type: image/jpeg\n\n";
>
>print $picture;





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

Date: Thu, 22 Jun 2000 10:23:47 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: GCC Installation
Message-Id: <TOl45.588$My4.58170@news.dircon.co.uk>

On Thu, 22 Jun 2000 17:13:49 +0800, Kig-Keat Yong Wrote:
> This is a multi-part message in MIME format.
> --------------2A9D611896F3BAC1EFE11DFE
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 

Dont do that this is a plain text medium.

> Hi,
> 
>         I found some difficulties when installing Apache..it requires
> Perl and GCC.
> When i want to install GCC..there several stages need togo through..
>     install a precomplied GNU C compliler
>     install GNU make
>     use those to complile the current GCC suite
> 
> but when i in stage 2..there is the problem i facing...
> 

You've got me beat - if you have a problem installing Apache you might ask
in comp.infosystems.www.server.unix, if you have a problem installing gcc
then you should ask in an appropriate newsgroup for your OS.  If you have
a Perl question then ask it here.

/J\


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

Date: Thu, 22 Jun 2000 12:41:10 GMT
From: ddui@iee.org
Subject: Good Win32 Perl books for UNIX Perl programme?
Message-Id: <8it1h3$v8n$1@nnrp1.deja.com>

One question:

I have already experience with Perl on UNIX. I'll have to use Perl on
Windows. What is a good book to learn the differences between Win32 and
UNIX.

I was thinking to get O'Reilly "Learning Perl on Win32 Systems", but I
have heard that it is much like "Learning Perl" (the llama book), not
very Win32 specific and therefore not great for someone that knows Perl
already.

Any suggestion?

Daniel


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


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

Date: Thu, 22 Jun 2000 06:17:43 -0400
From: Jeffrey Drumm <jdrumm@blazenetme.net>
Subject: Re: Help needed building Perl 5.6 on AIX
Message-Id: <kmp3ls096nkbkfej4nkeiahsrm6u0glqii@4ax.com>

On Thu, 22 Jun 2000 01:34:39 GMT, Tom Williams
<tom.williams@diversifiedsoftware.com> wrote:

>Hi!  I'm trying to build Perl 5.6 from source on AIX 4.3.1 and the
>Configure script hangs because I don't have any man pages installed in
>source form.
>
>Is there a way to get around this (besides installing the man pages in
>source form)?
>
>Thanks in advance for your time!

How did you determine that the lack of man pages was the problem?

I actually suspect that your C compiler may not have its license key
installed . . . I've built Perl 5.x (including 5.6) on AIX 4.3.x a number
of times and the only instance where I encountered a hang during configure
was when the C compiler hadn't been enabled.

-- 
 - Jeff Drumm


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

Date: 22 Jun 2000 09:50:09 GMT
From: bmetcalf@baynetworks.com (Brandon Metcalf)
Subject: Re: NT or Unix at runtime
Message-Id: <8isngh$ofq$1@bcrkh13.ca.nortel.com>

lwaibel@cwia.com writes:

 > In article <8io8j8$iq7$1@bcrkh13.ca.nortel.com>, Brandon Metcalf wrote:
 > > Don't use the Perl distribution that comes with clearcase.  It's old and
 > > incomplete.  Install your own.
 > >
 > But that would mean that all the client users would have to install Perl as 
 > well and ClearCase.  Using what comes with it means the triggers will work 
 > since it's already installed.

Err...  nfs, nt shares...

Brandon


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

Date: 22 Jun 2000 11:20:31 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl 5.6 says 'syntax error', Perl 5.005_03 does not
Message-Id: <8isspv$md4$1@lublin.zrz.tu-berlin.de>

Matthew O. Persico  <persicom@acedsl.com> wrote in comp.lang.perl.misc:
>In article
><Pine.GSO.4.10.10006211333240.4312-100000@user2.teleport.com>,
>  Tom Phoenix <rootbeer@redcat.com> wrote:
>
>> I suspect that the DWIMmer in 5.6.0 is confused and thinks that you
>> want { 1, $_ } to be an anonymous hashref.
>
>I'd call it more like BORKEN [sic] than confused. I cannot think of a
>time where that would ever want to be a hash ref. Can you?

Why on earth not?  Building a LoH via map is a common thing.  In fact
it is hard to see what good a block { 1, $_ } should do in this place.
Its value is the last statement executed, i.e. $_.  So the map, in this
interpretation, does nothing but copy @_, which can be had cheaper.

But that's not for the compiler to decide.  It should take the hint
from the presence or absence of a comma after the closing }.  With
a comma, {} should be an expression, hence a hashref.  Without it
it should be a block (which does nothing much).

Neither 5.003 nor 6.0 fulfill these expectations.

5.003 tends to prefer the block interpretation: map { 1, $_} @_;
copies @_, as it should, but map { 1, $_}, @_; is a syntax error.
You must force the hashref interpretation with map +{ 1, $_}, @_;

5.6, in contrast, is happy to take an expression: map { 1, $}, @_;
gives the expected LoH, while, as we know, map { 1, $_} @_; is a
syntax error (but shouldn't be).  The functionally equivalent
(and equally useless) map { 1; $_} @_; does the block interpretation.
It seems that the use of the comma operator in a bare block
throws it.

Anno


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

Date: Thu, 22 Jun 2000 10:26:27 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl contracting
Message-Id: <nRl45.589$My4.58170@news.dircon.co.uk>

On Thu, 22 Jun 2000 10:05:41 +0100, Haris Siakalis Wrote:
> Hello,
> does anyone know if anywhere on the net there are demo contracts for
> people doing perl work? Could it be possible for somebody to send me

I would ask in the group uk.jobs.d as it is unlikely to be language dependent.


/J\


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

Date: Thu, 22 Jun 2000 12:37:02 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Perl Debugger
Message-Id: <961673942.28708.0.nnrp-01.c3ad6973@news.demon.co.uk>


Paul Eckert wrote in message <3951353B.65B7507B@epicrealm.com>...
>spurcell wrote:
>>
>> Does anyone know how I can simply walk through a script, and check out
the
>> values of variables, and also those of anonymous variables?
>
<snip>
as previous, but my favourite is "h h" for brief help and "h" for longer
help.
I tend to use "s" and "r" alot




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

Date: Thu, 22 Jun 2000 11:32:16 GMT
From: an400@freenet.carleton.ca (Steve A. Taylor)
Subject: Re: ppm: Can't find unicode character property definition
Message-Id: <3951f1ce.3291769@news.ncf.carleton.ca>

On Thu, 22 Jun 2000 19:13:59 +1000, "Peter G. Martin"
<peter@accesss.com.au> wrote:

>
>
>Thilo Opaterny wrote:
>> 
>> Hallo alltogether
>> 
>> I tried
>>     H:\X\PROG\perl>ppm install Tk
>> and get
>>     Can't find unicode character property definition via main->R or R.pl at
>> unicode/Is/R.pl line 0
>> 
>> History:
>> NT4.0Sp6
>> installed ActivePerl 5.6.0.613 and it works (despite MSI)
>> made a local repository, since targetmachine in not really on the net
>> setted HTTP_PROXY
>> adjusted PPM to a local repository
>> installed PPM 1,1,4,0 with "ppm install ppm", works too (getting euphoric)
>> installed TK 800,022,0,0 mit "ppm install Tk" but all I get is the error
>> message (coming down hard)
>> 
>> there is a directory with lot of unicode stuff, but there is no "R.pl".
>> There is a make*, that does a lot of things, but it does not generate
>> "R.pl". It should be not a simple installation problem, since the message
>> comes from deep inside ppm.
>> 
>> Who has a hint for me
>
>More like a "me too", I'm afraid....    the same thing breaks my
>attempts
>to rebuild a perlindex database, dammit !    This time, it's main->E or
>E.pl
>or somesuch.

I traced that back to a regex in ExtUtils::Installed.pm. The regex and
pattern may be causing the problem. This is a "diff" of Installed.ori
/ Installed.pm

70,71c70,80
<    $module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!s;
<    $module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!s;
---
>    $module =~ s!\\!/!g; # added conversion of \ to /
> 
>    # capture variables before regex processing and convert backslashes
>    # to eliminate error message/bug:
>    # Can't find unicode character property definition via main->R or R.pl 
>    my $archlib=$Config{archlib};
>    $archlib =~s!\\!/!g;
>    $module =~ s!$archlib/auto/(.*)/\.packlist!$1!s;
>    my $sitearch=$Config{sitearch};
>    $sitearch =~s!\\!/!g;
>    $module =~ s!$sitearch/auto/(.*)/\.packlist!$1!s;


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

Date: 22 Jun 2000 10:16:28 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: Re: Problem installing CPAN Date::Calc
Message-Id: <8isp1s$mt8$1@solti3.sdm.de>

In article <8irr1f$4p7$1@nnrp1.deja.com>, aphiny6592@my-deja.com wrote:

> When I input the first command "perl makefile.pl" to generate the
> makefile.  I get the following errors:

> Bad command or file name
> Bad command or file name
> Bad command or file name

> Unable to find a perl 5 (by these names: C:\Perl\bin\Perl.exe miniperl
=========================
!!!!!!!!!!!!!!!!!!!!!!!!!

> perl perl5 perl5.6.0, in these dirs: C:\PERL\BIN C:\PERL\BIN
> C:\MATLAB\BIN C:\WINDOWS C:\WINDOWS C:\WINDOWS\COMMAND C:\Perl\bin)
> Writing Makefile for Date::Calc

> I am running Windows 98.
> I have tested the module with my perl build on Solaris and it works
> with no problems.

> I have no idea what the problem is.  Any suggestions?

> Thanks,
> Yin

You have to install Perl first!

Moreover, you'll need the Win NT or 4DOS command shell to compile
this module, as well as a C compiler.

Maybe you may want to try the plain Perl version of Date::Calc,
see also my download page (URL see my sig below).

Good luck!
-- 
    Steffen Beyer <sb@engelschall.com>
    http://www.engelschall.com/u/sb/whoami/ (Who am I)
    http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
    http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)


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

Date: Thu, 22 Jun 2000 13:29:02 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Problem installing CPAN Date::Calc
Message-Id: <8rt3lsgnfa9vkonig3kkdqbblbbiha082f@4ax.com>

On Thu, 22 Jun 2000 01:44:17 GMT, aphiny6592@my-deja.com wrote:

> When I input the first command "perl makefile.pl" to generate the
> makefile.  I get the following errors:

That has been answered.
> 
> I am running Windows 98.
> I have tested the module with my perl build on Solaris and it works
> with no problems.
> 
> I have no idea what the problem is.  Any suggestions?

Yep, start the PPM program that comes with ActivePerl.
and type at the PPM> prompt:

	install Date-Calc


-- 
Good luck,
Abe


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

Date: Thu, 22 Jun 2000 05:48:07 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: regex engin's undocumented behaviour?
Message-Id: <slrn8l3rn6.sk.tadmc@maxim.metronet.com>

On Thu, 22 Jun 2000 08:29:11 GMT, victor@catchacorp.com 
   <victor@catchacorp.com> wrote:
>$_=aabbaa;


barewords are bad.

use strict;


>/^(aa(bb)?)+$/;
>print $1; # you will get 'aa'


That is a clue.

If the optional 'bb' _was_ part of the match, then $1 should be 'aabb',
because the 'bb' is inside the first set of parens.

So, the 'bb' part must have not matched.


>print $2; # should output 'bb'?? but is empty


It is undef, not the empty string (but you already knew that
because you wouldn't have posted without first trying it with
-w and use strict).


>i think perl is somewhat confused by the combination of '?' and '+'. 


I think the perl programmer is somewhat confused by the 
combination of '?' and '+'.    :-)

aabbaa
^^^^

That much matches, then the engine needs to start over again
because it is not yet at end-of-string.

The dollar-digit variables are reset to undef when it starts over.

aabbaa
    ^^

That matches the second time around (allowed by the +).

Perl is _supposed_ to set the dollar-digit variable to undef
when that part of the pattern does not match.

What is it that is undocumented?


>my
>solution:
>/^(aa(bb)?)(aa(bb)?)?$/; # unambiguous.
>
>any better solution?


Perhaps, but it is unclear what it is that you want.

perl is doing what you asked it to do.

If you want it to do something else, you need to ask it 
to do something else.    :-)


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 22 Jun 2000 10:28:32 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Sendmail alternative for win32
Message-Id: <kTl45.590$My4.58170@news.dircon.co.uk>

On Thu, 22 Jun 2000 07:30:43 +0100, localhost2000 Wrote:
> Could someone please take some time to recomend an alternative mail program.
> I am running Xitami server on a win98 box.

Ask in some group that discusses e-mail programs.

If you want to send mail from a perl program you might see the item in
perlfaq9 that discusses this or search for a suitable module at CPAN
<http://search.cpan.org>

/J\


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

Date: Thu, 22 Jun 2000 12:16:48 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: simple array question
Message-Id: <9qo3ls8tjvtg5t57nojp6qnk48r77bh5at@4ax.com>

On Thu, 15 Jun 2000 12:44:34 +1000, "Phil Sutcliffe" <ils@gil.com.au>
wrote:

> Hi,
> 
> Consider this.
> 
> @fields=("GBH","QLD","1234");
> 
> @names=("\$company","\$state","\$postcode");
> 
> Is there a way to get "GBH" into variable $company without using loops.
> 
> I realise I can do this
> 
> ${$names[0]} = $fields[0];

You seem to be hard to please :-)
I think it should be obvious by now why not to use sym-refs.
You don't want to use a hash and you don't want a loop (although I can't
think of any reason why).

So I'll suggest using proper _hard_ references (but you'll need a loop
even though it's on one line :-)

	#!/usr/bin/perl -w
	use strict;

	my($company, $state, $postcode);
	my @names = \($company, $state, $postcode);
	my @fields = qw(GBH QLD 1234);

	${$names[$_]} = $fields[$_] for 0..$#names;

	print "$company\n$state\n$postcode\n";

	__END__


-- 
Good luck,
Abe


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

Date: Thu, 22 Jun 2000 13:12:10 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Simple Reg Expression Question
Message-Id: <ngs3ls4pbvvm4fafmuv1kah9tmg6337sqa@4ax.com>

On Thu, 22 Jun 2000 08:00:56 GMT, bart.lateur@skynet.be (Bart Lateur)
wrote:

> Abe Timmerman wrote:
> 
> >my $ID = ' DA86E130-470E-11D4-9F14-0080ADC93510';
> >
> >my @hexid = map "0x$_" =>
> >	(unpack 'aa8aa4aa4aa2a2aa2a2a2a2a2a2', $ID)[1,3,5,7,8,10..15];
> 
> I think you should look at the "x" datatype in pack/unpack.
> 
> my @hexid = map "0x$_", unpack 'xa8xa4xa4xa2a2xa2a2a2a2a2a2', $ID;

Yep, I solved it by removing those chars from the string (my other
post), but this looks a more general solution. Better to not change the
original data if one can avoid it.

Thanks.

-- 
Good luck,
Abe


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

Date: Thu, 22 Jun 2000 11:21:30 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: SMS help
Message-Id: <_Em45.594$My4.58585@news.dircon.co.uk>

[ Radical jeopardectomy performed ]

On Wed, 21 Jun 2000 16:24:48 -0600, Jim Wrote:
> "David Fleet" <dfleet@avaterra.com> wrote in message
> news:3950df54_2@nnrp1.news.uk.psi.net...
>> "Jim" <j@iforgot.net> wrote in message
>> news:3950d20a$0$17334@news.denver1.Level3.net...
>> > "David Fleet" <dfleet@avaterra.com> wrote in message
>> > news:3950ce63_1@nnrp1.news.uk.psi.net...
>> >
>> > > Anyone know if it's possible to send SMS by Perl?
>> > 
>> > Yes, it is possible to send SMS jobs through Perl.  Learn more
>> > about SMS and the solution will present itself.  I can't send you
>> > the source I developed as it belongs to my employer.
>> >
>> 
>> Thankyou for your quick reply.
>>
>> Do I need any specific hardware apart from a server, or is it just
>> port and socket programming?
>>
> 
> The easiest way to get SMS to work is to write an app that'll add the
> appropriate records to the SMS database.  That way, SMS can manage
> replicating the application out to the appropriate site servers and
> the like.  Read as much as you can about SMS before you begin, because
> SMS (espescially version 1.2) is bad about database inconsistency.
>
> SMS isn't about ports and sockets.  You'll be using ODBC or some other
> SQL module (depending in your target platform for this app) to talk
> to the database, and that's about it outside of the user interface.


I have sorted out the mess of the previous posts in order that the assembled
usenauts can savour the magnitude of the misunderstanding here.  The OP is
asking about SMS - Short Message Service and Jim is replying about SMS -
System Management Server.  Slightly different things I think we'll agree.

As far as I can determine there are no modules for SMS on CPAN.  You might
want to look at the 'smsclient' software written in C and use that from
your Perl program - use a good search engine to find it.  If you must do
it in pure Perl you are going to have to cause a modem to dial the 
appropriate number for your mobile phone provider and send stuff using the
appropriate protocol, other than looking at what it says in the FAQ about
talking to a serial device you are basically on your own with your
favourite search engine.  If you do write this in Perl be sure to make a
properly documented module and submit it to CPAN.

/J\


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

Date: Thu, 22 Jun 2000 13:29:57 +0200
From: Wolfgang Hielscher <W.Hielscher@mssys.com>
Subject: Re: Static Vars and ordering of subroutines
Message-Id: <3951F8B5.81FA5918@mssys.com>

Ala Qumsieh wrote:
> Yes, I am aware of that. Variable definition happens at compile-time,
> while the actual initialization happens at run-time. Actually, my
> question was to see whether people think this is "correct" behaviour or
> not.

Ah, now I see what you're aiming at...
By stating that "my $static_x=3;" is the same thing as writing a
declaration and an assignment I hoped to show that there is nothing like
an implicitly performed "initalization". It's just an assignment being
executed when the program reached this line. Nothing more.

For me, this is perfectly alright, just the things I expect to happen
actually happen. (The only thing I'm not quite happy with is
incrementing an uninitialized scalar.) If I want anything to be
initialized, I put the appropriate  _assignments_ at the beginning of my
code or in the BEGIN-subroutines of my packages.


> On the other hand, I see BIG obfuscation potential here :-)

Then you're on the right way to understand why things are as being
described. ;-)


Cheers
	Wolfgang


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

Date: 22 Jun 2000 11:57:57 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Static Vars and ordering of subroutines
Message-Id: <8isv05$mfd$1@lublin.zrz.tu-berlin.de>

Ala Qumsieh  <aqumsieh@hyperchip.com> wrote in comp.lang.perl.misc:

>Yet it seems like a bug to me. Let's look at the code again:
>
>        my $x = getNextX();
>        print "X is $x.";
>        {
>                my $static_x = 3;
>
>                sub getNextX {
>                        return ++$static_x;
>                }
>        }
>        __END__
>
>The value of the global $x variable is the return value of the
>subroutine getNextX(). This, in turn, depends on the value of the
>lexically-scoped variable $static_x. It doesn't seem "correct" that perl
>would evaluate the subroutine, and return a value, before completely
>evaluating its context. I know that, at that point, the interpreter
>hasn't yet seen the initialization step, but I think perl should step
>back, and look at the whole context.

A bug?  Certainly not, because the behavior you require is nowhere
documented.  But I doubt that this would be a desirable feature.
I'd hate to break sequential execution more than absolutely necessary.
When should the "context" be executed?  Each time the sub is called?
Only the first time?  Only if it hasn't been run before?  And what
would constitute the context?  The surrounding block?  All blocks up
to top level?  The whole file, if there isn't a surrounding block?
It sorta gets messy.

You could always prefix the block in question with BEGIN to force
the execution before the sub is called.  I think that's enough.

>On the other hand, I see BIG obfuscation potential here :-)

Agreed!

Anno


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

Date: Thu, 22 Jun 2000 10:59:40 GMT
From: an400@freenet.carleton.ca (Steve A. Taylor)
Subject: Re: Where is @INC in ActiveState Perl for Win32 ???????
Message-Id: <3951f01f.2861431@news.ncf.carleton.ca>

On Thu, 22 Jun 2000 02:29:35 GMT, Jeff Helman <jhelman@wsb.com> wrote:

>Nick Palmer wrote:
>> 
>> Nobody seems to know the answer to this question.
>
>I do.  Open up a registry editor (regedit or regedt32).  Go to the Local
>Machine structure.  Go to software and add the key "Perl".  Then, in the
>"Perl" key, add a "lib" REG_SZ value that points to whatever directory
>you want.  I use this on all of my servers to keep my modules separate
>from the standard distribution.  Specifically, I have "lib" defined as
>"c:/perl/wlib" on my servers.
>
>Hope this helps.
>JH
> 
>> I've had lots of "It's in the registry somewhere....", "I think it's....",
>> but nobody knows!!!
>> 
>> One suggestion was that it was in the file "Perl\lib\Config.pm"
>> 
>> BUT:
>> 
>> If you delete the file altogether then Perl still knows  information where
>> the debugger is (in the registry) and still knows about @INC (not in the
>> registry)
>> E.g. if I try to debug a program (with Config.pm deleted) I get this
>> message:
>> 
>> -----
>> 
>> perl -d myprog.pl
>> 
>> Can't locate Config.pm in @INC (@INC contains: c:\progra~1\perl\lib
>> C:/Program Files/Perl/lib C:/Program Files/Perl/site/lib .) at
>> C:\PROGRA~1\ACTIVE~1\PerlDB.pl line 84.
>> 
>> BEGIN failed--compilation aborted.
>> 
>> -----
>> 
>> So it still keeps it's original values in @INC.
>> 
>> Incidentally, the entry in @INC reported above, i.e. "c:\progra~1\perl\lib"
>> has been added by putting a value in the Registry
>> 
>> key HKEY_LOCAL_MACHINE\Software\Perl with the name "PERL5LIB" and value
>> "c:\progra~1\perl\lib"
>> 
>> Come on, someone must know!
>> 
>> Yours Sincerely
>> 
>> Nick

REGEDIT4

[HKEY_USERS\.Default\Software\Perl]
@="d:\\perl56\\bin\\perl.exe"
"Path"="d:\\perl56\\bin"
"TERM"="Win32"
-----------------------
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Perl]
@="d:\\perl56"
"bindir"="d:\\perl56\\bin"
"lib"="d:\\server\\lib"
-----------------------

Those are two of the files. Save as name.reg and import to registry --
using the paths you want

Also, you may need to text scan all config.pm files in your perl
directories. The config data hangs around in dark corners. Sometimes
you can use the Home/.cpan/Cpan/MyConfig.pm or Prefix option to pass
new config arguments.




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

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


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