[18530] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 698 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 14 14:06:17 2001

Date: Sat, 14 Apr 2001 11:05:10 -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: <987271509-v10-i698@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 14 Apr 2001     Volume: 10 Number: 698

Today's topics:
    Re: A CGI question <diab.lito@usa.net>
    Re: A perl 'which' function? <paul@zillywilly.com>
        an EZ way to see if a scalar is "contained" in an array <nospam@cfl.rr.com>
    Re: an EZ way to see if a scalar is "contained" in an a <theaney@toadmail.toad.net>
    Re: an EZ way to see if a scalar is "contained" in an a (Tad McClellan)
    Re: an EZ way to see if a scalar is "contained" in an a <nospam@cfl.rr.com>
    Re: an EZ way to see if a scalar is "contained" in an a (Logan Shaw)
    Re: Beta Testers/Perl Hackers (Tad McClellan)
    Re: Beta Testers/Perl Hackers <gellyfish@gellyfish.com>
    Re: Beta Testers/Perl Hackers (Randal L. Schwartz)
    Re: FAQ .: Every post to the comp.lang.perl.misc newsgr <iltzu@sci.invalid>
    Re: FAQ 9.9:   How do I decode or create those %-encodi <joe+usenet@sunstarsys.com>
    Re: File Upload (Anno Siegel)
    Re: how do i suppress STDOUT <gellyfish@gellyfish.com>
    Re: HP Openview <gellyfish@gellyfish.com>
    Re: Install of CPAN modules fails during date.t test <ng@conactive.com>
    Re: Install of CPAN modules fails during date.t test <gellyfish@gellyfish.com>
        New NG member - seeks a little help :) <robbie@DONTgoofymouseSPAM.freeserve.co.uk>
    Re: Perl Bin and Visual Basic <gellyfish@gellyfish.com>
        PERL DBI Problem <vcarnale@snet.net>
    Re: PERL DBI Problem (Mark Jason Dominus)
    Re: PERL DBI Problem (Tad McClellan)
    Re: PERL DBI Problem <gellyfish@gellyfish.com>
    Re: PERL DBI Problem (Peter Scott)
        R: [OT] Posts like this <diab.lito@usa.net>
    Re: RegEx novice <ren@tivoli.com>
    Re: Thankyou All Most Kindly :-) (Anno Siegel)
    Re: Wierd one Solaris compared to Cobalt Raq4 <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 14 Apr 2001 17:54:55 GMT
From: "Mario Rizzuti" <diab.lito@usa.net>
Subject: Re: A CGI question
Message-Id: <P90C6.14127$s93.818491@news.infostrada.it>


brian d foy <comdog@panix.com> wrote in message
comdog-D53754.23112511042001@news.panix.com...

> which is why i said you shouldn't post it.  if you can't include the
> necessary items, don't post.  don't allow your bad answers to pollute the
> newsgroup archives.  don't make other people respond to you so that the
> next poor soul doesn't think that you know what you are doing and wastes
> his time with your answer.  don't pretend to know more than you do.  don't
> think that the number of posts you make has any affect on your
cluefulness.
> don't post code without testing it.  don't post code without understanding
> it.  don't post.

[ignored]

Mario Rizzuti




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

Date: Sat, 14 Apr 2001 10:16:12 -0700
From: paul <paul@zillywilly.com>
Subject: Re: A perl 'which' function?
Message-Id: <3AD885DC.33C1AF89@zillywilly.com>

Perfect, thanks.

Joe Schaefer wrote:
> 
> paul <paul@zillywilly.com> writes:
> 
> > Hello,
> >
> > Is there a simple one-liner that returns which module was loaded,
> > similar to the *nix 'which' command?  For example, if I want to find
> > this out now, I do:
> >
> > $ perl -d -e 'use DBD::mysql;'
> >
> > ...then, at the debugger prompt, type:
> >
> > v
> >
> > ...and search through the output for the module I'm interested in:
> >
> > <snip>
> > 'DBD/mysql.pm' => '2.0416 from
> > /opt/local/ashare/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/mysql.pm'
> > <snip>
> 
> Take a look at the %INC hash:
> 
>   % perl -MDBD::mysql -e 'printf "%16s => %s\n", each %INC for keys %INC'
> 
> --
> Joe Schaefer     "Only presidents, editors and people with tapeworm have the
>                               right to use the editorial 'we'."
>                                                -- Mark Twain


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

Date: Sat, 14 Apr 2001 13:37:30 GMT
From: tuxy <nospam@cfl.rr.com>
Subject: an EZ way to see if a scalar is "contained" in an array?
Message-Id: <3AD701D7.AD9EDAEF@cfl.rr.com>

OK, 

 $s='dog';
  @l=qw(cat man dog);
# now, I want to know if $s is contained in @l, so 
 if ($contains=grep /$s/,@l) {print "yes\n"} else{print "no\n"}

I use this when i'm certain that $s contains no regex characters, for
example only [A-Z]. Otherwise I resort to something like:

 foreach (@l) {$contains=$s eq $_; last if $contains}

What would be really useful is a function like

  contains $s,@l;

which returned 0 if not found, and (index+1) if found (since 0 is a
valid index, some convention is needed). For the example above

  print contains $s,@l would return 3.

Does this functionality already exist, or something similar? Of course I
know I could easily write this function, but it seems like such an
intrinsic thing to do that it, or something close should already be
there (without resorting to a loop!). Even if I just get TRUE (1) if
contains and FALSE (0) if not? If its not there- you Perl 6 guys- HEADS
UP!


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

Date: 14 Apr 2001 10:12:03 -0400
From: Tim Heaney <theaney@toadmail.toad.net>
Subject: Re: an EZ way to see if a scalar is "contained" in an array?
Message-Id: <874rvr8tak.fsf@susie.watterson>

tuxy <nospam@cfl.rr.com> writes:
> 
> Does this functionality already exist, or something similar?

We have hashes. If you run 'perldoc -q contain' you should see
something like this

  http://www.perldoc.com/perl5.6/pod/perlfaq4.html#How%20can%20I%20
  tell%20whether%20a%20list%20or%20array%20contains%20a%20certain%20
  element%3f

Alternatively, there is 

  http://www.perlfaq.com/faqs/id/191

Hope this helps,

Tim


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

Date: Sat, 14 Apr 2001 10:57:24 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: an EZ way to see if a scalar is "contained" in an array?
Message-Id: <slrn9dgpak.ior.tadmc@tadmc26.august.net>

tuxy <nospam@cfl.rr.com> wrote:

> Subject: an EZ way to see if a scalar is "contained" in an array?


Perl FAQ, part 4:

   "How can I tell whether a list or array contains a certain element?"


>which returned 0 if not found, and (index+1) if found (since 0 is a
>valid index, some convention is needed).


The convention used by index() is to return -1 for "not found".

The FAQ answer can be modified to return an index, using undef
for "not found":


    @blues = qw/azure cerulean teal turquoise lapis-lazuli/;
    undef %blue_shade;
    for (0 .. $#blues) { $blue_shade{$blues[$_]} = $_ }

    print "$blue_shade{'lapis-lazuli'}\n";
    print "$blue_shade{teal}\n";


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sat, 14 Apr 2001 16:17:05 GMT
From: tuxy <nospam@cfl.rr.com>
Subject: Re: an EZ way to see if a scalar is "contained" in an array?
Message-Id: <3AD7273E.FD4689DC@cfl.rr.com>

Ahh VERY helpful replies guys  thanks....




Tad McClellan wrote:
> 
> tuxy <nospam@cfl.rr.com> wrote:
> 
> > Subject: an EZ way to see if a scalar is "contained" in an array?
> 
> Perl FAQ, part 4:
> 
>    "How can I tell whether a list or array contains a certain element?"
> 
> >which returned 0 if not found, and (index+1) if found (since 0 is a
> >valid index, some convention is needed).
> 
> The convention used by index() is to return -1 for "not found".
> 
> The FAQ answer can be modified to return an index, using undef
> for "not found":
> 
>     @blues = qw/azure cerulean teal turquoise lapis-lazuli/;
>     undef %blue_shade;
>     for (0 .. $#blues) { $blue_shade{$blues[$_]} = $_ }
> 
>     print "$blue_shade{'lapis-lazuli'}\n";
>     print "$blue_shade{teal}\n";
> 
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas


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

Date: 14 Apr 2001 12:03:17 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: an EZ way to see if a scalar is "contained" in an array?
Message-Id: <9b9vsl$9pn$1@charity.cs.utexas.edu>

In article <3AD701D7.AD9EDAEF@cfl.rr.com>, tuxy  <nospam@cfl.rr.com> wrote:
>OK, 
>
> $s='dog';
>  @l=qw(cat man dog);
># now, I want to know if $s is contained in @l, so 
> if ($contains=grep /$s/,@l) {print "yes\n"} else{print "no\n"}
>
>I use this when i'm certain that $s contains no regex characters, for
>example only [A-Z]. Otherwise I resort to something like:
>
> foreach (@l) {$contains=$s eq $_; last if $contains}

You can make that shorter with

	grep ($_ eq $s, @l);

>What would be really useful is a function like
>
>  contains $s,@l;
>
>which returned 0 if not found, and (index+1) if found (since 0 is a
>valid index, some convention is needed).

Yeah, I don't think that exists, but would be easy enough to write.

In fact:

	sub contains
	{
		my ($scalar, $array) = @_;

		foreach (my $i = 0; $i < @$array; $i++)
		{
			return $i if ${$array}[$i] eq $scalar;
		}
		return -1;
	}

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


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

Date: Sat, 14 Apr 2001 10:20:40 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Beta Testers/Perl Hackers
Message-Id: <slrn9dgn5o.ior.tadmc@tadmc26.august.net>

james freeman <jamesfreeman@MailAndNews.com> wrote:
>>===== Original Message From tadmc@augustmail.com =====
>
>>james freeman <jamesfreeman@MailAndNews.com> wrote:
>>
>>>What is posting jeopardy style?
>>
>>It is called that after the TV game show, because that style has
>>the questions *before* the answer (in reverse chronological order).
>>
>>   http://www.geocities.com/nnqweb/nquote.html
>
>Thanks for the link it was very useful.


But you are *STILL* sending Stealth Cc's.

Do it one more time and you're killfiled for evermore.

Thank you for fixing the Jeopardy quoting style thing, but you
have a few more things to learn about how to use Usenet still to go...


>>>What references did I lose?
>>
>>The References:
>>
>>news header is supposed to contain the messageID of previous
>>messages that it refers to (ie. quotes).


And it is still missing BTW.


>I am using an online newsreader as my ISP does not support newsgroups. 
>That's 
>what you get when you live in the sticks :-(
>


Bummer.

I killfile most Web-to-News gateways.

I have (over the last few months) become a "domainist" (sense 1).

   http://www.tuxedo.org/~esr/jargon/html/entry/domainist.html


>As far as I can see I do not have the option to include references 


If you continue posting with broken stuff, you may end up in
killfiles. You really really should find some standards compliant
way of accessing news...


>but note 
>that the threading of this thread seems to appear intact?? 


If the correct headers are not available, many "threaders" will
"guess" based on the Subject header instead.

This makes the classic Stupid Subjects ("Help!", "Perl question"...)
a hodge podge of different threads all treated as a single thread.
Stuff is then "broken".


>Could anyone 
>reccomend an online newsreader that properly supports references?


That is off-topic too  :-)

Ask about news software in a newsgroup about news software, ask
about Perl in a Perl newsgroup, ask about CGI in a CGI newsgroup...

   news.software.newsreaders

Asking in the most appropriate newsgroup is doubly good. Good for
the asker, and good for the community.

Good for the asker because there are more folks who "know about"
the subject in newsgroups that are actually _about_ the subject.
Question answerers _seek out_ such newsgroups. "Newsreader experts"
may or may not read clp.misc, but they almost for sure read n.s.n.

Good for the community because others who are wondering about how
to access news are not likely to look for answers in clp.misc, they
would be looking in some news-related newsgroup.


>Off topic, etiquette related
>
>Question: When someone has been kind enough to post a reply, to which a 
>resonse to the group is to be posted, is it considered bad form to send a CC 
>of this response directly to the person who has replied to let them know you 
>have read their reply and appreciate their time and effort 


Some people like it that way, some don't.


>or do you not CC 
>and just let them read it on the group if they want?


Some people like it that way, some don't.


But you gotta fix the Stealth Cc thing immediately.

If you do decide to send an email copy of an article posted to
Usenet then you should indicate in *the body* of the article
that is has been both posted and mailed.

Failure to do so is a very effective way of annoying the heck 
out of people.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 14 Apr 2001 16:12:36 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Beta Testers/Perl Hackers
Message-Id: <9b9stk$1g8$1@uranium.btinternet.com>

james freeman <jamesfreeman@mailandnews.com> wrote:
> 
> Question: When someone has been kind enough to post a reply, to which a 
> resonse to the group is to be posted, is it considered bad form to send a CC 
> of this response directly to the person who has replied to let them know you 
> have read their reply and appreciate their time and effort or do you not CC 
> and just let them read it on the group if they want?
> 

People vary in their appreciation of CCs to usenet messages - however if you
*do* feel like doing it it is imperative that you make it clear in both
the posted message and the e-mail that this is what you have done - most
people have some formula such as :

  [Posted and CC sent to Cited author]

This is because people are more likely to receive the e-mail message first 
and it is likely that in the abscence of any other indication they will
respond to that where they might have responded in the group if they had
known that it had also been posted there.  People tend to get annoyed about
this when they discover it had taken place.  The canny usenaut may of course
not respond to any e-mail that appears to be a response to a usenet message.

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: 14 Apr 2001 09:23:37 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Beta Testers/Perl Hackers
Message-Id: <m1k84ne9h2.fsf@halfdome.holdit.com>

>>>>> "Jonathan" == Jonathan Stowe <gellyfish@gellyfish.com> writes:

Jonathan> People vary in their appreciation of CCs to usenet messages
Jonathan> - however if you *do* feel like doing it it is imperative
Jonathan> that you make it clear in both the posted message and the
Jonathan> e-mail that this is what you have done - most people have
Jonathan> some formula such as :

Jonathan>   [Posted and CC sent to Cited author]

Well, I don't consider the notification *in the posting* to be
necessary, but definitely *in the email* is mandatory.

But if you can't "fork" your message and make a variant, putting it in
*both* suffices.

GNUS puts it in the email only, for example.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: 14 Apr 2001 16:13:39 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: FAQ .: Every post to the comp.lang.perl.misc newsgroup consumes the time and
Message-Id: <987264535.25087@itz.pp.sci.fi>

In article <5dXB6.959$T3.193098240@news.frii.net>, PerlFAQ Server wrote:
>
>1. The latest stable release of Perl is 5.6.0.  The latest maintenance

Doesn't that need an update?

[A copy of this post has been mailed to faq@denver.pm.org.]

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: 14 Apr 2001 11:05:42 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: FAQ 9.9:   How do I decode or create those %-encodings on the web?
Message-Id: <m3hezr34jd.fsf@mumonkan.sunstarsys.com>

PerlFAQ Server <faq@denver.pm.org> writes:

>         s/([^\w()'*~!.-])/sprintf '%%%02x', $1/eg;   # encode
                                             ^^
Shouldn't there be an 'ord' in there? I get garbage otherwise:

    % perl -wple 's/(\W)/sprintf "%%%02x", $1/eg;'
    a + 2 = 3
    a%00%00%002%00%00%003
    no warnings enabled
    no%00warnings%00enabled

-- 
"The inevitable catastrophe is at hand." -- Edgar Allen Poe


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

Date: 14 Apr 2001 13:21:49 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: File Upload
Message-Id: <9b9itd$ns$1@mamenchi.zrz.TU-Berlin.DE>

According to Ron Savage <ron@savage.net.au>:
> See below.
> --
> Cheers
> Ron  Savage
> ron@savage.net.au
> http://savage.net.au/index.html
> 
> > > why do you call those tutorials when there is no explanatory text?
> 
> > [...]
> >
> > I rest my case.  It's not a tutorial.  It's a script archive, and it
> > doesn't look good.
> 
> My grovelling apologies for failing to be infallible.

Infallibility is not required.  Honesty in advertising is.

Anno


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

Date: 14 Apr 2001 16:45:42 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: how do i suppress STDOUT
Message-Id: <9b9urm$1g8$6@uranium.btinternet.com>

ac <clarke@hyperformix.com> wrote:
> I have an application which is emitting unwanted "debug like" text to the
> console
> (OS command line). The problem is that I don't have access to the code (its
> probably a Win32 dll thats part of drag-n-drop in Tk).
> 
> How can I suppress STDOUT during certain function calls so the users of my
> application don't see this stuff?
> 

This is partially described in perlfaq8 :

      How can I capture STDERR from an external command?

The basic thing is to duplicate the existing STDOUT (or STDERR as
appropriate) to another file handle to save it and then reopen the
STDOUT to the null device '/dev/null' on Unix or 'NUL:' on Windows -
then when you no longer want to lose the STDOUT you can duplicate the
saved handle back to STDOUT.

You probably also want to read the perlopentut manpage and the perlfunc
entry about open().

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: 14 Apr 2001 16:22:34 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HP Openview
Message-Id: <9b9tga$1g8$4@uranium.btinternet.com>

Ron Reidy <RReidy@radiancegroup.com> wrote:
> Hi,
> 
> I am writing some software for a client to perform unassisted backups and
> database monitoring.  When problems arise, I need to notify the operations
> staff in their datacent.  Is there a Perl module for writing to HP Openview?
> Or any other command center monitors?
> 

AFAIK you can use one of the SNMP modules to create an SNMP trap to send
the OpenView server to do this.  Search for SNMP at http://search.cpan.org


/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: Sat, 14 Apr 2001 15:32:57 +0200
From: Kai Schaetzl <ng@conactive.com>
Subject: Re: Install of CPAN modules fails during date.t test
Message-Id: <VA.00001e6b.002b8dfa@conactive.com>

> try getting a hold of Microsoft's nmake
> 
> to install if there is no PPM available
>

Ahm, I'm talking of Perl on Red Hat Linux ...


Kai

-- 

Conactive Internet Services, Berlin, Germany



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

Date: 14 Apr 2001 16:27:55 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Install of CPAN modules fails during date.t test
Message-Id: <9b9tqb$1g8$5@uranium.btinternet.com>

Kai Schaetzl <ng@conactive.com> wrote:
> All tests using base/date and base/message fail on this machine:
> 
> base/date...........time2str failed at base/date.t line 84.
> base/date...........dubious                                           
>        
>         Test returned status 255 (wstat 65280, 0xff00)
> DIED. FAILED tests 1-58
>         Failed 58/58 tests, 0.00% okay
>                                                       
> base/message........ok 16/16FAILED test 4                             
>        
>         Failed 1/16 tests, 93.75% okay
> 
> If I force the install the module seems to work fine. What can I do 
> about this, by what is it caused? I assume it is caused by an OS 
> library and not by the Perl installation itself?
> 
> OS is Red Hat 6.1, Perl is 5.6.0 compiled on this machine.
> 

It might perhaps be useful to know what the module you are trying to
install is.  Also when you built Perl on this machine did it pass all
of the tests ?

I have used Red Hat 6.1 on a number of machines and have never had any
problems building any modules as far as I can remember.

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: Sat, 14 Apr 2001 18:58:29 +0100
From: "Robb Meade" <robbie@DONTgoofymouseSPAM.freeserve.co.uk>
Subject: New NG member - seeks a little help :)
Message-Id: <9ba32p$3kj$1@newsg2.svr.pol.co.uk>

Hi all,

Kinda new here - usually hanging out in the ASP NG's...but today I have a
Perl problem, and desperately seek help :)

I've got some pages that use ASP to do the 'work' if you like, then a Perl
script to handle emailing needs (as my web host doesnt have CDONTS
installed)..

At the moment this does what I want it to do, but its limited to only
sending an email to 1 user, what I need is to add some kind of file it can
get emails from.

Its to be part of an Admin section on my site (not muc there yet - save your
time! :D)..

All client details are held in a database at the moment, this I handle
through ASP, so I'll probably be sending the email address(s) from this to
the Perl script to send them out, or I could get them from the database,
write them to a text file, and then use the Perl script to read from there I
guess...anyway...below is the script I have for one user - I really dont
know anything about Perl, I've looked at it once, but got hopelessly lost
with all the /\& and the rest of em!

I got this script partly from a book, and then it was modified a little by a
friend...

*********** BEGINS **************

#!/usr/bin/perl -w
use strict;
use CGI qw(:all);
use CGI::Carp qw(fatalsToBrowser);

my $target="go here afterwards";

sub send_mail {


 my $sendmail="/usr/sbin/sendmail -t -oi";
 my $comments=param("comments");
 my $from=param("email");
 my $name=param("name");
 my $to="feedback\@insertdomainnamehere.com";
 my $subject="Feedback from ** a web site **";


 open(MAIL, "|$sendmail") || die "Can't start sendmail: $!";
 print MAIL<<END_OF_HEADER;
From: $from
To: $to
Subject: $subject

The following information was submitted via the online feedback form at **
insert name here **

$name wrote :
$comments

END_OF_HEADER

 close(MAIL);
}

send_mail();

print redirect( -url => $target );

********** ENDS *******************

I dont know what it ALL does, but I can recognise certain areas, and what
they are doing - if someone could show me what to add to read say from a
text file more email addresses, and get the script to loop through until its
done I'd be very greatful :)

Thanks in advance for any help,

Respectfully

--

Robb Meade
GoofyMouse Designs
www.goofymouse.com






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

Date: 14 Apr 2001 16:15:34 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Bin and Visual Basic
Message-Id: <9b9t36$1g8$2@uranium.btinternet.com>

tweaked <tunneling_news@hotmail.com> wrote:
> MY OBJECTIVE:
> I want to provide a slim version of Perl with an install of my VB app
> so I can execute Perl scripts from my Visual Basic Application.
> REASON:
> I'm well seasoned in using Perl for text manipulation.
> QUESTION:
> I know all the VB shell stuff and I can run scripts on my PC but I get
> kinda foggy when I begin looking in the Perl Bin for what I should
> include with the install of my VB app. 

I dont think you want to 'shell out' of the VB app to use Perl - you
should instead consider using 'Scriptlets' of which there are examples
in the Activestate distribution.

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: Sat, 14 Apr 2001 09:21:31 -0400
From: Victor Carnale <vcarnale@snet.net>
Subject: PERL DBI Problem
Message-Id: <3AD84EDB.650E6DC@snet.net>

We have a PERL script that has successfully run for 6 months on a Unix
platform.  Then 1 day we started getting the following error when
connecting to Oracle. (No changes were made to the script)

Allocation too large at Oracle.pm line 262.

Any suggestions would be appreciated.





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

Date: Sat, 14 Apr 2001 15:21:21 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: PERL DBI Problem
Message-Id: <3ad86af7.5de8$19a@news.op.net>

In article <3AD84EDB.650E6DC@snet.net>,
Victor Carnale  <vcarnale@snet.net> wrote:
>We have a PERL script that has successfully run for 6 months on a Unix
>platform.  Then 1 day we started getting the following error when
>connecting to Oracle. (No changes were made to the script)
>
>Allocation too large at Oracle.pm line 262.
>
>Any suggestions would be appreciated.

I think that means that the space allocated for the database has been
filled up.  You need to get your DBA to allocate more disk space for
it.

I may be wrong, but you should certainly consult the DBA.
-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: Sat, 14 Apr 2001 10:24:12 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: PERL DBI Problem
Message-Id: <slrn9dgncc.ior.tadmc@tadmc26.august.net>

Victor Carnale <vcarnale@snet.net> wrote:
>We have a PERL script that has successfully run for 6 months on a Unix
>platform.  Then 1 day we started getting the following error when
>connecting to Oracle. (No changes were made to the script)
>
>Allocation too large at Oracle.pm line 262.
>
>Any suggestions would be appreciated.


I suggest looking up the message in Perl's standard documentation
before posting to Usenet.

All of the messages that perl might issue are documented in the
perldiag.pod standard doc.

   perldoc perldiag

Or, have perl look it up *for you* by saying:

   use diagnostics;

near the top of your program.


-----------------------------------------------------
=item Allocation too large: %lx

(X) You can't allocate more than 64K on an MS-DOS machine.
-----------------------------------------------------


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 14 Apr 2001 16:54:40 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: PERL DBI Problem
Message-Id: <9b9vcg$1g8$7@uranium.btinternet.com>

Victor Carnale <vcarnale@snet.net> wrote:
> We have a PERL script that has successfully run for 6 months on a Unix
> platform.  Then 1 day we started getting the following error when
> connecting to Oracle. (No changes were made to the script)
> 
> Allocation too large at Oracle.pm line 262.
> 

Er, the only entry in perldiag that comes close is :

       Allocation too large: %lx
           (X) You can't allocate more than 64K on an MS-DOS
           machine.

But you're not running this on MS-DOS now are you ?  You are either tickling
some weird bug in Perl or DBD::Oracle that causes the erroneus emmision
of this message or this is infact some unrelated Oracle error - which latter
I would go for despite the fact it doesnt particulary look like one .

/J\



-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: Sat, 14 Apr 2001 17:45:20 GMT
From: peter@PSDT.com (Peter Scott)
Subject: Re: PERL DBI Problem
Message-Id: <Q00C6.1700$q51.10779@news1.gvcl1.bc.home.com>

In article <9b9vcg$1g8$7@uranium.btinternet.com>,
 Jonathan Stowe <gellyfish@gellyfish.com> writes:
>Victor Carnale <vcarnale@snet.net> wrote:
>> We have a PERL script that has successfully run for 6 months on a Unix
>> platform.  Then 1 day we started getting the following error when
>> connecting to Oracle. (No changes were made to the script)
>> 
>> Allocation too large at Oracle.pm line 262.
>> 
>
>Er, the only entry in perldiag that comes close is :
>
>       Allocation too large: %lx
>           (X) You can't allocate more than 64K on an MS-DOS
>           machine.
>
>But you're not running this on MS-DOS now are you ?  You are either tickling
>some weird bug in Perl or DBD::Oracle that causes the erroneus emmision
>of this message or this is infact some unrelated Oracle error - which latter
>I would go for despite the fact it doesnt particulary look like one .

I'll bet that the poster is running Perl 5.004 or earlier.  I got this error
message recently and went nuts for a while reading the 5.6.0 documentation
before it occurred to me that it was on an earlier Perl.  I dug in the source
for 5.004 and found that this message can indeed be output by Perl, from
malloc.c.  In later Perls, the message was changed to "Out of memory during 
ridiculously large request," for which the explanation is

           (F) You can't allocate more than 2^31+"small amount"
           bytes.  This error is most likely to be caused by a
           typo in the Perl program. e.g., `$arr[time]' instead
           of `$arr[$time]'.

-- 
Peter Scott




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

Date: Sat, 14 Apr 2001 17:00:31 GMT
From: "Mario Rizzuti" <diab.lito@usa.net>
Subject: R: [OT] Posts like this
Message-Id: <Pm%B6.13869$s93.803969@news.infostrada.it>

brian d foy <comdog@panix.com> wrote:

> the best product i've seen like this did something similar, but then
> asked the reader how much the next post helped them (as in, you found
> this when looking for X, so how does it fit into X).  after a small
> amount of user ratings, groups start to emerge.  that information
> might be more useful than comparing the presence of words.

Sounds very interesting; if you could point me in the direction of this
script would be helpful.
However don't you think it will require too much time for an average/small
forum to reach a critical mass of info since it requires an action to the
posters?

> but then, there's not much Perl there ;)

well,I am coding that in Perl,isn't enough?:-)

Thanks for the reply.

Mario Rizzuti




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

Date: 13 Apr 2001 23:40:41 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: RegEx novice
Message-Id: <m3n19k2iwm.fsf@dhcp9-172.support.tivoli.com>

On Sat, 14 Apr 2001, projectobjects@earthlink.net wrote:

> 
> I want to do a match in order to validate a phrase.  Something like
> Bart responded with except for validation instead.  If the phrase is
> (<word>[_- ]<word>[_- ]<word>) then I do not want it to be true for
> (<word>[_- ]<word>) even though it is a subset of (<word>[_-
> ]<word>[_- ]<word>)

Do you actually need it to be a single regex?  If not, then just do
something like:

  if (/<word>[_- ]<word>/ && ! /<word>[_- ]<word>[_- ]<word>/) {
    # match
  }

Note that I make no attempt to parse your special syntax.  If those
character classes are meant to be "_", "-" and " ", then watch out --
putting the "-" in the middle treats them as a range (and I believe an
empty one, at that).

If it needs to be a single regex (and you can use Perl's advanced
regex features) then something like:

  /<word>[_- ]<word>(?![_- ]<word>)/

may work for you, depending on the specifics of your need.

-- 
Ren Maddox
ren@tivoli.com


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

Date: 14 Apr 2001 13:25:15 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Thankyou All Most Kindly :-)
Message-Id: <9b9j3r$ns$2@mamenchi.zrz.TU-Berlin.DE>

According to Alan Barclay <gorilla@elaine.furryape.com>:
> In article <987121014.22958.0.nnrp-08.c2ded7c2@news.demon.co.uk>,
> Karl Young <karlyoung@unconscious.co.uk> wrote:
> >Does anyone really read a newsgroup for 3 weeks before posting to it?
> 
> Note that it doesn't actually have to take you 3 weeks to read 3
> physical weeks of posts. With your news provider's archive you can
> read back, often all 3 weeks, usually at least 2.

That's power lurking.  Does that count?

Anno


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

Date: 14 Apr 2001 16:19:19 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Wierd one Solaris compared to Cobalt Raq4
Message-Id: <9b9ta7$1g8$3@uranium.btinternet.com>

Tony <tailorontap@pantsbtinternet.com> wrote:
> Wondered if anyone has experienced any peculiarities with the Raq4.
> I have a robust commercial Perl shopping cart which functions perfectly on a
> Sun running Solaris - but refuses to perform on the Raq4 ?

Not that this has musch to do with Perl but ...

I really wouldnt recommend using the Cobalt for something which has to
deal with peoples financial details as there are known root vulnerabilities
in the administration scripts.  These scripts are however written in
Perl :)

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.  

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


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