[9630] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3224 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 22 15:07:18 1998

Date: Wed, 22 Jul 98 12:00:29 -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           Wed, 22 Jul 1998     Volume: 8 Number: 3224

Today's topics:
        A little enervous trouble <delta@netpage.tm.fr>
    Re: A little enervous trouble (Andre L.)
    Re: Coding Quize ( Was Re: efficiency: print<<"xxx" vs. <levi@top.monad.net>
        Copyright question <dcobb@cyberrealm.net>
    Re: Copyright question <minich@globalnet.co.uk>
    Re: Copyright question (Andre L.)
    Re: Copyright question (Abigail)
    Re: Copyright question (Ben Coleman)
    Re: dumb questions Re: Problem with DBD::Oracle (John D Groenveld)
        Dynamically creating graph images (Joseph M Carlton)
    Re: Dynamically creating graph images <gberigan@cse.unl.edu>
    Re: Env Variables. <uri@sysarch.com>
        getting ESC (hex 027) through STDIN, how to? (Matthew Rapaport)
        Help with Win32::NetAdmin (Louis Bohm)
        HELP!!!! DOS exitcodes mstorer@my-dejanews.com
    Re: HELP!!!! DOS exitcodes (Larry Rosler)
    Re: HELP!!!! DOS exitcodes <minich@globalnet.co.uk>
        How to make perl fill in a web form and submit it? lance_powers@my-dejanews.com
    Re: How to make perl fill in a web form and submit it? <Tony.Curtis+usenet@vcpc.univie.ac.at>
        Installation of Perl V5.004_04 on IBM AIX V4.2 <waugie@ibm.net>
        Job: Colorado; Methodologist; UML, Booch, NT, UNIX, C++ richard_steinman@cmagroup.com
    Re: Mod User Reg Hives w/ Win32 Perl <JKRY3025@comenius.ms.mff.cuni.cz>
        Newbie question: a script that ALMOST works (using CGI- <ddallasnc@worldnet.att.net>
        Non-global from sub or parser problem?? <maierc@chesco.com>
    Re: Non-global from sub or parser problem?? <quednauf@nortel.co.uk>
    Re: Non-global from sub or parser problem?? <quednauf@nortel.co.uk>
    Re: Perl Beautifier Home Page (courtesy)
    Re: perl on windows 95 hawkwynd@my-dejanews.com
        porting ps and kill to NT <agy@macgreg.com>
    Re: porting ps and kill to NT scott@softbase.com
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 22 Jul 1998 18:25:53 +0200
From: "delta" <delta@netpage.tm.fr>
Subject: A little enervous trouble
Message-Id: <6p53n0$41p$1@front3.grolier.fr>

A little enervous trouble .....

I had a script which allow to drop on line information in a file

Everything are OK when I submit my informations

Here a line of one field :

print FIC "\"$in{'fond1'}\"\n";

As you could see a " is automatically add at the beginning and the end of
the field texte.

Till there always happy, it's work

But $fond1 is a multi choice list

And when I want to modify the information, I found all my informatoions
fields, BUT, the selected option is not take in consideration (I retrieve
all my list but not the option selected when I droped my information)

Here one of the multi choice list line

print "\t<option value=\"#ffffff\"";
if ($fond1 eq "\"#ffffff\"\" ) {
print " selected";
}
print ">Blanc";

It's seems to be OK, but every time when I compil I get the same error of
semi colon   (;)

WHERE IS THE ERROR, because "\"#ffffff\"\" doesn't seem to be the trouble

A enourmous thanks to my rescuer

Thomas





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

Date: Wed, 22 Jul 1998 14:33:45 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: A little enervous trouble
Message-Id: <alecler-2207981433450001@dialup-746.hip.cam.org>

s/enervous/irritating/;

See my reply in fr.comp.lang.perl, where you also posted this question.
(Netiquette?)

Cheers,
Andre

=================================

In article <6p53n0$41p$1@front3.grolier.fr>, "delta" <delta@netpage.tm.fr>
wrote:

> A little enervous trouble .....
[snip]


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

Date: Wed, 22 Jul 1998 23:40:04 -0400
From: Levi <levi@top.monad.net>
Subject: Re: Coding Quize ( Was Re: efficiency: print<<"xxx" vs. print)
Message-Id: <35B6B094.5B6B9345@top.monad.net>

Uri Guttman wrote:

> 1. Who is main the PERSON you should think about
> while you are writing code?
Kibo!!! 
> 2. Other than comments, what is the most important
> HUMAN aspect of code?
The number of people who *don't* understand it.
> 3. What is the main PURPOSE of comments? 
To maek the futer mintainer *really* confused.
> Bonus: What is the OPPOSITE of spaghetti code?
Shoelace code: it't about the same, but is has knots!

-Levi


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

Date: Wed, 22 Jul 1998 12:24:08 -0400
From: Dustin Cobb <dcobb@cyberrealm.net>
Subject: Copyright question
Message-Id: <35B61228.EDB9C7@cyberrealm.net>

I'm a cgi programmer and I've written many scripts for the ISP I work
for.  Recently, I've been told by someone else in our company that the
scripts that we've written in Perl cannot be copyrighted due to the fact

that Perl isn't a compiled language.  Therefore, we would have to
re-write most of these scripts in another language (like C/C++) to
obtain a copyright.  Is this true?  Can anyone give me an example of
some software that is written entirely in Perl and is legitimately
copyrighted?

Thanks.



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

Date: Wed, 22 Jul 1998 19:48:23 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: Re: Copyright question
Message-Id: <6p5c7c$j7m$1@heliodor.xara.net>

In the UK, anything you can prove you wrote is automatically
copyrighted to you - no fees etc. It's best to send a copy of
the script code to yourself in a sealed envelope by recorded
delivery to be able to prove this.

Martin




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

Date: Wed, 22 Jul 1998 14:37:01 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: Copyright question
Message-Id: <alecler-2207981437010001@dialup-746.hip.cam.org>

In article <35B61228.EDB9C7@cyberrealm.net>, Dustin Cobb
<dcobb@cyberrealm.net> wrote:

> I'm a cgi programmer and I've written many scripts for the ISP I work
> for.  Recently, I've been told by someone else in our company that the
> scripts that we've written in Perl cannot be copyrighted due to the fact
> 
> that Perl isn't a compiled language.  Therefore, we would have to
> re-write most of these scripts in another language (like C/C++) to
> obtain a copyright.  Is this true?  Can anyone give me an example of
> some software that is written entirely in Perl and is legitimately
> copyrighted?
> 
> Thanks.

Aren't all written materials protected by copyright laws (compiled or
not)? I'm not an expert, of course.

Andre


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

Date: 22 Jul 1998 18:50:07 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Copyright question
Message-Id: <6p5c8v$iha$1@client3.news.psi.net>

Dustin Cobb (dcobb@cyberrealm.net) wrote on MDCCLXXXVI September MCMXCIII
in <URL: news:35B61228.EDB9C7@cyberrealm.net>:
++ I'm a cgi programmer and I've written many scripts for the ISP I work
++ for.  Recently, I've been told by someone else in our company that the
++ scripts that we've written in Perl cannot be copyrighted due to the fact
++ 
++ that Perl isn't a compiled language.  Therefore, we would have to
++ re-write most of these scripts in another language (like C/C++) to
++ obtain a copyright.  Is this true?  Can anyone give me an example of
++ some software that is written entirely in Perl and is legitimately
++ copyrighted?


Well, you didn't tell us in which jurisdictions your company is situated,
so, perhaps that someone else is right.

However, in most countries, that someone else would have uttered complete
bullshit. In general, all that is needed to get copyright is to produce.
You write a book, you have its copyright. You write a program, you have
its copyright. Period. Nothing else is needed - no copyright statements.
You got to do something to lose your copyright. Being dead for 50 years
or so.

Now, there's little history on copyright-on-programs-court-cases, so
you might want to be a little careful. Contact your companies lawyer.
He/she should know. Writing programs isn't exactly something new.



Abigail
-- 
   I have not had the time to search the patent literature systematically;
indeed, I decry the current tendency to seek patents on algorithms. If
somebody sends me a copy of a relevant patent not presently cited in this
book, I will dutifully refer to it in future editions. However, I want
to encourage people to continue the centuries-old mathematical tradition
of putting newly discovered algorithms into the public domain. There are
better ways to earn a living than to prevent other people from making use
of one's contributions to computer science.
                    [Donald E. Knuth. The Art of Computer Programming.
                     Volume III. 2nd Edition. Preface. p vi.
                     Addison-Wesley. 1998. <ISBN:0-201-89685-0>]


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

Date: Wed, 22 Jul 1998 18:54:51 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: Copyright question
Message-Id: <35b63354.680043851@news.mindspring.com>

On Wed, 22 Jul 1998 12:24:08 -0400, Dustin Cobb <dcobb@cyberrealm.net>
wrote:

>I'm a cgi programmer and I've written many scripts for the ISP I work
>for.  Recently, I've been told by someone else in our company that the
>scripts that we've written in Perl cannot be copyrighted due to the fact
>
>that Perl isn't a compiled language.

That's totally bogus.  There is no requirement that a program be written in
a compiled language in order to be copyrightable.  For that matter, unless
you've explicitly placed your scripts in the public domain, they're already
copyrighted.

Ben
-- 
Ben Coleman
Senior Systems Analyst
TermNet Merchant Services, Inc.
Atlanta, GA


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

Date: 22 Jul 1998 14:04:34 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: dumb questions Re: Problem with DBD::Oracle
Message-Id: <6p59ji$1qt$1@tholian.cse.psu.edu>

It would be great if SQLNet was an open standard protocol, its not.
It would be great if Oracle provided the full Perl distribution
and latest DBI/DBD::Oracle with OWAS, it doesn't.
John
groenveld@acm.org


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

Date: 22 Jul 1998 17:45:34 GMT
From: carltjm@mail.auburn.edu (Joseph M Carlton)
Subject: Dynamically creating graph images
Message-Id: <6p58fu$26b$1@ultranews.duc.auburn.edu>

I am using perl to fetch data from a database for a web project that I am 
working on. Now, I need to dynamically build a bar graph with this data.  
Someone told me that I could use javascript and somebody told me that I 
could do the whole thing in perl. I have not been able to find any 
information on this topic for either javascript or perl.  Could someone 
PLEASE direct me to a book or web page with information on this?  I am 
not limited to perl and javascript, so if anyone knows of a better way to 
do this.  I would be VERY appreciative.  Thanks in advance for your help.

--

Joey Carlton
Senior, Computer Engineering
Auburn University
carltjm@mail.auburn.edu


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

Date: 22 Jul 1998 18:11:57 GMT
From: Greg Berigan <gberigan@cse.unl.edu>
Subject: Re: Dynamically creating graph images
Message-Id: <6p5a1d$1in$2@unlnews.unl.edu>

In comp.lang.javascript, carltjm@mail.auburn.edu (Joseph M Carlton) wrote:

> I am using perl to fetch data from a database for a web project that I am 
> working on. Now, I need to dynamically build a bar graph with this data.  
> Someone told me that I could use javascript and somebody told me that I 
> could do the whole thing in perl. I have not been able to find any 
> information on this topic for either javascript or perl.  Could someone 
> PLEASE direct me to a book or web page with information on this?  I am 
> not limited to perl and javascript, so if anyone knows of a better way to 
> do this.  I would be VERY appreciative.  Thanks in advance for your help.

You can do bar graphs (scale images to the size of the needed bar) but
line graphs and pie graphs are not possible since you can't create
images on the fly (except B&W BMP images?).  If you need this
functionality, you'll need either communication with a server which will
create images on demand or use Java.

-- 
         ,=<#)-=#  <http://incolor.inetnebr.com/wotw/> (The War of the Worlds)
    ,_--//--_,
 _-~_-(####)-_~-_   Please pardon any typos.  Bandwidth is often at a premium,
(#>_--'~--~`--_<#)  with connection too sluggish to support post-editing.


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

Date: 22 Jul 1998 12:45:42 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Env Variables.
Message-Id: <x71zrdn8ax.fsf@sysarch.com>

>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:

  LR> [Posted to comp.lang.perl.misc; copy mailed to F.Quednau
  LR> <quednauf@nortel.co.uk>.]

  LR> In article <35B5FEE7.98138E5@nortel.co.uk> on Wed, 22 Jul 1998
  LR> 16:01:59 +0100, F.Quednau <quednauf@nortel.co.uk> says...
  >> Samue Lopez wrote: > > Hello.  > For example can I "setenv foo
  >> 1234" from within Perl and have this > variable visible in > the
  >> shell from which Perl was started?
  >> 
  >> hmmm, if it would be possible, it would be quite bad. Someone else
  >> starts my script from a shell, and I then can play around with
  >> his/her ENV variables (Does that sound saucy?). Not nice,
  >> security-wise. And as there is nothing quite bad about Perl, I
  >> therefore prove by the mathematical method of negation, that it is
  >> not possible to change the ENV stuff of the shell.
  >> 
  >> Is that true, or I am trusting Perl too much?

ENV stuff is in every program, not just the shells. and it is passed
down from parent process to child. it is imposible for ANY child program
to directly change the parent's ENV. there are many ways to indirectly
change it but the parent and child have to communicate the changes. a
well know example is the tset program used to set terminal
characteristics in a shell. given the _s option it prints out commands
that set ENV and other attributes. the shell runs that as 

eval `tset -s`

which will set the env and whatever else tset spits out.

so this has nothing to do with perl, as it is just another child process
which can't set its parent's env.

hth,

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: 22 Jul 1998 10:47:08 -0700
From: mjr@crl.crl.com (Matthew Rapaport)
Subject: getting ESC (hex 027) through STDIN, how to?
Message-Id: <6p58is$cfi@crl.crl.com>

I have a perl application that takes its input from stdin, so:

'cat somefile.ext | perlscript'

Inside the script is a simple loop, to illustrate, consider:

while ($line = <STDIN>)
{
  print $line;
}
exit;

If the input stream contains ESC characters (dec. 027 octal 033) they do
not appear in the output. I do not want them filtered. How can I do this?

Thanks ahead of time for any tips you can provide.


-- 
        The difference between theory and practice is that in theory, 
              there is no difference, but in practice, there is.
        matthew rapaport          *-*-*-*-*-*            mjr@crl.com


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

Date: 22 Jul 1998 13:07:49 -0500
From: gandalf@arakis.sugar-river.net (Louis Bohm)
Subject: Help with Win32::NetAdmin
Message-Id: <35b61c65.0@news.destek.net>

Can anyone tellme how to use the Win32::NetAdmin package??  I would be 
particularly gratefull for some examples...

Thank you,
Louis
lbohm@lightbridge.com


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

Date: Wed, 22 Jul 1998 16:30:35 GMT
From: mstorer@my-dejanews.com
Subject: HELP!!!! DOS exitcodes
Message-Id: <6p543b$tc5$1@nnrp1.dejanews.com>

I realise this is probably quite simple but in defense I am a novice to this
wonderful language!

Is there any way of modifying the exitcodes that perl provides under
DOS/Windows?

Currently if the perl program succeeds perl returns a level of 0 if the perl
script does not compile it returns a non 0.

Is there a perl function/command to return a specific exitcode depending on
script outcome?

TIA

Martin

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 22 Jul 1998 09:48:24 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: HELP!!!! DOS exitcodes
Message-Id: <MPG.101fb7b17e7325cd989737@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy sent to mstorer@my-dejanews.com 
<mstorer@my-dejanews.com>.]

In article <6p543b$tc5$1@nnrp1.dejanews.com> on Wed, 22 Jul 1998 16:30:35 
GMT, mstorer@my-dejanews.com <mstorer@my-dejanews.com> says...
> I realise this is probably quite simple but in defense I am a novice to this
> wonderful language!
> 
> Is there any way of modifying the exitcodes that perl provides under
> DOS/Windows?
> 
> Currently if the perl program succeeds perl returns a level of 0 if the perl
> script does not compile it returns a non 0.
> 
> Is there a perl function/command to return a specific exitcode depending on
> script outcome?

perldoc -f exit

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Wed, 22 Jul 1998 18:05:35 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: Re: HELP!!!! DOS exitcodes
Message-Id: <6p566h$bka$1@heliodor.xara.net>

>Is there a perl function/command to return a specific exitcode depending on
>script outcome?


Yes.

Exit(Errorlevel);




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

Date: Wed, 22 Jul 1998 16:47:05 GMT
From: lance_powers@my-dejanews.com
Subject: How to make perl fill in a web form and submit it?
Message-Id: <6p5529$uq3$1@nnrp1.dejanews.com>

Hi,

We would like to make a perl script that will fill in a form on a web page and
submit it (i.e. rather than manually going to the web page and filling in the
data and clicking the 'submit' button, we want an automated perl script to do
the work for us).


I can recreate the form data using perl, but I don't know how to "submit" it.
I'd rather not have to create a program that uses sockets and directly talks
to the web server.  Can somebody point me in the right direction?

Thanks!

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 22 Jul 1998 19:07:31 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: How to make perl fill in a web form and submit it?
Message-Id: <7x4sw9q0fg.fsf@fidelio.vcpc.univie.ac.at>

Re: How to make perl fill in a web form and submit it?,
lance <lance_powers@my-dejanews.com> said:

lance> Hi, We would like to make a perl script that will
lance> fill in a form on a web page and submit it

lance> know how to "submit" it.  I'd rather not have to
lance> create a program that uses sockets and directly talks
lance> to the web server.  Can somebody point me in the
lance> right direction?

modules LWP::UserAgent, HTTP::Request, CGI.

the rest is trivial :-)

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!    | personal email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.  |     tony_curtis32@hotmail.com


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

Date: Wed, 22 Jul 1998 12:56:30 -0400
From: "Gary K. Waugaman" <waugie@ibm.net>
Subject: Installation of Perl V5.004_04 on IBM AIX V4.2
Message-Id: <35B619BE.B755195E@ibm.net>

I'm a Perl neophyte. I'm attempting to install Perl5.004 because the DBI
interface that we are trying to install does not run on our Perl5.002
level. I'm not the installer of the 5.002 level. My system is a RS6000
running AIX.

Anyway, I accepted all the defaults for sh Configure and this is what I
got from make....

        AutoSplitting perl library

        Making DynaLoader (static)
The Unsupported function umask function is unimplemented at
 ../../lib/ExtUtils/I
nstall.pm line 247.
make: 1254-004 The error code from the last command is 2.

If I enter umask, I get 022 as a response, so I do not understand the
error message.

I then ran make minitest and this is what I got.....

Failed 6 test scripts out of 101, 93.07% okay.
   ### Since not all tests were successful, you may want to run some
   ### of them individually and examine any diagnostic messages they
   ### produce.  See the INSTALL document's section on "make test".
   ###
   ### Since most tests were successful, you have a good chance to
   ### get information with better granularity by running
   ###     ./perl harness
   ### in directory ./t.
times not implemented at TEST line 141, <RESULTS> chunk 2672.

These are the messages that come to stdout

The Unsupported function umask function is unimplemented at ./io/fs.t
line 25.
The pipe function is unimplemented at ./io/pipe.t line 34, <PIPE> chunk
2.
The pipe function is unimplemented at ./op/closure.t line 384.
Usage: basename String [Suffix]
PROG:
()=()
EXPECTED:

GOT:
Usage: basename String [Suffix]
Usage: basename String [Suffix]
PROG:
$a = ":="; split /($a)/o, "a:=b:=c"; print "@_"
EXPECTED:
a := b := c
GOT:
Usage: basename String [Suffix]
a := b := c
times not implemented at ./op/time.t line 8.


What can I do to get this to work?



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

Date: 22 Jul 1998 18:01:51 GMT
From: richard_steinman@cmagroup.com
Subject: Job: Colorado; Methodologist; UML, Booch, NT, UNIX, C++, Java, Perl
Message-Id: <6p59ef$93b$1@news1.rmi.net>


Littleton, Colorado; Methodologist; UML, Booch, NT, UNIX, C++, Java, Perl


-Title: Methodologist
-Location: Littleton, Colorado
-Compensation that will include a competitive salary, and some of the 
following depending upon qualifications: Participation in the companyU
s RKey Employee StockS program; Profit sharing; and Performance bonuses


-Required: Significant experience with Object Oriented Analysis and Design. 
Strong background in Design and Implementation for Component Reuse. Solid, 
referenceable, software development experience. Enthusiastic, interested 
in learning and expanding his field of knowledge. Be able to use both 
Unix and Windows environments. Able to work well in groups and interact 
with people from all disciplines. Hard working, dedicated person committed 
to results.

-Primary responsibilities will include: The implementation of Object Oriented 
methods such as UML, OMT, Booch, CRC and customized methods. Methodology 
implementation, done in PERL, includes understanding and implementing 
complex relations between notational symbol types; turning abstract notation 
into language specific syntax and structure; reverse engineering of existing 
code into a method notation; converting the notation of one method into 
another notation. To provide consulting and training support for our customer'
s clients.To interface with other software developers to effectively deploy 
new technology within or client's products. To review user feedback to 
assure that there continues to exist a solid framework to allow our products 
to evolve and continue to meet the need of our client's customers.To stay 
abreast of trends and standards in the software engineering and formal 
methods field while having the opportunity to make an impact upon the 
formal methods field.

Please refer to JO# 2659GVP in your response.

richard_steinman@cmagroup.com 

Richard Steinman
Team Leader
rjs@cmagroup.com
IT & Software Solutions Team
Career Marketing Associates
http://www.cmagroup.com/IT.html


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

Date: Wed, 22 Jul 1998 19:40:44 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: Mod User Reg Hives w/ Win32 Perl
Message-Id: <35B6A2AC.7AA2@comenius.ms.mff.cuni.cz>

Kevin Jones wrote:
> 
> Sorry if this is a repost.  I've been having some problems with my
> provider, and wasn't sure if the message had gone through.
> 
> I have version 5.00402 of the binary dist of win32 perl.  I'm trying to
> open and modify a user's registry hive while logged in as a different
> user.  I've tried everything I can think of, but haven't yet succeeded.
> 
> Any Ideas?
> --
> kevin jones                             We are the music makers;
> kcjones@umich.edu                 We are the dreamers of dreams.

I gues you ARE using something like :

use Win32::Registry;

$HKU->Load($username,"$ENV{WINDIR}\\Profiles\\$username\\ntuser.dat");
$HKU->Open($username, $reg);
 ...
$HKU->UnLoad($username);

Try to post the code.

BTW: What version of libwin32 do you have?
I'm not sure what version is provided with the distribution, 
but the newest is 0.12 (AFAIK). Try to get that one.

Jenda


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

Date: Wed, 22 Jul 1998 14:04:23 +0000
From: David Fleming <ddallasnc@worldnet.att.net>
Subject: Newbie question: a script that ALMOST works (using CGI-lib.pl)
Message-Id: <35B5F166.8245E108@worldnet.att.net>

I have some scripts that I copied from an older book that almost but
don't quite do what they are supposed to.

The html part is fine:

<HTML>
<HEAD>
<TITLE>Customer Satisfaction Survey</TITLE>
</HEAD>
<BODY>
<H1>Customer Satisfaction Survey</H1>
We would very much like to have your thoughts
on the services we provide. Please help us out
by filling out this form and submitting it.
<HR>
<FORM METHOD="POST" ACTION="/cgi-bin/survey.pl">
<P>
<CENTER><I><H2>Optional Informtion</H2></I></CENTER>
<PRE>
Your name:  <INPUT TYPE="text" Name="name" SIZE="20">
Phone Number:  <INPUT TYPE="text" Name="phone" SIZE="15">
Your E-mail address: <INPUT TYPE="text" Name="e-mail" SIZE="50">
<HR>
How would you rate our service?
<INPUT TYPE="radio" NAME="rating" VALUE="Excellent">: Excellent
<INPUT TYPE="radio" NAME="rating" VALUE="Good">: Good
<INPUT TYPE="radio" NAME="rating" VALUE="Reasonable">: Reasonable
<INPUT TYPE="radio" NAME="rating" VALUE="So-so">: So-so
<INPUT TYPE="radio" NAME="rating" VALUE="Poor">: Poor
</PRE>
<BR>
Any Comments on how we can help you further?<BR>
<TEXTAREA NAME="comments" ROWS=6 COLS=60></TEXTAREA>
<P>
<INPUT TYPE="submit" VALUE="Send in the survey!">
</FORM>
</BODY>
</HTML>

The perl part works except for the two lines having to do with mailing:

specifically these two:
$command="mail dfleming@triadntr.net < /tmp/my_comment.$pid";
system($command);

The whole script is listed below!!

#!/usr/bin/perl
#Includes cgi-lib file; if the cgi-lib doesn't exist, returns malformed
#header error
do "cgi-lib.pl" || die "Fatal Error: Can't load cgi library";
#calls the subroutine in the cgi-bin.pl library
#to read in the variables from the form and set them up
#as key=value pairs in the array @in
&ReadParse;
print "Content-type: text/html\n\n";
print "<html>";
print "<head><title>Thank you\!</title></head>";
print "</head><body>";
print "<h2>Thank you\!</h2>";
print "We value your input highly\!";
print "<p>";
print "We've mailed off your survey to\n";
print "be collated as soon as possible\n";
print "<hr>";
print "<h3>Back to the <a href=\"/index.html\">";
print "Front Page</a></h3>";
print "</body>";
print "</html>";
#assigns process id to $pid
$pid=$$;
#opens up comment file for writing
open(COMMENTSFILE,">/tmp/my_comment.$pid");
#enter the form data into the file to be mailed
print COMMENTSFILE "CUSTOMER SATISFACTION SURVEY REPORT\n";
print COMMENTSFILE "...................................\n";
print COMMENTSFILE "optional information:\n";
print COMMENTSFILE "   Name:   $in{'name'}\n";
print COMMENTSFILE "   Phone:  $in{'phone'}\n";
print COMMENTSFILE;
print COMMENTSFILE "Rating:  $in{'rating'}\n";
print COMMENTSFILE;
print COMMENTSFILE "Comments:\n";
print COMMENTSFILE "$in{'comments'}";
#close out file to be mailed
close COMMENTSFILE;
#sends comment file as mail to user
$command="mail dfleming@triadntr.net < /tmp/my_comment.$pid";
system($command);
#erases temp file
unlink("/tmp/my_comment.$pid");




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

Date: Wed, 22 Jul 1998 16:07:28 GMT
From: Charles Maier <maierc@chesco.com>
Subject: Non-global from sub or parser problem??
Message-Id: <35B40115.6547B79B@chesco.com>

I ran into this from earlier this week and it struck a note of curosity
in me. Can anyone explain what rule is being wacked in the following
fragment: ??

&nsub;

print "$str @aray\n";

sub nsub{
    $str = 45;
    @aray = (13,14,15);
}

This errors with the compiler explaining it wants the @aray preceeded
with a backslash. This, if complied with, will result in simply printing
"@aray".

However... If you change the program to :

&nsub;
push (@aray,99);       ## add this line
print "$str @aray\n";

sub nsub{
    $str = 45;
    @aray = (13,14,15);
}


The program outputs normally:  45 13 14 15 99

Is there a rule about declaring an array in a sub to assure it will get
noticed in a global context. ?

BTW... It also works if you declare it before the call as:

@aray = ();
&nsub;
print "$str @aray\n";

sub nsub{
    $str = 45;
    @aray = (13,14,15);
}


--
Chuck Maier
CDM Consulting Services
http://www.cdmcon.com
(610) 943-2726




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

Date: Wed, 22 Jul 1998 17:33:22 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Non-global from sub or parser problem??
Message-Id: <35B61452.D4F06647@nortel.co.uk>

However, I just overlooked that Perl doesn't seem to complain about
$str. Now I am puzzled as well...


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

Date: Wed, 22 Jul 1998 17:31:23 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Non-global from sub or parser problem??
Message-Id: <35B613DB.84AF2660@nortel.co.uk>

Charles Maier wrote:
> 
> BTW... It also works if you declare it before the call as:
> 
> @aray = ();
> &nsub;
> print "$str @aray\n";
> 
> sub nsub{
>     $str = 45;
>     @aray = (13,14,15);
> }

This also works:

sub nsub{
    $str = 45;
    @aray = (13,14,15);
}

&nsub;

print "$str @aray\n";

It looks as if the defining of variables at compilation time occurs
strictly following the sequence of the script, regardless of the flow of
your program.


-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: 22 Jul 1998 18:21:16 GMT
From: Bob Shair (courtesy) <rmshair@delphi.itg.uiuc.edu>
Subject: Re: Perl Beautifier Home Page
Message-Id: <6p5ais$1dh$1@vixen.cso.uiuc.edu>

In article <35A87D71.1D8DBD36@halcyon.com>, Tim Maher <tim.maher@halcyon.com> posted:
>I've got my Perl Beautifier running, with a reasonable set
>of default options, on
>http://www.consultix.wa.com/yumpy/cgi-pvt/pbeaut.cgi.
>
>It's been tested primarily with the 66 modules of the standard
>Perl distribution, so I'm interested to see what happens when
>it's confronted with other programming styles.
>
>Please help me test it by whipping some of your code at
>it!  I'll be Emailed any syntax errors that my beautifier
>introduces, which could help me improve it, prior to making
>it more generally available.

I'm sure that it could be useful for providing standard
formatting of some type so that one can read code written by
someone else.

At least with the default options from the Web page, it has
a penchant for spreading out concise expressions onto multiple
lines.  I don't much care for that, myself.

exemplae gratiae:
while (@ARGV) {
    if ($ARGV[0] =~ /^-(\d+)$/) { $pl = $1; }
    if ($ARGV[0] eq "-n") {
        $numonly = "1";
        }
becomes:
while (@ARGV)
{
        if ($ARGV[0] =~ /^-(\d+)$/)
        {
                $pl = $1;
        }
        if ($ARGV[0] eq "-n")
        {
                $numonly = "1";
        }
which, to my mind, only adds clutter.

stranger:
@R = split(/\n/,$R);
becomes:
@R
        = split(/\n/, $R);
It's the only assignment to an array variable in the program,
but it did the same with this:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
which becomes:
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
        = localtime(time);

(that would JUST fit in 80 columns, as reformatted).

-- 

Bob Shair                          rmshair@delphi.itg.uiuc.edu
Open Systems Specialist    	   Champaign, Illinois		   
/*  Opinions expressed are mine... go get your own!       */


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

Date: Wed, 22 Jul 1998 17:57:53 GMT
From: hawkwynd@my-dejanews.com
Subject: Re: perl on windows 95
Message-Id: <6p5971$52p$1@nnrp1.dejanews.com>

In article <3592B91D.EBAD149F@postoffice.pacbell.net>,
  josri@pacbell.net wrote:
>
> Hi
> I have a web page with geocities and I want to post my Dynamic ip
> address to that page as and when I log on to internet. I want this to do
>
> with perl on windows 95. Now, how can I fetch a file, make changes and
> again post the file? Is there somebody to help me out?
> Thanks in advance for any help.
>
> Regards
> Josri
>
>

I have a PWS running, using OmniHTTPD. How can I enable Perl scripts, or cgi
in Windows 98? Is there software I can install to allow this?


--
DC.D/H f+++ s h+ W|B a- $ m+ d++ WL++ Fr-- L Sm e- g- i U

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 22 Jul 1998 13:19:25 -0400
From: "Adam Graham-Yooll" <agy@macgreg.com>
Subject: porting ps and kill to NT
Message-Id: <6p56u0$kch$1@client2.news.psi.net>

I have a perl script, running on Unix, that uses system calls to "ps" and
"kill" to look for and shutdown a particular program if its running.  How
can I do this on NT without resorting to MKS toolkit, or similar, that I
have to pay for?

Also, how do I pause the execution of my perl script until a system call has
finished executing?  I read through perldoc perlipc and still don't
understand.

Thanks,

Adam.






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

Date: 22 Jul 1998 17:49:22 GMT
From: scott@softbase.com
Subject: Re: porting ps and kill to NT
Message-Id: <35b62622.0@news.new-era.net>

Adam Graham-Yooll (agy@macgreg.com) wrote:
> I have a perl script, running on Unix, that uses system calls to "ps" and
> "kill" to look for and shutdown a particular program if its running.  How
> can I do this on NT without resorting to MKS toolkit, or similar, that I
> have to pay for?

The GNU utilities for NT have ps and kill, as I remember. If not I've
seen free clones out there. Just look around!

The problem you run into with ps especially is no two systems use the
same command line parameters and output format, so the odds of your
script working if it parses the output are not good. Some are BSD,
some are SystemV, some are both, and some are neither. 

> Also, how do I pause the execution of my perl script until a system call has
> finished executing?  I read through perldoc perlipc and still don't
> understand.

Do you mean a real system call, or a call to system()? system() waits
until the process is finished. How are you starting the program?

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: 12 Jul 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 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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