[18169] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 337 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 22 18:07:13 2001

Date: Thu, 22 Feb 2001 15:05:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <982883119-v10-i337@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 22 Feb 2001     Volume: 10 Number: 337

Today's topics:
    Re: (OFF TOPIC) Re: This is driving me nuts and I need  <straith@modusvarious.org>
    Re: (OFF TOPIC) Re: This is driving me nuts and I need  <mischief@velma.motion.net>
    Re: (OFF TOPIC) Re: This is driving me nuts and I need  <straith@modusvarious.org>
        *** DBI module to access MySql under Windows ? *** <whofer@dplanet.ch>
    Re: @x=m//gc doesn't keep pos()? <c_clarkson@hotmail.com>
        can you embed variables inside $ENV{ } evaluations? <no@spam.org>
    Re: can you embed variables inside $ENV{ } evaluations? <no@spam.org>
    Re: can you embed variables inside $ENV{ } evaluations? <c_clarkson@hotmail.com>
    Re: can you embed variables inside $ENV{ } evaluations? <bmb@ginger.libs.uga.edu>
        Console logging under Solaris <richard.meldrum@fmr.com>
    Re: Console logging under Solaris (Chris Fedde)
    Re: Console logging under Solaris <richard.meldrum@fmr.com>
        DB2 Update error -7008 lrep@yahoo.com
    Re: Disabling debugging support in Perl? (Greg Bacon)
    Re: Disabling debugging support in Perl? <Jonathan.L.Ericson@jpl.nasa.gov>
        expression help.... <greg_j_miller@agilent.com>
    Re: expression help.... egwong@netcom.com
    Re: expression help.... <c_clarkson@hotmail.com>
    Re: expression help.... <bmb@ginger.libs.uga.edu>
    Re: expression help.... <godzilla@stomp.stomp.tokyo>
    Re: Free debugger suggestions <mischief@velma.motion.net>
        help with variables in my email <j2lab.nospam@my-deja.com>
    Re: Is a function/class library for processing of SMTP- <a.kupries@westend.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 22 Feb 2001 19:25:14 GMT
From: SJ Straith<straith@modusvarious.org>
Subject: Re: (OFF TOPIC) Re: This is driving me nuts and I need a guru
Message-Id: <973p2q$qq1$1@samba.rahul.net>

Steven Smolinski (reaching for the coffee) wrote:
: Frank Miller <no@email.com> wrote:
:> Once agiain.  Sorry.  The thing I find so strange is that of all the news
:> groups I post to, the most obnoxious ones are the programming and technical
:> ones. 

: I find that good technical groups try to enforce a tiny level of
: professionalism: they don't abide people spouting nonsense; they don't
: abide laziness or cluelessness.  Groups which do not have any standards
: end up being a mass of the blind leading the blind.

Your attitude is why I told someone in one of the soc.* groups
that they should complain about the heated responses some 
people get there.  I told them that if they wanted to see true
"abuse" they should come here and read the responses.

: Not knowing about the FAQ is generally a case of laziness or
: cluelessness.  It keeps getting proven on this ng hundreds of times
: daily.  That there may be the odd exception is unfortunate, but really,
: how remote is it that someone won't know about the FAQ?

: - Type perldoc and read the usage message.  Pointer to the FAQ.

The way the usage message reads, it appears as though one would need
to know exactly what to ask for there.  Some of the RTFF responses 
indicate that the question is a variation on a question in the FAQ.

: - The main perl manpage points to the faq on the first page.

Oh, really?

I just took a look at the main perl manpage accessable from
the shell I'm in and didn't see it in any part of the manpage.
Now this COULD be because the manpage is old, as this cut from 
it seems to indicate,

    24/Mar/96         Last change: perl 5.003 with

even though the version of perl itself is, and I quote:

    This is perl, version 5.005_03 built for sun4-sunos

    Copyright 1987-1999, Larry Wall


: - www.perl.com has "FAQ" on their main navigation.

A lot of people don't think to STFW.  I've had to be reminded of 
this occasionally

: - It's mentioned on this ng several times a day.

That one I won't argue.  In tin, which I commonly use for
reading ngs, all I had to do was type FAQ in the search
and it took me to the first of the FAQ segments.

: - a search for "perl faq" on google yields the thing as the first
:   listing.

See above.

: It's hard work to avoid konwing about the FAQ!

Not quite as hard as you think.  I will say, that while I read
this group I have only asked for help once, maybe twice.  I 
won't do THAT again.  Only my perl programmer roomie is allowed
to heap that kind of abuse on me. <G>

	SJ Straith

-- 
**************************
St Vidicon of Cathode, 
protect me from Murphy.
**************************
Life's too short to suffer
fools gladly.
**************************


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

Date: Thu, 22 Feb 2001 19:52:36 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: (OFF TOPIC) Re: This is driving me nuts and I need a guru
Message-Id: <t9arg4ad1vnm39@corp.supernews.com>

SJ Straith <straith@modusvarious.org> wrote:
> Steven Smolinski (reaching for the coffee) wrote:
> : Frank Miller <no@email.com> wrote:
> :> Once agiain.  Sorry.  The thing I find so strange is that of all the news
> :> groups I post to, the most obnoxious ones are the programming and technical
> :> ones. 

> : I find that good technical groups try to enforce a tiny level of
> : professionalism: they don't abide people spouting nonsense; they don't
> : abide laziness or cluelessness.  Groups which do not have any standards
> : end up being a mass of the blind leading the blind.

From the Perl man page:
    The three principal virtues of a programmer are Laziness, Impatience,
    and Hubris. See the Camel Book for why.

So a little bit of laziness maybe ;-)

> Your attitude is why I told someone in one of the soc.* groups
> that they should complain about the heated responses some 
> people get there.  I told them that if they wanted to see true
> "abuse" they should come here and read the responses.

This isn't a social group. It's about computers, computer languages,
perl, miscellaneous topics about Perl. That what comp.lang.perl.misc
means. We're here to discuss, not to be forgiving of those who
make a mess of the newsgroup.

> : Not knowing about the FAQ is generally a case of laziness or
> : cluelessness.  It keeps getting proven on this ng hundreds of times
> : daily.  That there may be the odd exception is unfortunate, but really,
> : how remote is it that someone won't know about the FAQ?

> : - Type perldoc and read the usage message.  Pointer to the FAQ.

> The way the usage message reads, it appears as though one would need
> to know exactly what to ask for there.  Some of the RTFF responses 
> indicate that the question is a variation on a question in the FAQ.

So look through the perlfaq manpage.

> : - The main perl manpage points to the faq on the first page.

> Oh, really?

On my versions it does. 5.005_03 and 5.6.0

> I just took a look at the main perl manpage accessable from
> the shell I'm in and didn't see it in any part of the manpage.
> Now this COULD be because the manpage is old, as this cut from 
> it seems to indicate,

>     24/Mar/96         Last change: perl 5.003 with

> even though the version of perl itself is, and I quote:

>     This is perl, version 5.005_03 built for sun4-sunos

>     Copyright 1987-1999, Larry Wall

Don't blame others for your outdated documentation. It's free,
it's openly available, and there's nothing stopping you from
downloading (or reading online) more current documentation.
If perl was installed correctly, you should have recent Perl
documentation.

> : - www.perl.com has "FAQ" on their main navigation.

> A lot of people don't think to STFW.  I've had to be reminded of 
> this occasionally

A lot of people don't think in general. Sometimes, people just don't
think about who's going to be the designated driver. Does that mean
it's okay to drive drunk?

> : - It's mentioned on this ng several times a day.

> That one I won't argue.  In tin, which I commonly use for
> reading ngs, all I had to do was type FAQ in the search
> and it took me to the first of the FAQ segments.

There's a newsgroup FAQ, too, which mentions the Perl FAQ. Try
searching for that and reading it, as it is common netiquette to
do before posting, if you have any questions about the newsgroup
policy or need to find resources about Perl to search (like
perl.com if you should happen to actually dare to STFW).

> : - a search for "perl faq" on google yields the thing as the first
> :   listing.

> See above.

See the discussion of driving drunk above.

> : It's hard work to avoid konwing about the FAQ!

> Not quite as hard as you think.  I will say, that while I read
> this group I have only asked for help once, maybe twice.  I 
> won't do THAT again.  Only my perl programmer roomie is allowed
> to heap that kind of abuse on me. <G>

Know the software you are going to use. Read the Free Manual.
Read the Fine Manual. Read the F******* Manual. Then, Read the
Full Manual when you have time.

Chris

-- 
Christopher E. Stith
Where there's a will, there's a lawyer.



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

Date: 22 Feb 2001 20:55:19 GMT
From: SJ Straith<straith@modusvarious.org>
Subject: Re: (OFF TOPIC) Re: This is driving me nuts and I need a guru
Message-Id: <973ubn$rov$1@samba.rahul.net>

Chris Stith (reaching for the coffee) wrote:
: SJ Straith <straith@modusvarious.org> wrote:
:> Steven Smolinski (reaching for the coffee) wrote:
:> : Frank Miller <no@email.com> wrote:

:> :> Once agiain.  Sorry.  The thing I find so strange is that 
:> :> of all the news groups I post to, the most obnoxious ones
:> :> are the programming and technical ones. 

:> : I find that good technical groups try to enforce a tiny level of
:> : professionalism: they don't abide people spouting nonsense; they don't
:> : abide laziness or cluelessness.  Groups which do not have any standards
:> : end up being a mass of the blind leading the blind.

: From the Perl man page:
:     The three principal virtues of a programmer are Laziness, Impatience,
:     and Hubris. See the Camel Book for why.

: So a little bit of laziness maybe ;-)

Hubris definitely. <G>

:> Your attitude is why I told someone in one of the soc.* groups
:> that they should complain about the heated responses some 
:> people get there.  I told them that if they wanted to see true
:> "abuse" they should come here and read the responses.

: This isn't a social group. 

soc. ne social
soc. eq sociology

: It's about computers, computer languages, perl, miscellaneous
: topics about Perl. That what comp.lang.perl.misc means. We're
: here to discuss, not to be forgiving of those who make a mess
: of the newsgroup.

If I respond to this paragraph as I feel it deserves, this will
turn into a flame, which I at least did not intend.

:> : Not knowing about the FAQ is generally a case of laziness or
:> : cluelessness.  It keeps getting proven on this ng hundreds of times
:> : daily.  That there may be the odd exception is unfortunate, but really,
:> : how remote is it that someone won't know about the FAQ?

:> : - Type perldoc and read the usage message.  Pointer to the FAQ.

:> The way the usage message reads, it appears as though one would need
:> to know exactly what to ask for there.  Some of the RTFF responses 
:> indicate that the question is a variation on a question in the FAQ.

: So look through the perlfaq manpage.

Sounds like a good idea.  One problem.  When I type "man perlfaq" I get

"No manual entry for perlfaq."

:> : - The main perl manpage points to the faq on the first page.

:> Oh, really?

: On my versions it does. 5.005_03 and 5.6.0

:> I just took a look at the main perl manpage accessable from
:> the shell I'm in and didn't see it in any part of the manpage.
:> Now this COULD be because the manpage is old, as this cut from 
:> it seems to indicate,

:>     24/Mar/96         Last change: perl 5.003 with

:> even though the version of perl itself is, and I quote:

:>     This is perl, version 5.005_03 built for sun4-sunos

:>     Copyright 1987-1999, Larry Wall

: Don't blame others for your outdated documentation. It's free,
: it's openly available, and there's nothing stopping you from
: downloading (or reading online) more current documentation.
: If perl was installed correctly, you should have recent Perl
: documentation.

Did I say I was blaming anyone?  No.  I was simply showing that
sometimes things aren't as you expect them to be.

As for whether the perl was installed correctly or not, take that
up with my ISP.  I don't, at the moment, have my linux boxen up
with the complete install of the most recent version of perl.  I
am using my shell account with my ISP and their perl installation.

I use what's available.

:> : - www.perl.com has "FAQ" on their main navigation.

:> A lot of people don't think to STFW.  I've had to be reminded of 
:> this occasionally

: A lot of people don't think in general.

I have to agree.  That's why "common sense" isn't.

: Sometimes, people just don't think about who's going to be the
: designated driver. Does that mean it's okay to drive drunk?

Now THAT has to be one of the most ridculous comparisons I have
even seen made in an arguement.

:> : - It's mentioned on this ng several times a day.

:> That one I won't argue.  In tin, which I commonly use for
:> reading ngs, all I had to do was type FAQ in the search
:> and it took me to the first of the FAQ segments.

: There's a newsgroup FAQ, too, which mentions the Perl FAQ. Try
: searching for that and reading it, as it is common netiquette to
: do before posting, if you have any questions about the newsgroup
: policy or need to find resources about Perl to search (like
: perl.com if you should happen to actually dare to STFW).

<G>

:> : - a search for "perl faq" on google yields the thing as the first
:> :   listing.

:> See above.

: See the discussion of driving drunk above.  

<G> See response to the discussion of driving drunk above.

:> : It's hard work to avoid konwing about the FAQ!

:> Not quite as hard as you think.  I will say, that while I read
:> this group I have only asked for help once, maybe twice.  I 
:> won't do THAT again.  Only my perl programmer roomie is allowed
:> to heap that kind of abuse on me. <G>

: Know the software you are going to use. Read the Free Manual.
: Read the Fine Manual. Read the F******* Manual. Then, Read the
: Full Manual when you have time.

You DO realize that reading Manualese is a talent, knack, ability
(pick one) that not everybody has, don't you?

The fact that I can make sense out of most manuals, some of which
really appear to be written with information obfuscation in mind,
doesn't mean that I expect everyone (even other programmers) to
be able to do so.

Do have a good day, won't you?

	SJ Straith

-- 
**************************
St Vidicon of Cathode, 
protect me from Murphy.
**************************
Life's to short to suffer
fools gladly.
**************************


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

Date: Thu, 22 Feb 2001 22:53:59 -0000
From: "Werner Hofer" <whofer@dplanet.ch>
Subject: *** DBI module to access MySql under Windows ? ***
Message-Id: <9741bn$alm$1@duba04h09-0.dplanet.ch>

Hi all

i use Perl and i installed Mysql. My Operating System is Windows NT 4.0.
I would like access from Perl to Mysql. Where can i get the drivers ( DBI &
DBD )
for MySql under Windows ?

Thanks a lot for your help in advance !

Werner





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

Date: Thu, 22 Feb 2001 12:11:26 -0600
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: @x=m//gc doesn't keep pos()?
Message-Id: <BE999BCC6DEB526E.C38C4260EE779204.875891381E3DD790@lp.airnews.net>


John Wiersba <jrw32982@my-deja.com> wrote:
:
: I thought these two lines would be functionally equivalent, but the second
one reports that pos() is undefined.  This seems like a bug to me.  Can
anyone explain?
:
:    $_ = "qrqr"; my @y; push @y, $1 while /(q)/gc; print "<@y> ", pos,
"\n";
:    $_ = "qrqr"; my @x = /(q)/gc; print "<@x> ", pos, "\n";


    I haven't checked the docs to be certain, but I would suspect
that:
'while /(q)/gc' calls match in a scalar context and
@x = /(q)/gc   calls match in a list context.
    I guess that 'pos' isn't maintained in list context, which
would be useless in all but the last pass. To confirm this
assumption replace 'while' with 'for'. For _does_ call
/(q)/gc in list context.


HTH,
Charles K. Clarkson

:
: prints:
:
:    <q q> 3
:    <q q>
:
: (with an uninitialized value warning if -w is used).
:





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

Date: Thu, 22 Feb 2001 14:17:01 -0500
From: "David McMahon" <no@spam.org>
Subject: can you embed variables inside $ENV{ } evaluations?
Message-Id: <973oja$lrj$1@progress.progress.com>


I need to view an environment variable based on a perl variable:

print "$ENV{'$compkeys{$component}_VERSION'}\n";

$compkeys{$component} evaluates to one of perl, perl2, perl3
and there are environment variables in the shell called:

perl_VERSION=1
perl2_VERSION=2
perl3_VERSION=3

The above does not work, but is there a way to make it work
based on your understanding of my requirement?

thx
dave




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

Date: Thu, 22 Feb 2001 14:23:55 -0500
From: "David McMahon" <no@spam.org>
Subject: Re: can you embed variables inside $ENV{ } evaluations?
Message-Id: <973p08$n5o$1@progress.progress.com>


Nevermind...sorry for the noise.

my $compver = $compkeys{$component} . "_VERSION";

and use $ENV{$compver}

d


"David McMahon" <no@spam.org> wrote in message
news:973oja$lrj$1@progress.progress.com...
>
> I need to view an environment variable based on a perl variable:
>
> print "$ENV{'$compkeys{$component}_VERSION'}\n";
>
> $compkeys{$component} evaluates to one of perl, perl2, perl3
> and there are environment variables in the shell called:
>
> perl_VERSION=1
> perl2_VERSION=2
> perl3_VERSION=3
>
> The above does not work, but is there a way to make it work
> based on your understanding of my requirement?
>
> thx
> dave
>
>




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

Date: Thu, 22 Feb 2001 13:45:53 -0600
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: can you embed variables inside $ENV{ } evaluations?
Message-Id: <6C4A562A7C2A2214.8FF87A88DAF2C8F5.6D241387700D3608@lp.airnews.net>


"David McMahon" <no@spam.org> wrote in message
news:973oja$lrj$1@progress.progress.com...
:
: I need to view an environment variable based on a perl variable:
:
: print "$ENV{'$compkeys{$component}_VERSION'}\n";

    Try:

print "$ENV{$compkeys{$component} . '_VERSION'}\n";

HTH,
Charles K. Clarkson

:
: $compkeys{$component} evaluates to one of perl, perl2, perl3
: and there are environment variables in the shell called:
:
: perl_VERSION=1
: perl2_VERSION=2
: perl3_VERSION=3
:
: The above does not work, but is there a way to make it work
: based on your understanding of my requirement?
:
: thx
: dave
:
:




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

Date: Thu, 22 Feb 2001 14:50:20 -0500
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: can you embed variables inside $ENV{ } evaluations?
Message-Id: <Pine.A41.4.21.0102221448070.12454-100000@ginger.libs.uga.edu>

On Thu, 22 Feb 2001, David McMahon wrote:
> I need to view an environment variable based on a perl variable:
> 
> print "$ENV{'$compkeys{$component}_VERSION'}\n";
> 
> $compkeys{$component} evaluates to one of perl, perl2, perl3
> and there are environment variables in the shell called:
> 
> perl_VERSION=1
> perl2_VERSION=2
> perl3_VERSION=3
> 
> The above does not work, but is there a way to make it work
> based on your understanding of my requirement?

How about this:

    print $ENV{"$compkeys{$component}_VERSION"}, "\n";

Brad



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

Date: Thu, 22 Feb 2001 16:54:13 -0500
From: Rick Meldrum <richard.meldrum@fmr.com>
Subject: Console logging under Solaris
Message-Id: <3A958A85.D8527A65@fmr.com>

I am frustrated with the behavior of Solaris (or any Unix I've seen) in
that console messages are lost for ever once they scroll off the console
screen.

I have had no luck trying to capture that info:
 open (CON,"</dev/console") || die;
 ...and any variant I can come up with will not work for me.

Has anyone succecssfully built a console logger in perl?

Any help will be most appreciated...

Thanks,

Rick



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

Date: Thu, 22 Feb 2001 22:45:15 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Console logging under Solaris
Message-Id: <%Dgl6.357$zN2.170158592@news.frii.net>

In article <3A958A85.D8527A65@fmr.com>,
Rick Meldrum  <richard.meldrum@fmr.com> wrote:
>I am frustrated with the behavior of Solaris (or any Unix I've seen) in
>that console messages are lost for ever once they scroll off the console
>screen.
>
>I have had no luck trying to capture that info:
> open (CON,"</dev/console") || die;
>...and any variant I can come up with will not work for me.
>
>Has anyone succecssfully built a console logger in perl?
>
>Any help will be most appreciated...
>
>Thanks,
>
>Rick
>

Messages to the console are usualy avaiable in the syslog or by
running the dmesg command.  What does this have to do with perl?

chris
-- 
    This space intentionally left blank


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

Date: Thu, 22 Feb 2001 17:58:12 -0500
From: Rick Meldrum <richard.meldrum@fmr.com>
Subject: Re: Console logging under Solaris
Message-Id: <3A959984.95DF9EBF@fmr.com>

Chris Fedde wrote:

> In article <3A958A85.D8527A65@fmr.com>,
> Rick Meldrum  <richard.meldrum@fmr.com> wrote:
> >I am frustrated with the behavior of Solaris (or any Unix I've seen) in
> >that console messages are lost for ever once they scroll off the console
> >screen.
> >
> >I have had no luck trying to capture that info:
> > open (CON,"</dev/console") || die;
> >...and any variant I can come up with will not work for me.
> >
> >Has anyone succecssfully built a console logger in perl?
> >
> >Any help will be most appreciated...
> >
> >Thanks,
> >
> >Rick
> >
>
> Messages to the console are usualy avaiable in the syslog or by
> running the dmesg command.  What does this have to do with perl?
>
> chris
> --
>     This space intentionally left blank

Operative word "usually". The info I'm after is what was on the screen
just before a crash or panic. Many times it is not in /var/adm/messages.
 ...And I was attempting to write a console logging utility  in perl.....




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

Date: Thu, 22 Feb 2001 15:17:57 -0500
From: lrep@yahoo.com
Subject: DB2 Update error -7008
Message-Id: <itsa9tgdmq5g70qq4aohbn04hpq1jr927h@4ax.com>

I am trying to write a perl script to do database access to
a DB2 database on an AS/400.  (I have about 75 perl scripts
running on a production UNIX box, and want to move some of 
them to this platform.)

If I just do database SELECTs, everything works fine.
(So that tells me that perl is installed correctly, [5.00502]
 and DBD [ 0.74 ] and DBI [ 1.06 ] are also up and running.
Other vitals are OS/400 V4R4, DB2 database running BPCS.)

If I try to do an update, I get a -7008 error:
  <table> in <library> not valid for operation.

If I create a journal (database logging) for the table, then
everything works fine.  The problem is, I need to access tables
that do not have journalling.

I have tried playing with the AutoCommit switch, but am having
no joy.

Any hints?

(in STRSQL)
create table qgpl/xxx ( f1 integer )
insert into qgpl/xxx values (1)

(in qsh)
$ cat xxx.pl
#!/usr/bin/perl -w

use DBI;
use DBD::DB2::Constants;
use DBD::DB2 qw($attrib_int $attrib_char $attrib_float $attrib_date
$attrib_ts);

$as400_int = {'ParamT' => SQL_PARAM_INPUT,
              'Ctype'  => SQL_INTEGER,
              'Stype'  => SQL_SMALLINT,
             };

$as400_char = {'ParamT' => SQL_PARAM_INPUT_OUTPUT,
               'Ctype'  => SQL_C_CHAR,
               'Stype'  => SQL_CHAR,
               'Scale'  => 0,
               'Prec'   => 0,
              };

$dbh =
DBI->connect("dbi:DB2:BPCS","","",{PrintError=>1,RaiseError=>1,AutoCommit=>1})
  or die "connect: $DBI::errstr";
print "Autocommit is now " . $dbh->{AutoCommit},"\n";

$qstr = 'SELECT f1 FROM qgpl.xxx';

$sth = $dbh->prepare($qstr) or die "prepare: $dbh->err";

$sth->execute() or die "execute $dbh->err";

@row = $sth->fetchrow;
($num) = @row;
$num =~ s/\s+$//;
print "|$num|","\n";

#  This works, as I get the value that is in the row

$qstr = "UPDATE qgpl.xxx SET f1=2 WHERE f1 = 1"; 

$sti = $dbh->prepare($qstr) or die "prepare2: $dbh->err";

$sti->execute() or die $dbh->err, $DBI::errstr;

# Here is the -7008 error

$sti->finish;

}

$dbh->disconnect;

exit(0);


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

Date: Thu, 22 Feb 2001 21:36:32 -0000
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Disabling debugging support in Perl?
Message-Id: <t9b1j048jcs060@corp.supernews.com>

In article <3A9542C9.8449F753@Compaq.com>,
    Joshua Cope  <Joshua.Cope@Compaq.com> wrote:

:   I have a site requirement to disable debugging support in all compilers and 
: interpreters, including Perl. Is there a simple way to disable the Perl 
: debugger in a runtime environment (that is, without recompiling the Perl
: executable)? 

It's crude, but you could remove perl5db.pl.  Keep in mind that there's
nothing stopping the lusers from providing their own copies. 

Greg
-- 
If you think education is expensive, try ignorance.
    -- Ben Franklin


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

Date: 22 Feb 2001 21:35:57 +0000
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
Subject: Re: Disabling debugging support in Perl?
Message-Id: <86n1bebdtu.fsf@jon_ericson.jpl.nasa.gov>

Joshua Cope <Joshua.Cope@Compaq.com> writes:

>   I have a site requirement to disable debugging support in all
>   compilers and > interpreters, including Perl. Is there a simple
>   way to disable the Perl > debugger in a runtime environment (that
>   is, without recompiling the Perl > executable)?

Why do you have this requirement?  I'm not sure I understand what you
mean.  If you're talking about the interactive -d switch, I think
removing (or renaming) perl5db.pl and/or DB.pm would do the trick (but
I am loathe to try it on my system).  If you're talking about strict,
strict.pm is what you are looking for.  You're pretty much out of luck
when it comes to warnings I believe.  Data::Dumper, Dumpvalue,
Devel::Peek, B::*, and Carp are other modules useful for debugging.
My favourite debugging tool is print, but I expect you'd have a hard
time removing that.

Perhaps you mean debugging symbols in the perl executable.  strip
might be the answer.  (But this has nothing to do with perl!)

All of this is foolishness anyway.  I can't think of any possible gain
to doing this.  With the exception of C level debugging symbols in
perl itself, you can't disable the "Perl debugger" even with Configure
options.

Jon


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

Date: Thu, 22 Feb 2001 11:25:16 -0800
From: Greg Miller <greg_j_miller@agilent.com>
Subject: expression help....
Message-Id: <3A95679C.8E76AC87@agilent.com>

Hi -

I've got a simple expression I'm trying
to match and for the life of me I can't figure
out how to match it the way I want.

Here's the string:

$PATH = "${HOME}/${FOO}/res.ckt"

If I do this:

$PATH =~ m/\${.+}/

The match turns out to be this:

${HOME}/${FOO}

However I only want to match ${HOME}
and NOT the /${FOO}

Any help for this regex neophyte ?

Thanks!

-Greg




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

Date: 22 Feb 2001 19:51:51 GMT
From: egwong@netcom.com
Subject: Re: expression help....
Message-Id: <973qkn$1k6c$2@newssvr06-en0.news.prodigy.com>

Greg Miller <greg_j_miller@agilent.com> wrote:
> I've got a simple expression I'm trying
> to match and for the life of me I can't figure
> out how to match it the way I want.

> Here's the string:
> $PATH = "${HOME}/${FOO}/res.ckt"

> If I do this:
> $PATH =~ m/\${.+}/

> The match turns out to be this:
> ${HOME}/${FOO}

> However I only want to match ${HOME}
> and NOT the /${FOO}

> Any help for this regex neophyte ?

Look in the faq for "greedy" (perldoc -q greedy) and perlre.

In general, it's faster to use a character class rather than a ".*?"
(see J. Friedl's book _Mastering Regular Expressions_, O'Reilly)

  $PATH =~ m/\${[^}]+}/;



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

Date: Thu, 22 Feb 2001 13:56:22 -0600
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: expression help....
Message-Id: <7D465314DA995BB7.2677C42960747DAC.E359FD1813395C33@lp.airnews.net>


"Greg Miller" <greg_j_miller@agilent.com> wrote
: Hi -
:
: I've got a simple expression I'm trying
: to match and for the life of me I can't figure
: out how to match it the way I want.
:
: Here's the string:
:
: $PATH = "${HOME}/${FOO}/res.ckt"
:
: If I do this:
:
: $PATH =~ m/\${.+}/

    Read up on greediness in perlre:
$PATH =~ m/\${.+?}/

:
: The match turns out to be this:
:
: ${HOME}/${FOO}
:
: However I only want to match ${HOME}
: and NOT the /${FOO}
:
: Any help for this regex neophyte ?
:
: Thanks!
:
: -Greg
:
:




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

Date: Thu, 22 Feb 2001 14:56:37 -0500
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: expression help....
Message-Id: <Pine.A41.4.21.0102221452560.12454-100000@ginger.libs.uga.edu>

On Thu, 22 Feb 2001, Greg Miller wrote:
> I've got a simple expression I'm trying
> to match and for the life of me I can't figure
> out how to match it the way I want.
> 
> Here's the string:
> 
> $PATH = "${HOME}/${FOO}/res.ckt"
> 
> If I do this:
> 
> $PATH =~ m/\${.+}/
> 
> The match turns out to be this:
> 
> ${HOME}/${FOO}
> 
> However I only want to match ${HOME}
> and NOT the /${FOO}
> 
> Any help for this regex neophyte ?

     1  #!/usr/local/bin/perl
     2  use warnings;
     3  use strict;
     4
     5  my $PATH = '${HOME}/${FOO}/res.ckt';
     6
     7  print "$1\n" if $PATH =~ m/(\${.+?})/

You must have used single quotes on that string.
The answer is '?' after '+' for non-greedy match.

See perldoc perlre and look for greedy.

Regards,

Brad



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

Date: Thu, 22 Feb 2001 12:47:08 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: expression help....
Message-Id: <3A957ACC.650675D5@stomp.stomp.tokyo>

Greg Miller wrote:

> I've got a simple expression I'm trying
> to match and for the life of me I can't figure
> out how to match it the way I want.
 
> Here's the string:
 
> $PATH = "${HOME}/${FOO}/res.ckt"
 
> If I do this:
 
> $PATH =~ m/\${.+}/
 
> The match turns out to be this:
 
> ${HOME}/${FOO}
 
> However I only want to match ${HOME}
> and NOT the /${FOO}


A regex is not needed for a task this simple.

Godzilla!
--

TEST SCRIPT:
____________


#!perl

print "Content-type: text/plain\n\n";

${HOME} = "Godzilla / Rocks! ";

${FOO} = " Fe / Fi / Fo / FOO! ";

$PATH = "${HOME}/${FOO}/res.ckt";

print "Path Before:\n  $PATH\n\n";

$PATH = substr ($PATH, 0, index ($PATH, $FOO) - 1);

print "Path After:\n  $PATH";

exit;


PRINTED RESULTS:
________________

Path Before:
  Godzilla / Rocks! / Fe / Fi / Fo / FOO! /res.ckt

Path After:
  Godzilla / Rocks!


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

Date: Thu, 22 Feb 2001 19:32:14 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Free debugger suggestions
Message-Id: <t9aq9urp8l0vcd@corp.supernews.com>

Martijn Mulder <soso@open.net> wrote:

[ An author unattributed by Mertijn Mulder wrote the following. Please
  make attributions for quotes. ]

>> Any suggestions on another editing tool?
>> 

> the makefile etc. The closest to VI you can get in a DOS environment!
> Groeten, Martijn

Except a DOS or Windows port of vi, of which there are many. There are
also emacs ports for both DOS and Windows., and I believe a port of
the editor 'joe' to DOS.

Chris

-- 
Christopher E. Stith
Product shown enlarged to make you think you're getting more.



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

Date: Thu, 22 Feb 2001 13:51:42 -0800
From: "John T." <j2lab.nospam@my-deja.com>
Subject: help with variables in my email
Message-Id: <3A9589EE.6BD8BACF@my-deja.com>

I currently have a script that opens a text file then emails the content
of the text file line by line.  I would like to enter the current date
into the email.  I tried assigning the current date to a variable and
added the variable within the text file.  All I seem to get back is the
$variablename in the email.  What is it that I'm doing wrong?

Any help would be greatly appreciated.
-jt



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

Date: 22 Feb 2001 20:12:13 +0100
From: Andreas Kupries <a.kupries@westend.com>
Subject: Re: Is a function/class library for processing of SMTP-mails available?
Message-Id: <87y9uyfs6q.fsf@bluepeak.westend>


"Markus Elfring" <ELF@Messer.de> writes:

> I've found the following:
> > man forward
> " ...
>      If the first character of the address is a vertical bar (|),
>      sendmail(1M)  pipes the message to the standard input of the
>      command the bar precedes.
> ... "
 
> I want to read this piped message to import it in one of our systems
> after the sender and the subject had been checked.  Do you know a
> function or class library for a programming language (e. g.  PHP,
> TCL or Perl) that helps me to process this mail?
 
TclLib, at

        http://tcllib.sourceforge.net/

provides SMTP and MIME modules.

-- 
Sincerely,
	Andreas Kupries <a.kupries@westend.com>
		<http://www.purl.org/NET/akupries/>
-------------------------------------------------------------------------------


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

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 V10 Issue 337
**************************************


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