[9010] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2628 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 18 14:12:21 1998

Date: Mon, 18 May 98 11:00:34 -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           Mon, 18 May 1998     Volume: 8 Number: 2628

Today's topics:
        Benchmark: \s against [ \t] <jari.aalto@poboxes.com>
    Re: Benchmark: \s against [ \t] <jdf@pobox.com>
    Re: Benchmark: \s against [ \t] (Mark-Jason Dominus)
    Re: can't find uninitialized value after while block, c <suthsc@ncs.com>
    Re: can't find uninitialized value after while block, c <rootbeer@teleport.com>
        code for a Download Button <pmercer@verio.net>
    Re: code for a Download Button <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: code for a Download Button <rootbeer@teleport.com>
    Re: Deleteing files (Shaun Sides)
    Re: Does Perl have a IDE?I don't like command line. (Michael J Gebis)
    Re: Does Perl have a IDE?I don't like command line. <jsd@gamespot.com>
    Re: Getting started <rootbeer@teleport.com>
        How do I get STDOUT back? (Mark666769)
    Re: how do I hide or noecho terminal input <aqumsieh@matrox.com>
        How does perl connect to Sybase SQLanywhere database? <phengl@ir-optima.com>
    Re: How to generate random passwords? (Arthur Clune)
    Re: How to generate random passwords? (Arthur Clune)
        How to make IIS 2.0/3.0 execute perl script? <phengl@ir-optima.com>
        How to make IIS 3.0 execute perl script? <phengl@ir-optima.com>
    Re: How to open Sybase SQLanywhere with Perl? <frankie@etsetb.upc.es>
    Re: Is if ($a="something") a bad style? (John Moreno)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 18 May 1998 19:20:27 +0300
From: Jari Aalto <jari.aalto@poboxes.com>
Subject: Benchmark: \s against [ \t]
Message-Id: <ptremxrh7p0.fsf@uta.fi>


    I have played with benchmark and I thought that \s was somehow
    specially optimized. Would someone comment if my bencmark method was wrong
    or does \s just get translated to [ \t] when compiling the regexp?

    jari

    perl 5.4.4 :

            timethese( 10000,
            {
                a =>
                '$_ = "a "; for (1..100) {  /a\s+/ }'
                ,
                b =>
                '$_ = "a "; for (1..100) { /a[ \t]+/ }'
            });

            a: 13 secs (12.84 usr  0.01 sys = 12.85 cpu)
            b: 13 secs (12.81 usr  0.01 sys = 12.82 cpu)


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

Date: 18 May 1998 13:14:34 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Jari Aalto <jari.aalto@poboxes.com>
Subject: Re: Benchmark: \s against [ \t]
Message-Id: <pvhbzbsl.fsf@mailhost.panix.com>

Jari Aalto <jari.aalto@poboxes.com> writes:

> I have played with benchmark and I thought that \s was somehow
> specially optimized.

Versus what?

> Would someone comment if my bencmark method was wrong or does \s
> just get translated to [ \t] when compiling the regexp?

Those are not exclusive options.  \s is indeed a character class,
though it includes *all* whitespace.

>     perl 5.4.4 :

Talk about crazy, bleeding-edge development releases...

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: 18 May 1998 13:14:56 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Benchmark: \s against [ \t]
Message-Id: <6jpqag$bq6$1@monet.op.net>
Keywords: epitaph girlish inevitable vaccinate


In article <ptremxrh7p0.fsf@uta.fi>,
Jari Aalto  <jari.aalto@poboxes.com> wrote:
>    or does \s just get translated to [ \t] when compiling the regexp?

It doesn't, and they're not the same thing anyway.


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

Date: 18 May 1998 10:43:30 -0500
From: Scott Sutherland <suthsc@ncs.com>
To: jdf@pobox.com
Subject: Re: can't find uninitialized value after while block, causing warning
Message-Id: <u7m3j37q5.fsf@ncs.com>

[cc'ed to original author]
Jonathan Feinberg <jdf@pobox.com> writes:

> 
> use strict has nothing to do with an uninitialized value warning.  The
> warning comes from the use of -w.

ok, but I still can't find what it's catching (or thinks its
catching)...

> 
> >   while ($dbh->ct_results($restype) == CS_SUCCEED) {
> > 	if ($self->{'_debug'}) {
> > 	  $self->reportResultType($restype);
> > 	}
> > 
> 	[snip]
> >   }
> > 
> >   if ($self->{'_debug'} & 8) { ### <<<--- causes uninitialized
> >                                ###        warning...
> 
> Are you *quite* sure that that loop is executing at all?

yes...

> Have you put a print statement before that if?  Have you run this
> code in the debugger?

yes.  The debugger does the following: (I'm going to paraphrase in the
interest of the group)

--- begin paste ---
D:\usr\src\Gbes>perl -d extract.pl -a app1 -d 16 -U <username> -P <password> -S <server>

Loading DB routines from perl5db.pl version 1.01
Emacs support available.

Enter h or `h h' for help.

main::(extract.pl:9):   require 5.004;
  DB<1> b GBES::Physical::Database::execProcedure
  DB<2> c

[Mon May 18 10:19:11 1998][main][232]: starting extract

[Mon May 18 10:19:11 1998][main][232]: 1 applications to be generated.

[Mon May 18 10:19:11 1998][GBES::Physical::Database][232]: Starting sp_GetAppInformation
    processing...
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:250):
250:      my $self = shift;
  DB<2> n
[variable initialization deleted]
[successfull database open deleted]
[successfull ct_command deleted]
[successfull ct_param calls deleted]
  DB<2>
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:333):
333:      $rc = $dbh->ct_send;
  DB<2>
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:334):
334:      if ($rc != CS_SUCCEED) {
  DB<2>
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:368):
368:      if ($self->{'_debug'} & 8) {
  DB<2>
Use of uninitialized value at d:\win32app\perl5.004\lib/perl5db.pl line 1134,
        <IN> chunk 30 (#1)

    (W) An undefined value was used as if it were already defined.  It was
    interpreted as a "" or a 0, but maybe it was a mistake.  To suppress this
    warning assign an initial value to your variables.

Use of uninitialized value at d:\win32app\perl5.004\lib/perl5db.pl line 1134, <IN> chunk 30.
        diagnostics::warn_trap('Use of uninitialized value at
d:\win32app\perl5.004\lib/perl5db....'  ) called at
d:\win32app\perl5.004\lib/perl5db.pl line 1134
        GBES::Physical::Database::execProcedure('GBES::Physical::Database=HASH(0xcabce0)',
'sp_GetAp pInformation', 'HASH(0xcaa86c)') called at
GBES/Physical/Database.pm line 482
        GBES::Physical::Database::execGetAppInfo('GBES::Physical::Database=HASH(0xcabce0)',
1) calle d at GBES/Physical/App.pm line 138 
[deleted the rest of the stack trace]
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:340):
340:            if ($self->{'_debug'}) {
  DB<2>
GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:341):
341:              $self->reportResultType($restype);
  DB<2> w 368
365             }
366:      }
367
368:      if ($self->{'_debug'} & 8) {
369:            main::dumpValue($result);
370       }
371
372:      if ($self->{'_debug'} & 4) {
373:            main::message('Database', 'exec_procedure()');
374       }
  DB<3> w 334
331       ### we've successfully processed all the params, so now, we need
332       ### to send the command to the server...
333:      $rc = $dbh->ct_send;
334:      if ($rc != CS_SUCCEED) {
335:            croak "ct_send failed on proc($procName)";
336       }
337
338       ### Now the hard part... processing the results...
339:      while ($dbh->ct_results($restype) == CS_SUCCEED) {
340:            if ($self->{'_debug'}) {
  DB<4>
--- end paste ---

so, what I see happening is execution up to the if statement @334,
then a jump PAST the while to 368, which issues a warning, then
execution back inside the while.  The program runs successfully to
completion and produces the expected results...

the $self->{'_debug'} value is set with something like the following
where param is a hash created from input parameters:

%param = @_;
$self->{'_debug'} = $param{'debug'} || 0;

execution without the debuger gives the following warning:

--- begin paste ---
Use of uninitialized value at GBES/Physical/Database.pm line 368 (#1)

    (W) An undefined value was used as if it were already defined.  It was
    interpreted as a "" or a 0, but maybe it was a mistake.  To suppress this
    warning assign an initial value to your variables.
--- end paste ---

any thoughts?

Scott

-- 
Scott Sutherland                          National Computer Systems
(319) 354-9200                        Measurement Services Division
<mailto:sut92199@ncs.com>                             Iowa City, Ia
#include "standard-disclaimer.h"


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

Date: Mon, 18 May 1998 16:58:34 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Scott Sutherland <suthsc@ncs.com>
Subject: Re: can't find uninitialized value after while block, causing warning
Message-Id: <Pine.GSO.3.96.980518095231.28732V-100000@user2.teleport.com>

On 18 May 1998, Scott Sutherland wrote:

> GBES::Physical::Database::execProcedure(GBES/Physical/Database.pm:368):
> 368:      if ($self->{'_debug'} & 8) {
>   DB<2>
> Use of uninitialized value at d:\win32app\perl5.004\lib/perl5db.pl line 1134,

Okay; either there's no key of '_debug' in that hash, or there is a key,
but the value is undef. Just before that line executes, you may use the
debugger command 'x \$self' to see which it is. 

If you thought you had put a value into that hash, use the debugger to
examine the hash just before and just after executing the statement which
was intended to do that. It may be useful to set a breakpoint at that
statement, especially if the initialization may be within a loop or
subroutine which could set it more than once.

Hope this helps!

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



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

Date: Mon, 18 May 1998 11:06:14 +0100
From: pat mercer <pmercer@verio.net>
Subject: code for a Download Button
Message-Id: <35600816.39E9@verio.net>

does anybody know how to code a Download Button?

here's the situation ... i need a submit button that when the 
user clicks on it, a "Save-As" window will pop up in the user's
browser.  how do you do this?  i've seen examples, but i've 
never seen the code.

can anyone help me out?
thanks.

-pat mercer


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

Date: 18 May 1998 18:42:25 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: code for a Download Button
Message-Id: <7x90nzsf7y.fsf@beavis.vcpc.univie.ac.at>

Re: code for a Download Button, pat <pmercer@verio.net>
said:

pat> does anybody know how to code a Download Button?

Can't be done except with a very captive audience.

pat> here's the situation ... i need a submit button that
pat> when the user clicks on it, a "Save-As" window will pop
pat> up in the user's browser.  how do you do this?  i've

You can't *force* user agents to do things.

pat> seen examples, but i've never seen the code.

You can certainly output a raw octet stream triggered by a
link or by a FORM's submit action but what the browser does
with it is (IMHO rightly) out of your control.

  http://www-genome.wi.mit.edu/ftp/pub/software/WWW/

is the place to go for the CGI module which will make FORM
creation easy in perl.

-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.


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

Date: Mon, 18 May 1998 17:02:28 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: pat mercer <pmercer@verio.net>
Subject: Re: code for a Download Button
Message-Id: <Pine.GSO.3.96.980518095934.28732W-100000@user2.teleport.com>

On Mon, 18 May 1998, pat mercer wrote:

> i need a submit button that when the user clicks on it, a "Save-As"
> window will pop up in the user's browser. 

If you want a user's browser to do something, it's a simple matter of
sending it the right commands. Those commands are discussed in docs, FAQs,
and newsgroups about HTML, HTTP, browsers, servers, and CGI scripting. 
Perhaps one of those sources will be able to help you. Good luck!

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



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

Date: 18 May 1998 16:58:41 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: Deleteing files
Message-Id: <slrn6m0q4j.k4r.arch@abts.net>

Original message by: q2020262@my-dejanews.com <q2020262@my-dejanews.com>
Date: Mon, 18 May 1998 11:01:11 GMT
Subject: Deleteing files


> Can somebody decribe to me what I need to do to delete a file using perl, I am
> using the 'unlink' command at the moment, I had it working a while back but
> no, but the files still remain now.
> 
> And if you're wondering I have made sure the permissions and addresses are
> correct.

unlink LIST;

is given in the camel book as the way to delete a file using Perl.  You
can check in the program to see if the file(s) are being deleted.
unlink's return value is the number of files deleted successfully.  If
you're using unlink correctly and it isn't working, the only answer can
be that your permissions or pathnames or something of that nature are
not in line.

-- 
Shaun L. Sides			arch@abts.net
Business web site		http://www.abts.net/~arch
Showershoe web site		http://www.abts.net/~arch/showershoe
Recreational web site		http://sara.mmlc.nwu.edu/~arch


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

Date: 18 May 1998 17:29:48 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jpr6c$dsp@mozo.cc.purdue.edu>

gbacon@cs.uah.edu (Greg Bacon) writes:

}I find that having to go to the mouse too frequently really limits my
}productivity.

I should really point out that nobody's arguing that YOU need an IDE.
Your arguments are not as convincing for the casual programmer.

}: The IDE also makes
}: the annoying and tedious part of writing win32 programs (designing the
}: interface) trivial, which is good, because I've got better things to worry
}: about than implementing a button.

}What of Tk?  Tk code will run on many, many, many more platforms than
}the hoarde fodder will.

I think you mean, "What of SpecTCL, the tool that allows you to do Tk
GUI design, since Tk itself does nothing to alleviate the problem
mentioned."

(Appropos nothing: what's the TCL test suite called?  TestTCL.")

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: Mon, 18 May 1998 10:36:46 -0700
From: Jon Drukman <jsd@gamespot.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <356071AE.E0DE0E9D@gamespot.com>

Abigail wrote:
> ++ > Well, one of the largest Unix vendors (if not the largest) Sun
> ++ > doesn't deliver a compiler with its OS either. If you want one, you
> ++ > have to pay.
> ++ Do you pay for gcc?
> 
> gcc is hardly native to SunOS, is it? Besides, how do you build gcc
> without a compiler?

there are prebuilt packages you can download.  your original statement:
"if you want one [c compiler], you have to pay" is false.

> Really? A recent thread on p5p claimed that IRIX doesn't come with
> include files.

previously true - but no longer the case.
 

-- 
Jon Drukman                                            jsd@gamespot.com
-----------------------------------------------------------------------
Plan: Eat right, exercise regularly, die anyway.


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

Date: Mon, 18 May 1998 15:58:39 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Robert Grosche <ioptic@zip.com.au>
Subject: Re: Getting started
Message-Id: <Pine.GSO.3.96.980518084916.28732M-100000@user2.teleport.com>

On Mon, 18 May 1998, Robert Grosche wrote:

> Newsgroups: comp.lang.perl.tk

I think you meant to post this to c.l.p.misc; this question doesn't seem
to be about Perl/Tk. Followups set.

> Subject: Getting started

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

    http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

>                             am just starting with pearl. Have bought nice Cd
> board and can't get it started on my providers Unix system.

A cadmium board? :-)  I don't know what it is, but it sounds like
hardware, so I'm not sure why you mention it here.

> Have harrassed many programmers and have checked Unix access levels
> until I was blue in the face. 

On Usenet, no one knows the color of your face. :-)

> Is there any small pearl script which could guide me through a bullet
> proof pearl installation.

If you don't have perl installed, it's pretty hard to run a perl script!

> My provider is cagy about detail and evades my questions.

If your sysadmin won't install Perl, get a new sysadmin. If your support
staff evade your questions, get a new support staff. (If your lunch has no
nutrients, get a new lunch. :-)

> I require something solid. SO far all the RWX type stuff looks ok
> (so far 4 programmers looked at it), but it still won't read into the
> private cgi-bin directories.

I'm not sure what that last sentence means. Are you trying to install Perl
into a cgi-bin directory? That's a BAD BAD BAD idea. But if you're trying
to do something else, I'm not sure what it is. Could you be trying to get
a server to run Perl scripts? If that's it, check your server's docs, or
other sources of server-related information. 

Good luck!

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



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

Date: 18 May 1998 17:56:50 GMT
From: mark666769@aol.com (Mark666769)
Subject: How do I get STDOUT back?
Message-Id: <1998051817565000.NAA02653@ladder01.news.aol.com>

Hi,

I need to redefine STDOUT to prevent a subroutine's output from being sent to
the browser.

I'm doing this:

	local *STDOUT;		# override STDOUT for this routine only
	open (STDOUT, '/dev/null');

	&subroutine;	# call the subroutine whose output needs to be supressed.

	close (STDOUT);
	undef *STDOUT;

	# I just lost STDOUT in the calling routine

However, I've now lost STDOUT for the remainder of the calling routine.

But if I do this:

	&squelch_output;

	# STDOUT is back to normal here

sub squelch_output {
	local *STDOUT;		# override STDOUT for this routine only
	open (STDOUT, '/dev/null');

	&subroutine;	# call the subroutine whose output needs to be supressed.

	close (STDOUT);
	undef *STDOUT;
}

sub subroutine {
	print "This won't show up\n";
}


 ... then I don't lose STDOUT in the calling routine.

Obviously, when squelch_output goes out of scope, it's resetting something.

My question is, how can I do the same thing - get rid of the redefinition of
STDOUT - myself, without using a subroutine to do it?

Thanks in advance.



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

Date: Mon, 18 May 1998 13:44:51 -0700
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: how do I hide or noecho terminal input
Message-Id: <35609DC3.6AE033E6@matrox.com>

Ignatius wrote:

> I am using STDIN to get user input.  I want to display "*"s for each
> character a user types in.  This is to get a password from a user and I
> don't want the password displayed as they type it in.  How do I do this?
> Thanks Lyle....

  What system are you working on?
Isn't this question in the FAQ? I remember seeing it there, as well as in
both the Llama and the Camel Book. And, if my memory serves me well, I saw
that same question on this newsgroup over 10 times in the last 2-3 weeks!

Ala



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

Date: 18 May 1998 15:53:05 GMT
From: "Pheng Lay" <phengl@ir-optima.com>
Subject: How does perl connect to Sybase SQLanywhere database?
Message-Id: <01bd8274$d33931c0$1c90d9cf@pheng-lay>

I have Sybase SQLanywhere 5.0 database running currently on our NT 4.0 with
IIS 3.0 and SP3.  I would like to write a perl script to connect and
open/update/close the databse.  The perl script will be launch by the java
applet.  What do I have to do or is does any one has any sample code on how
to connect to the SQLanywhere 5.0.  Any help is appreciated...thanks.

	phengl@ir-optima.com



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

Date: 18 May 1998 16:28:24 GMT
From: arthur@biber.york.ac.uk (Arthur Clune)
Subject: Re: How to generate random passwords?
Message-Id: <6jpnj8$aop$1@pump1.york.ac.uk>

Jennifer Telisky (teliskyj@kci.wayne.edu) wrote:
: Thanks for all your suggestions...  However, I'm still stumped on actually
: assigning the password to the account.  Does anyone know how to use the
: "getpwent", "setpwent" functions in perl.  I have an inkling that this will
: do the trick, however I can't find any synopsis on how to use these
: functions..

As I understand it, you need to write the password file out again...
Why not set up your new users into a array @newusers and then do

=========================
#!/usr/bin/perl -w

$i=0;
while(@details = getpwent){
  $oldusers[$i++] = [@details];
}

open(FH, '/etc/passwd') or die "Can't open /etc/passwd: $!\n";
flock FH, 2; # exclusive lock on my box
foreach (@oldusers){
  $line = join ':', @{$_};
  print FH "$line\n";
}

foreach (@newusers){
  $line = join ':', @{$_};
  print FH "$line\n";
}
flock FH, 8; # unlock
close FH;
===============================

Arthur

--
Dr. A. Clune, Network Control Group, Department of Mathematics,
University of York. Tex/Fax 01904 433097. 
http://biber.york.ac.uk/~arthur
Democracy is two wolves and a sheep arguing over lunch - Anon.



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

Date: 18 May 1998 16:44:32 GMT
From: arthur@biber.york.ac.uk (Arthur Clune)
Subject: Re: How to generate random passwords?
Message-Id: <6jpohg$gha$1@pump1.york.ac.uk>

What I forgot to say was, to set the password, take the output
of password generator of your choice, and feed it to crypt

$password = crypt 'fredgeo', $salt
$newusers[0][1] = $password;  

sets password assuming that 
$newsusers[$i] = ($name, $passwd, $uid, $gid, $quota, $comment, 
                   $gcos, $dir, Sshell);
                     
(see perldoc -f getpwent) and where (on my machine) from 
$ man crypt

       "salt  is  a  two-character  string  chosen  from  the  set
       [a-zA-Z0-9./].   This  string is used to perturb the algo-
       rithm in one of 4096 different ways."

So now all you have to do is generate a random salt for each password...

Arthur

--
Dr. A. Clune, Network Control Group, Department of Mathematics,
University of York. Tex/Fax 01904 433097. 
http://biber.york.ac.uk/~arthur
Democracy is two wolves and a sheep arguing over lunch - Anon.



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

Date: 18 May 1998 15:49:16 GMT
From: "Pheng Lay" <phengl@ir-optima.com>
Subject: How to make IIS 2.0/3.0 execute perl script?
Message-Id: <01bd8274$4b192c00$1c90d9cf@pheng-lay>

I've installed perl 5.0 build 316 on NT 4.0 with IIS 2.0.  I can execute
perl script on the command prompt, but when I try to execute the perl
script thru browser, I could not execute it.  By default, after installing
perl, it placed the following line in registry:
	HKEY_LOCAL_MACHINE
	SOFTWARE
	CLASS
	.pl	<No Name>:REG_SZ:Perl
	Perl
	  shell
	    open
  	     command <No Name>:REG_Extend_SZ: E:\Perl316\bin\perl.exe %1 %*

When I change the last command line to
	.pl:REG_SZ:E:\perl316\bin\perl.exe %s %s

then it return the content of the perl script when I try to execute the
perl thru browser and not the output of the perl.  But now I can not just
type the perl script at the command prompt, because it has no association
anymore.  It will work if I type
"perl perlscript.pl".

Essentially, I've place my perlscript under the inetpub\scripts dir and the
attribute for the scripts is both read and execute on the IIS manager.

Did I add the value to the wrong registry key in the register?  Any help is
appreciated.  Thanks.

	phengl@ir-optima.com



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

Date: 18 May 1998 15:49:45 GMT
From: "Pheng Lay" <phengl@ir-optima.com>
Subject: How to make IIS 3.0 execute perl script?
Message-Id: <01bd8274$5c3905a0$1c90d9cf@pheng-lay>

I've installed perl 5.0 build 316 on NT 4.0 with IIS 2.0.  I can execute
perl script on the command prompt, but when I try to execute the perl
script thru browser, I could not execute it.  By default, after installing
perl, it placed the following line in registry:
	HKEY_LOCAL_MACHINE
	SOFTWARE
	CLASS
	.pl	<No Name>:REG_SZ:Perl
	Perl
	  shell
	    open
  	     command <No Name>:REG_Extend_SZ: E:\Perl316\bin\perl.exe %1 %*

When I change the last command line to
	.pl:REG_SZ:E:\perl316\bin\perl.exe %s %s

then it return the content of the perl script when I try to execute the
perl thru browser and not the output of the perl.  But now I can not just
type the perl script at the command prompt, because it has no association
anymore.  It will work if I type
"perl perlscript.pl".

Essentially, I've place my perlscript under the inetpub\scripts dir and the
attribute for the scripts is both read and execute on the IIS manager.

Did I add the value to the wrong registry key in the register?  Any help is
appreciated.  Thanks.

	phengl@ir-optima.com



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

Date: Mon, 18 May 1998 18:01:07 +0200
From: Francesc Guasch <frankie@etsetb.upc.es>
To: Pheng Lay <phengl@ir-optima.com>
Subject: Re: How to open Sybase SQLanywhere with Perl?
Message-Id: <35605B43.3C5292E1@etsetb.upc.es>

Pheng Lay wrote:
> 
> My database is SQLanywhere 5.0 running on NT Server 4.0.  I would like to
> be able to open/update/close the SQL database from a perlscript.  Any help
> on how to do this would be really appreciated.  Thank You.
> 
I don't know if SQLanywhere, but a good site about perl and sql
databases
is in http://www.hermetica.com
	look for DBI

-- 
 ^-^.-----.             mailto:frankie@citel.upc.es
 o o       )            http://citel.upc.es/~frankie
  Y (_ (___(ssss


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

Date: Mon, 18 May 1998 16:18:36 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: Is if ($a="something") a bad style?
Message-Id: <1d9824p.44kicj1widf5iN@roxboro0-027.dyn.interpath.net>

Craig Berry <cberry@cinenet.net> wrote:

> John Moreno (phenix@interpath.com) wrote:
> : Mark-Jason Dominus <mjd@op.net> wrote:
> : 
> : >   if ((n = xpchk(z, i+k)) == 0) {
> : >     ...
> : >   }
> : 
> : A easy way to make stuff like that clear, write it like this:
> : 
> :     if (0==(n = xpchk(z, i+k))) {
> :       ...
> :     }
> : 
> : Do your comparisons with a constant first - then if you make a mistake
> : the compiler will flag it for you.
> 
> That makes perfect sense logically, but I've *never* been able to get
> myself to like it.  Somehow, it seems to me that the 'important' stuff --
> the things I need to think about most -- should come leftmost in an
> expression.  That's why I like Perl's postfix conditionals and looping
> constructs so much.  Putting a constant on the left just feels plain
> wrong, unnatural; when reading it in other peoples' code, I always feel my
> internal parser grinding to a halt and then backtracking to figure out
> what's going on. 
> 
> Of course, perhaps if I used this style for a time, it would come to feel
> better to me.  YMMV.

That was the situation with me, first it's jarring, then after a time it
becomes less so - now if feels almost normal.  Although I still have to
remind myself to do it, and occasionally forget, at least now when I see
it doesn't seem "wrong" even if it doesn't yet seem "right".

-- 
John Moreno


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 2628
**************************************

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