[12362] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5962 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 11 12:07:22 1999

Date: Fri, 11 Jun 99 09:01:35 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 11 Jun 1999     Volume: 8 Number: 5962

Today's topics:
    Re: MIcrosofts Attack on Perl (Lee)
    Re: MIcrosofts Attack on Perl <gbartels@xli.com>
    Re: MIcrosofts Attack on Perl (I R A Aggie)
        Module.pod and Module.pm co-existence (was: Perldoc and <tchrist@mox.perl.com>
    Re: ms sql databases and perl on unix (Dan Wilga)
        multiple match & replace regexp <anonymous@web.remarq.com>
    Re: OLE reference <camerond@mail.uca.edu>
    Re: Opening a returned web page in a new window... (Marcel Grunauer)
    Re: Opening many new windows... (Marcel Grunauer)
        Out of Memory!!! izzac@my-deja.com
    Re: Out of Memory!!! <gellyfish@gellyfish.com>
    Re: Out of Memory!!! izzac@my-deja.com
        Perl class and constructor <@cisco.com>
    Re: Perl class and constructor <craig@mathworks.com>
    Re: Perl on win32 (Kevin Reid)
    Re: Perl on win32 <camerond@mail.uca.edu>
    Re: Perldoc and Perlfaq (Abigail)
    Re: problems with specific words in text field (Marcel Grunauer)
    Re: quiz for perl professionals (Hasanuddin Tamir)
    Re: quiz for perl professionals <camerond@mail.uca.edu>
    Re: Silly old me (Tad McClellan)
    Re: Verifying date data <sb@sdm.de>
    Re: Verifying date data michc@my-deja.com
    Re: Verifying date data (I R A Aggie)
    Re: Verifying date data <thollowe@opentext.com>
    Re: What's the "halting problem"? <dgris@moiraine.dimensional.com>
    Re: What's the "halting problem"? (Lee)
        Win95/DOS - can't install modules <ben@expo-systems.co.uk>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 11 Jun 1999 09:28:21 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <B386873596681A18A8@204.112.166.88>

In article <3761007a.0@news.new-era.net>,
scott@aravis.softbase.com (Scott McMahan) wrote:

>People forget Microsoft funded the initial Win32 port of Perl.

The bastards!

Given the daily reminders in this ng, it is difficult to either forget or
forgive this despicable act of sabotage. 

Only half joking.

Lee




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

Date: Fri, 11 Jun 1999 10:01:41 -0400
From: Greg Bartels <gbartels@xli.com>
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <376116C5.DAA7D78B@xli.com>

jgrain wrote:
> 
> What is the current strategy of those at the very top, i.e. those who
> understand, believe and promote open source, particularly in reference
> to its influence on reducing the cost of computing and spreading the net
> of those involved in "serious" computing 

the current strategy/opinion/beliefs of several of key players in 
open-source software is detailed in "Open Sources" a new book 
published by O-Reilly. Each of the key players wrote a chapter,
saying whatever they wanted to say about open-source, past/present/
future. that would at least be a good place to start.

> after the announcement that
> Microsoft will be "hijacking" Perls advantages, for their own commercial
> benefit.
> 
> Are people aware of the "negative" consequences of such a move,
> especially in relation to one of Perls core ojectives in relation to
> maintaining the language as "portable"?
> 
> An answer to this post would be very much appreciated as I am one of the
> "few" who would actively participate in "movements" to counteract the
> negative force of "inforced capatilism".
> 
> Awaiting a reply from the high command!

this disscussion flared up a week or so ago. my take is this:
whether or not a company could "hi-jack" perl is a matter or
licencing, primarily, and marketing/public relations/company strategy
secondarily. you can force software to be open-source by licencing
it as such. beyond that, you're left with working with the companies
that use the software, and trying to enroll them into the benefits
of open-source versus proprietary code. 

the only legal protection perl (or any software) has is in copyright
law and how the software is licensed. Linux is licensed under the 
Gnu Public License. Perl is licensed under the Artistic License and
the Gnu Public License. The AL would be used by a company wishing
to use Perl with proprietary code.

the flare up on this newsgroup occurred around whether or not there
are any weaknesses in the the Artistic License. (see newsgroup
archives before resparking the debate.) If the AL is solid,
there is no way the software can be "Hi-jacked".

The debate on this newsgroup ended without resolution.
everyone had their opinion, and growing tired of the debate,
agreed to disagree.

as far as:

> actively participate in "movements" to counteract the
> negative force of "inforced capatilism".

It is the authors choice how they license their software.
which means if Larry Wall wants to use the Artistic License,
then Larry Wall can use the artistic license. you cant
force him to change the license. you might be able to 
have a conversation with him and convince him to strengthen
the license (if you perceive it to have weakness).

say the license does have a weakness, and Microsoft uses
it to their advantage. then you have no legal recourse
to enforce open-source (say-that-3-times-fast). 

your options at that point include:

convincing the company that open-source would be a 
benifit to the company. Netscape took this path
when they made their code open-source. RedHat is another
example of a for-profit company working with open
source to make money.

if that doesn't work, then, with no recourse to enforce
open-source, you could, out of frustration, resort to a 
public relations campaign. give the offending company 
enough bad press that they bend to outside economic 
pressure. convince enough people not to buy products
from the evil coorporation until they mend their ways.
I've never heard of a software boycott in the news,
but its worked in other industries. its ugly though,
and whipping up fervor among the consumers leaves everone
with a bad taste in their mouth, even if you get what
you wanted.

so if you want to start a "movement to protect perl
as open-source", you have three basic targets:
1) the license, convincing perl authors to use a strong license
2) the companies, convincing the CEO's and company presidents
3) the consumers, convincing users to avoid certain software.

my opinion on the matter is to focus on (1), since that
should, in theory, be the easiest target, since you should be
"preaching to the choir". The recent debate shows this to
be otherwise. 

Everyone in the choir wants to sing the praises of open-source.
but it turns out that everyone in the choir has
a different interpretation on the sheet music in front of them.

but I've been talking with fellow 
choirboys, and I should be talking with the conductor,
Larry Wall. unfortunately, I dont  know him, and dont
have his email address.

and in answer to other posts on this thread:
I do not work for Microsoft, nor one of its competitors.
I'm an asic designer. 

I've also contributed code to cpan. 
you can check out the next version of the Tk toolkit, 
(released within the next week)
and take a look at the changes made to the TextUndo.pm
widget. there should also be a new module on CPAN, 
called Hardware::Simulator, which is exactly what it
does. its an alpha release of the code, and I'm still
struggling with how I should license the module.

Greg


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

Date: 11 Jun 1999 15:27:41 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <slrn7m2atn.vvk.fl_aggie@thepentagon.com>

On Fri, 11 Jun 1999 13:35:32 GMT, Chris Nandor <pudge@pobox.com>, in
<pudge-1106990935370001@192.168.0.77> wrote:

+ Just for the sake of full disclosure, I mustr ask: are you employed by a
+ competitor of Microsoft's?

No.

+ Do you have any connection with any company or organization that
+ links your best interests against Microsoft's?

Yes, in a very broad sense of "connection".

James - just for the sake of disclosure, mind you... :)


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

Date: 11 Jun 1999 09:57:17 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Module.pod and Module.pm co-existence (was: Perldoc and Perlfaq)
Message-Id: <376131dd@cs.colorado.edu>

   [courtesy cc of this posting mailed to cited author et alios.]

In comp.lang.perl.misc, Gareth Rees <garethr@cre.canon.co.uk> writes:
:Gareth Rees wrote:
:> $ pod2man `pmpath Net::LDAP` | nroff -man
:> /apps/perl5/bin/pod2man: Invalid man page - no documentation in /apps/perl5/lib/site_perl/5.005/Net/LDAP.pm
:
:Tom Christiansen wrote:
:> That is not valid documentation.  Not my fault that people are
:> subclued.  They need to fix it.  Period.
:
:At the moment there's nothing in the perlmodlib manpage about this
:requirement.  If it is going to become a requirement that module
:documentation be in the .pm file and not in a separate .pod file then it
:ought to be a documented requirement.

Many files fail to contain adequate documentation.  For example,
/bin/cat is one such.  That doesn't make it an invalid file.  Another
is POSIX.pm, which is the more interesting case.  Its documentation 
resides in a completely separate file.  

Almost certainly there should be Makefile.PL support for this kind
of configuration.  my reading of the MakeMaker documentation is that
it does indeed supports this, so I don't know precisely wherein resides
the problem.  That is, I do not know why the build process tries to run
Net/LDAP.pm through pod2man, since it found a Net/LDAP.pod file instead,
which suffices.

Because no module should be without documentation, we must have some
automatable system to correlate the module with its documentation.
Documentation that you can't find is of no use whatsoever.  There's
already enough of this going around in the standard distribution itself
that we should do what we can to discourage the practice.  It would
not be too terribly difficult to argue that this split situation is
undesirable because it runs counter to the notion that a module's
documentation should be easy to find given its module name.  However,
there's clearly precedent for splitting this into two pieces, and
perhaps doing so is sufficiently desirable not to be too dictatorial
and regulatory.

As for what sections are or are not required, the directions in the
pod2man documentation are there not merely to server as an exemplar of
a well-formed manpage in the traditional sense, but more importantly, to
help encourage a format that lends itself to easy indexing and structural
analysis.  These encouragements are encoded into the Perl code in pod2man
itself.  Although Nathan's laxative switch is an escape valve to this,
and it could if need be, be put into the Makefile.PL.  However, this
seems a subdesirable strategy.  If we can't create reasonable indices,
the documentation will suffer more than it already does.

--tom
-- 
 Timesharing: the use of several people by the computer


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

Date: Fri, 11 Jun 1999 10:25:54 -0400
From: dwilgaREMOVE@mtholyoke.edu (Dan Wilga)
Subject: Re: ms sql databases and perl on unix
Message-Id: <dwilgaREMOVE-1106991025540001@wilga.mtholyoke.edu>

In article <7jpevo$v8m$1@nnrp1.deja.com>, victor@mill.net wrote:

> I would like to access a Microsoft SQL server from a machine running
> Solaris 2.7 using Perl.  Has anybody had any luck with this, or knows
> where I need to start looking?
> 

I'm using DBI and DBD::ODBC to access an MS-SQL 6.5 database which resides
on an NT box. The client machine is running Redhat Linux. It works pretty
well, once you get past the initial setup.

The hardest part is finding an MS_SQL ODBC driver. I ended up using the
one from Open Link (openlinksw.com). I don't know if they have a Solaris
version, though.

Dan Wilga          dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply  **


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

Date: Fri, 11 Jun 1999 07:48:49 -0800
From: regurg <anonymous@web.remarq.com>
Subject: multiple match & replace regexp
Message-Id: <929116131.27132@www.remarq.com>

I have a need to trigger an action when I see several things
occur in a string based on a re. Say I have special
delimiters that delimit 3 things in a line of text. I am
interested in what is delimited. I know that I can use
parenthesis in the re to isolate these, and that I can refer
to the things matched as $1, $2, $3. I know that I can do
this with my re:
     if (/...( )...( )...( )/) {
     }
Ignore what the .'s are, and assume there is some good stuff
within the parenthesis. The match succeeds. The conditional
will return true, and inside the curleys I can reference the
matches as $1, $2, $3. This I know.

What I don't know, however is this: what if I want to
replace $1 ... $3 with something else? Analagous to this
(which doesn't work):
     if (/...( )...( )...( )/) {
        $1 = "foo";
        $2 = "bar";
        $3 = "smar";
     }

I feel sure this has been answered before, but I
haven't been able to come up with a good search for
this in the archives :-(.

Note that an additional complication is that the delimiters
are the same... it is the occurance of 3 of them
consecutively that is important, and triggers the match.
This is why I don't include the delimiters in the ()'s.

Thanks in advance.



**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****


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

Date: Fri, 11 Jun 1999 09:04:00 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
To: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: OLE reference
Message-Id: <37611750.9D120FAB@mail.uca.edu>

[cc'd to js]

Jonathan Stowe wrote:
> 
> On Thu, 10 Jun 1999 10:55:03 -0700 David Cassell wrote:
> > Jonathan Stowe wrote:
> >>
> >> john kelly <johnt.kelly@worldnet.att.net> wrote:
> >> > Can anyone please point me to some examples of how to use OLE objects
> >> > for word.  The doc makes references to looking up the objects in VB or
> >> > C manuals but I don't have any. Other  then  snip its of code examples
> >> > here or there, thats all I can find.
> >  <http://msdn.microsoft.com/officedev/preview/technical/articles/word.asp
> >
> > Oops.  M$ has re-organized its site, and this page is kaput.
> 
> Are you sure - I cut and paste right there and then and I dont use a
> cache or a proxy ...

Well, it's not there @ 8:33 AM CDT, Friday. Darn, those guys are fast.
;)

But, if john wants to find working code to do things in M$ Word (as
examples of how to do it), he might want to wander through the
Perl-Win32-Users archives at www.activestate.com where we discuss this
fairly regularly and usually post our solutions for the record. Joining
the list wouldn't be a bad idea, either.

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu


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

Date: Fri, 11 Jun 1999 14:19:18 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Opening a returned web page in a new window...
Message-Id: <376913c4.21232971@enews.newsguy.com>

On Fri, 11 Jun 1999 04:02:21 GMT, R.Joseph
<streaking_pyro@my-deja.com> wrote:

>I would like to write a script that, when "submit" is clicked, the
>returned HTML page is opened in a new window (like TARGET=_new) and the
>user stays at the origanal page that he was at when he
>clicked "submit".  Thanks for any help!

NAPQ
(Not A Perl Question)

Ask in an HTML-related newsgroup.

Marcel



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

Date: Fri, 11 Jun 1999 14:19:19 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Opening many new windows...
Message-Id: <376a141f.21323771@enews.newsguy.com>

On Fri, 11 Jun 1999 04:28:22 GMT, R.Joseph
<streaking_pyro@my-deja.com> wrote:

>Ok, lets say I have a script that takes in user data, and then uses
>this data to search many different engines (like say, 8 search engines
>with the field the enter).  If I want each search engines results to
>come up in a new window, how would I accomplish this??  Thanks alot!

26 minutes later and still NAPQ.

This time it's more of a CGI-related issue. Ask in a CGI group.

Marcel



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

Date: Fri, 11 Jun 1999 14:21:57 GMT
From: izzac@my-deja.com
Subject: Out of Memory!!!
Message-Id: <7jr61p$gtg$1@nnrp1.deja.com>

Hi,I use the Iproc module on win95 and NT with perl 5.005.

I wrote a perl
program that launch many process and each process have a request to do on the
web, but after 1000 (approximatly) process I receive the error "Out of
memory".
So, I just wrote a little program that launch process with a script
that wait 2 seconds and dies after.  After 8000 process I receive the same
error message.	The difference of 7000 process is probably because that my
little script launched in process take less memory that my process that make
a request.
-----------------------
my($compteur) = 0;
my(@obj);

for
($c=0;$c<=9;$c++) {	$obj[$c]=new Win32::IProc || die;
     
$obj[$c]->LastError;}

$alive=1;
while ($alive) {
	$alive=0;
	for
($c = 0; $c <= $#obj; $c++) {
$obj[$c]->GetExitCode($obj[$c]->{ProcessHandle},\$ExitCode);	      if
((!defined($ExitCode) || $ExitCode == 0 || $ExitCode == 2) && ($compteur <
10000)) {			  $obj[$c]->ExitProcess($ExitCode); print
"EXIT PROCESS FAIT\n"; 		$obj[$c] = new Win32::IProc || die;
 
		  $obj[$c]->LastError; print "last error feni!\n";	     
	    $obj[$c]->Create(NULL,"perl
run.pl",INHERITED,CREATE_NO_WINDOW,".",		     
$Title,SW_SHOWDEFAULT,200,200,300,300,$Attributes);		     
$compteur++;			$alive=1;
		}
		else
{ if ($ExitCode == 259) { $alive=1; }}    }	   
}	   


---------------
if anybody have an idea, please tell me!izzac


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 11 Jun 1999 16:27:52 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Out of Memory!!!
Message-Id: <37612af8@newsread3.dircon.co.uk>

izzac@my-deja.com wrote:
> Hi,
> program that launch many process and each process have a request to do on the
> web, but after 1000 (approximatly) process I receive the error "Out of
> memory".
> that wait 2 seconds and dies after.  After 8000 process I receive the same
> error message.	The difference of 7000 process is probably because that my
> little script launched in process take less memory that my process that make
> a request.
> ($c=0;$c<=9;$c++) {
> $obj[$c]->LastError;
> ($c = 0; $c <= $#obj; $c++) {
> $obj[$c]->GetExitCode($obj[$c]->{ProcessHandle},\$ExitCode);
> ((!defined($ExitCode) || $ExitCode == 0 || $ExitCode == 2) && ($compteur <
> 10000)) {
> "EXIT PROCESS FAIT\n";
> 		  $obj[$c]->LastError; print "last error feni!\n";
> 	    $obj[$c]->Create(NULL,"perl
> run.pl",INHERITED,CREATE_NO_WINDOW,".",
> $Title,SW_SHOWDEFAULT,200,200,300,300,$Attributes);
> $compteur++;
> { if ($ExitCode == 259) { $alive=1; }}
> if anybody have an idea, please tell me!
> 

Sorry I think your newsreader has screwed up your post ...

/J\
-- 
"Of course I smoke pot, but I'm not in favour of legalizing it. The
working classes do little enough as it is..." - Jonathan Aitken


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

Date: Fri, 11 Jun 1999 14:39:43 GMT
From: izzac@my-deja.com
Subject: Re: Out of Memory!!!
Message-Id: <7jr73d$hb4$1@nnrp1.deja.com>

oups! sorry for the code in my last message...another try;

my($compteur) =
0;my(@obj);

for ($c=0;$c<=9;$c++) {
	$obj[$c]=new Win32::IProc || die;
 
$obj[$c]->LastError;}

$alive=1;
while ($alive) {
  $alive=0;
  print $#obj;
print " ICI\n";  for ($c = 0; $c <= $#obj; $c++) {
 
$obj[$c]->GetExitCode($obj[$c]->{ProcessHandle},\$ExitCode);  if
((!defined($ExitCode) || $ExitCode == 0 || $ExitCode == 2) && ($compteur <
10000)) {  $obj[$c]->Create(NULL,"perl run.pl",INHERITED, 
CREATE_NO_WINDOW,".",			   
$Title,SW_SHOWDEFAULT,200,200,300,300,$Attributes);  $compteur++;
 
$alive=1;  }
	else { if ($ExitCode == 259) { $alive=1; $nbalive++; }}
  }  
   }


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 11 Jun 1999 11:02:33 -0400
From: Songtao Chen <@cisco.com>
Subject: Perl class and constructor
Message-Id: <37612508.A9C956D4@cisco.com>

Hi everyone,

The code below (Person.pm) is from the perltoot manpage in Perl 5.004
package.

According to the manpage, we can do,

         use Person;

         $him = Person->new();
         $him->name("Jason");
         $him->age(23);
         $him->peers( "Norbert", "Rhys", "Phineas" );

I believe this is the right way to use the class. However,
since $him is the reference to the hash as returned from the
constructor,
we could also do this,

         ...
         $him->{'NAME'} = "John";
         $him->{'AGE'}     = 32;
         ...

Any comments for this ?

Question: how could I return something other than the
               reference to the anonymous hash and keep
               the object alive ?

Thanks,

Songtao

================ The Code ===================
package Person;
use strict;

##################################################
## the object constructor (simplistic version)  ##
##################################################
sub new {
    my $self  = {};
    $self->{NAME}   = undef;
    $self->{AGE}    = undef;
    $self->{PEERS}  = [];
    bless($self);           # but see below
    return $self;
}

##############################################
## methods to access per-object data        ##
##                                          ##
## With args, they set the value.  Without  ##
## any, they only retrieve it/them.         ##
##############################################

sub name {
    my $self = shift;
    if (@_) { $self->{NAME} = shift }
    return $self->{NAME};
}

sub age {
    my $self = shift;
    if (@_) { $self->{AGE} = shift }
    return $self->{AGE};
}

sub peers {
    my $self = shift;
    if (@_) { @{ $self->{PEERS} } = @_ }
    return @{ $self->{PEERS} };
}

1;  # so the require or use succeeds







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

Date: Fri, 11 Jun 1999 11:23:41 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: Perl class and constructor
Message-Id: <376129FC.A5A5DFEE@mathworks.com>



Songtao Chen wrote:

> Hi everyone,
>
> The code below (Person.pm) is from the perltoot manpage in Perl 5.004
> package.
>
> According to the manpage, we can do,
>
>          use Person;
>
>          $him = Person->new();
>          $him->name("Jason");
>          $him->age(23);
>          $him->peers( "Norbert", "Rhys", "Phineas" );
>
> I believe this is the right way to use the class. However,
> since $him is the reference to the hash as returned from the
> constructor,
> we could also do this,
>
>          ...
>          $him->{'NAME'} = "John";
>          $him->{'AGE'}     = 32;
>          ...
>
> Any comments for this ?
>

Yes you can also do that.   SO??

>
> Question: how could I return something other than the
>                reference to the anonymous hash and keep
>                the object alive ?
>

Why would a constructor return something other than the Object??

>
> Thanks,
>
> Songtao
>
> ================ The Code ===================
> package Person;
> use strict;
>
> ##################################################
> ## the object constructor (simplistic version)  ##
> ##################################################
> sub new {
>     my $self  = {};
>     $self->{NAME}   = undef;
>     $self->{AGE}    = undef;
>     $self->{PEERS}  = [];
>     bless($self);           # but see below
>     return $self;
> }
>
> ##############################################
> ## methods to access per-object data        ##
> ##                                          ##
> ## With args, they set the value.  Without  ##
> ## any, they only retrieve it/them.         ##
> ##############################################
>
> sub name {
>     my $self = shift;
>     if (@_) { $self->{NAME} = shift }
>     return $self->{NAME};
> }
>
> sub age {
>     my $self = shift;
>     if (@_) { $self->{AGE} = shift }
>     return $self->{AGE};
> }
>
> sub peers {
>     my $self = shift;
>     if (@_) { @{ $self->{PEERS} } = @_ }
>     return @{ $self->{PEERS} };
> }
>
> 1;  # so the require or use succeeds



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

Date: Fri, 11 Jun 1999 10:46:29 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Perl on win32
Message-Id: <1dt4ytd.gzsypbxvqym6N@[192.168.0.1]>

Steffen Beyer <sb@sdm.de> wrote:

> > If you open a DOS window and run your script from the command line,
> > instead of clicking on the name in Explorer or using the Start -> Run ->
> > {Insert name here} method, the DOS box will not close automatically. You
> > (or at least I) absolutely HAVE to do this when you are (I am)
> > writing/debugging a script for the obvious reasons.
> 
> Yes, of course you can always do that. But then you don't benefit from
> the double-click on the program icon at all.
> 
> My question was, how can I avoid the automatic closing of the MSDOS window
> WHEN I DOUBLE-CLICK the program icon?

I have very little experience with Windows, but couldn't you set it up
so that the default action when a '.pl' is double-clicked, it starts the
shell and tells it to run the Perl script, so when the script finishes,
you are left at a MS-DOS prompt?

-- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.
    


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

Date: Fri, 11 Jun 1999 10:30:30 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
To: Kevin Reid <kpreid@ibm.net>, Steffen Beyer <sb@engelschall.com>
Subject: Re: Perl on win32
Message-Id: <37612B96.48BD9997@mail.uca.edu>

[cc'd to kr, sb]

Steffen, your post that kevin is replying to here hasn't come to the
newsserver I read yet, so:

Kevin Reid wrote:
> 
> Steffen Beyer <sb@sdm.de> wrote:
> 
> > [snip]
> > My question was, how can I avoid the automatic closing of the MSDOS window
> > WHEN I DOUBLE-CLICK the program icon?
> 
> I have very little experience with Windows, but couldn't you set it up
> so that the default action when a '.pl' is double-clicked, it starts the
> shell and tells it to run the Perl script, so when the script finishes,
> you are left at a MS-DOS prompt?

No, AFAIK, you can't do that. I'm assuming that if you could, it would
have shown up in the ActiveState FAQs by now, because a *lot* of people
have asked that same question over the past couple of years. I have
never seen anyone give a positive answer in any forum.

However, if you double-click on "perl.exe" then you get an empty DOS box
into which you can type your program (but not the name of a program)
which will execute upon hitting ^Z. This is in the FAQ, and it can be
useful, but it's not what you asked for (and the box goes away again,
anyway).

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu


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

Date: 11 Jun 1999 09:31:01 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perldoc and Perlfaq
Message-Id: <slrn7m27tn.37n.abigail@alexandra.delanet.com>

Tom Christiansen (tchrist@mox.perl.com) wrote on MMCX September MCMXCIII
in <URL:news:37604c35@cs.colorado.edu>:
__      [courtesy cc of this posting mailed to cited author]
__ 
__     Manifying blib/man3/URI::URL::ldap.3pm
__     /usr/local/perl/bin/pod2man: lib/URI/URL/ldap.pm is missing required section: DESCRIPTION
__ 
__ That is not valid documentation.  Not my fault that people 
__ are subclued.  They need to fix it.  Period.


It's not valid documentation if it doesn't have a section named 'DESCRIPTION'?
That's insane. 

The Art of Computer Programming doesn't have a section named 'DESCRIPTION'
either, but I don't think that invalidates it as documentation.

The requirements pod2man makes are arbitrary and just because a pod doesn't
have sections that traditional man pages often have doesn't make it
non-documentation.


Abigail
-- 
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 11 Jun 1999 14:22:05 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: problems with specific words in text field
Message-Id: <376f1b13.23103290@enews.newsguy.com>

On 11 Jun 1999 09:44:29 -0500, "Arie" <elkins@tcntr.dyniet.com> wrote:

>
>I have got some forms that are generated 
>dynamically by perl, and for the most part 
>they work great.  One problem I am having, 
>however, is when the user enters the 
>word "action" in the text fields.  For some 
>reason the script handles it oddly.  
>Everything after, and including, the 
>word "action" is eliminated when it is 
>written to the database.  Is there any way 
>around this problem?  It would be of great 
>help if we could actually allow the user to 
>enter the word "action"  If you need me to 
>post the script just let me know

Three possibilities come to mind:

1) It's an HTML problem. Go ask in a HTML group.

2) It's a CGI problem. Go ask in a CGI group.

3) It's a problem on line 17 of your Perl program. Post some code.
But please, only essential parts of it, not more than 40 lines.

HTH

Marcel



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

Date: 12 Jun 1999 04:30:58 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: quiz for perl professionals
Message-Id: <slrn7m23gg.1l5.hasant@borg.intern.trabas.co.id>

On 10 Jun 1999 17:03:24 -0400, Uri Guttman <uri@sysarch.com> wrote:
> >>>>> "KG" == Kiriakos Georgiou <kgnews@olympiakos.com> writes:
> 
>   KG> How do you find the length of an array?
> 
> measure it with a scalar ruler.

perldata

>   KG> In the context of regular expressions, what does \S+ stand for ?
> 
> that would be telling. i am not a regex, i am a free man!!

perlre

>   KG> How would you count the number of words in a string?
>   KG>   (split it and use scalar context on the array)
> 
> 1, 2, 3, 4 ....

perlfaq4

>   KG> What does 'eval' do?
> 
> the opposite of gud. i wish more perl hackers worked for gud than eval.

-f eval

>   KG> Why wouldn't you want to put an eval in a loop?
> 
> because what eval goes around, comes around.

just a thought, $www_security_faq[7][49]

>   KG> How would you get around the problem in the previous question?
> 
> nail your other foot to the floor.
> 
>   KG> What will    $_ = eval 'sub { print @_; }';   print?
> 
> who cares. the world will be a cold lifeless rock in 5 billions years. :-(

-f print
-f eval
perlsub
< that many? >

>   KG> what does it do?
> 
> what does what do?

-f do
?

>   KG> what will  &$_(1,2,3);   do?
> 
> do-be-do-be-do! (my condolences to mel torme'e family)

perlref

>   KG> What is the difference between 'local' and 'my'?
> 
> my train is not the local, but the express.
> 
>   KG> How do you pass parameters by value?
> 
> do not pass parameters, do not collect $200.
> 
>   KG> How do you pass parameters by reference?
> 
> you don't refer to parameters, instead you imply you have them.

perlsub

>   KG> Can you describe what the taint mode does?  Can you name of any ways for
>   KG> untainting tainted data?
> 
> always check if your oysters aren't tainted before taking their perls.

perlsec


Thanks for providing this quiz  :-)

-- 
-hasan-
uhm, no more sig(h)


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

Date: Fri, 11 Jun 1999 10:34:53 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: quiz for perl professionals
Message-Id: <37612C9D.AB4675CF@mail.uca.edu>

Uri Guttman wrote:
> 
> [other remarkably insightful answers snipped]
>   KG> Can you describe what the taint mode does?  Can you name of any ways for
>   KG> untainting tainted data?
> 
> always check if your oysters aren't tainted before taking their perls.

alternately, bleach might take care of it, but it may also remove some
of the shine.

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu


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

Date: Fri, 11 Jun 1999 05:04:02 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Silly old me
Message-Id: <2ejqj7.7q6.ln@magna.metronet.com>

CacheBoy (chongsun@krdl.org.sg) wrote:

: Hi, from the quality of the replies here, some of you really know your
: stuff.


   You can too if you will take advantage of the documentation
   that came with your perl distribution...


: I would like to inquire abt who is the father/fathers of perl.


   perldoc perlhist


: Thanks. Pls understand that I am very new to perl and my knowledge is not as
: much as most of you here so please refrain from giving me the
: you-mean-dont-know kind of answers.


   You mean you don't know to check Perl's standard docs before
   posting to the Perl newsgroup?

   Monitor    news.announce.newusers      for a few weeks to see
   how things are to be done on Usenet.



   Use the docs Luke.


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


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

Date: 11 Jun 1999 14:13:09 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: Verifying date data
Message-Id: <7jr5hl$3g6$1@solti3.sdm.de>

In article <7jqvsd$27p2@enews4.newsguy.com>, Skip Hollowell <thollowe@opentext.com> wrote:

> I have some data in a text file and I need to verify if the dates are valid
> They are in the YYYYMMDD format.  I haven't found any data funtions
> that will let me do this.

> The offending data should be changed so that if a month is listed as 00,
> it changes to 01, and the same for a day of 00.

> Any ideas?  Regular expressions just don't seem to be cutting it either.

Perl modules and the FAQ are your friends.

Check out Date::Manip or Date::Calc.

See
    http://www.perl.com/CPAN/modules/by-module/Date/
    http://www.perl.com/CPAN/authors/id/STBEY/
    http://www.engelschall.com/u/sb/download/
for downloading them.

-- 
    Steffen Beyer <sb@engelschall.com>
    http://www.engelschall.com/u/sb/whoami/
    http://www.engelschall.com/u/sb/download/
    http://www.perl.com/CPAN/authors/id/STBEY/
    http://www.oreilly.de/catalog/perlmodger/bnp/


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

Date: Fri, 11 Jun 1999 14:26:43 GMT
From: michc@my-deja.com
Subject: Re: Verifying date data
Message-Id: <7jr6al$h1s$1@nnrp1.deja.com>

In article <7jqvsd$27p2@enews4.newsguy.com>,
  "Skip Hollowell" <thollowe@opentext.com> wrote:
> I have some data in a text file and I need to verify if the dates are valid
> They are in the YYYYMMDD format.  I haven't found any data funtions
> that will let me do this.
>
> The offending data should be changed so that if a month is listed as 00,
> it changes to 01, and the same for a day of 00.


This is what I would do.

I would use substr to separate YYYY MM and DD.

ex.
$year = substr($date, 0, 4);
$month = substr($date, 4, 2);

Then you do your comparison:

if ($month < 1 || $month > 12) {
  $month = 1;
}

That's it!

Michelle




Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 11 Jun 1999 15:32:53 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Verifying date data
Message-Id: <slrn7m2b7g.vvk.fl_aggie@thepentagon.com>

On Fri, 11 Jun 1999 14:26:43 GMT, michc@my-deja.com <michc@my-deja.com>, in
<7jr6al$h1s$1@nnrp1.deja.com> wrote:

+ I would use substr to separate YYYY MM and DD.

In this case, unpack() is your friend. One operation, not three.

$date='19990901'; 
($year,$mon,$day)=unpack("A4A2A2",$date);
print "$day/$mon/$year\n";

Results: 01/09/1999

James


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

Date: Fri, 11 Jun 1999 10:58:01 -0400
From: "Skip Hollowell" <thollowe@opentext.com>
Subject: Re: Verifying date data
Message-Id: <7jr835$2buj@enews4.newsguy.com>

This isn't an option as the customer hasn't the libraries, and will not
install them.  Here is the workaround I came up with.  I know it doesn't
take into account things like Feb 30, but it is 90% of what I need.

Thanks for the reply.

    $year = substr($line, 4, 4);
    $month = substr ($line, 8, 2);
    $day = substr ($line, 10, 2);
    if (($year <= 1600) || ($year >= 2200)) {
      $year = "0000";
      $month = "00";
      $day = "00";
    }
    else {
      if (($month < 01) || ($month > 12)) {
        $month = "01";
      }
      if (($day < 01) || ($day > 31)) {
        $day = "01";
      }
    }
    $line = "DP: " . $year . $month . $day . "\n";
    $line =~ s/00000000//g;

Steffen Beyer wrote in message <7jr5hl$3g6$1@solti3.sdm.de>...
>In article <7jqvsd$27p2@enews4.newsguy.com>, Skip Hollowell
<thollowe@opentext.com> wrote:
>
>> I have some data in a text file and I need to verify if the dates are
valid
>> They are in the YYYYMMDD format.  I haven't found any data funtions
>> that will let me do this.
>
>> The offending data should be changed so that if a month is listed as 00,
>> it changes to 01, and the same for a day of 00.
>
>> Any ideas?  Regular expressions just don't seem to be cutting it either.
>
>Perl modules and the FAQ are your friends.
>
>Check out Date::Manip or Date::Calc.
>
>See
>    http://www.perl.com/CPAN/modules/by-module/Date/
>    http://www.perl.com/CPAN/authors/id/STBEY/
>    http://www.engelschall.com/u/sb/download/
>for downloading them.
>
>--
>    Steffen Beyer <sb@engelschall.com>
>    http://www.engelschall.com/u/sb/whoami/
>    http://www.engelschall.com/u/sb/download/
>    http://www.perl.com/CPAN/authors/id/STBEY/
>    http://www.oreilly.de/catalog/perlmodger/bnp/




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

Date: 11 Jun 1999 08:17:25 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: What's the "halting problem"?
Message-Id: <m3zp26vn2i.fsf@moiraine.dimensional.com>

John Porter <jdporter@min.net> writes:

> In article <7joshb$nen$1@pegasus.csx.cam.ac.uk>,
>   mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
> >          my_complcated_function() ? "19$year" : 1900+$year;
> >
> > Determining whether that has a Y2K bug is clearly equivalent to the
> > halting problem.
> 
> Yes; and
> 
>          my_truly_random_function() ? "19$year" : 1900+$year;
> 
> is equivalent to Schroedinger's famous thought-experiment.

Yes, but it is now some poor hacker someplace who is
both dead and not-dead.  I wonder what that feels like?

:-)

dgris
-- 
Daniel Grisinger          dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: Fri, 11 Jun 1999 10:24:51 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: What's the "halting problem"?
Message-Id: <B386947396681D3509@204.112.166.88>

In article <m3zp26vn2i.fsf@moiraine.dimensional.com>,
Daniel Grisinger <dgris@moiraine.dimensional.com> wrote:

>John Porter <jdporter@min.net> writes:
>
>> In article <7joshb$nen$1@pegasus.csx.cam.ac.uk>,
>>   mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
>> >          my_complcated_function() ? "19$year" : 1900+$year;
>> >
>> > Determining whether that has a Y2K bug is clearly equivalent to the
>> > halting problem.
>> 
>> Yes; and
>> 
>>          my_truly_random_function() ? "19$year" : 1900+$year;
>> 
>> is equivalent to Schroedinger's famous thought-experiment.
>
>Yes, but it is now some poor hacker someplace who is
>both dead and not-dead.  I wonder what that feels like?

I'm feeling both hale and deathly ill, thank you.

Lee




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

Date: Fri, 11 Jun 1999 15:57:54 +0100
From: Ben Hambidge <ben@expo-systems.co.uk>
Subject: Win95/DOS - can't install modules
Message-Id: <M06+sAAyPSY3EAXx@expo-systems.co.uk>

I'm trying to install DBD::Xbase and MIME::Base64 modules, but I'm
guessing (as with everything else round here :-)) that its all intended
for UNIX.

I've downloaded a few incantations of Perl. The instructions for install
a CPAN module always involve 'perl Makefile.pl'.

This then creates a 'Makefile' file. Typing 'make' then does nothing.

Am I right in assuming this is a C makefile? I next tried downloading
DJGPP and running make, but then I got the following error:

make.exe: *** [blib\lib\MIME\.exists] Error -1

Where am I going wrong? What am I supposed to be doing? I've tried the
FAQs, the Camel book and Dejanews, so I think I'm not asking a over-
repeated question.

Many thanks for all help,

-- 
Ben Hambidge


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 5962
**************************************

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