[6452] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 77 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 9 08:07:17 1997

Date: Sun, 9 Mar 97 05:00:34 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 9 Mar 1997     Volume: 8 Number: 77

Today's topics:
     Re: 10 commandments (was re: Which one is the best (pat <zenin@best.com>
     Re: Basic $ENV questions (I R A Aggie)
     Re: Basic $ENV questions (I R A Aggie)
     core dump problem (Kim DongHyun)
     Date functions <jpaugh@cs.wvu.edu>
     Re: Date functions <tchrist@mox.perl.com>
     Re: Help! Simple Question: Error 501: "Not Supported" (---)
     Re: Help! Simple Question: Error 501: "Not Supported" (Nathan V. Patwardhan)
     Looking for "HTML to Plain Text"  perl script <kramsey@worldnet.att.net>
     Re: Looking for "HTML to Plain Text"  perl script <tchrist@mox.perl.com>
     Re: Looking for non-Unix Perl book (---)
     Re: Looking for non-Unix Perl book (Nathan V. Patwardhan)
     Newbie Help: Links <gnaik@iname.com>
     Newbie: Help With " <gnaik@iname.com>
     PERL path <drwill@loginet.com>
     Re: PERL path (Nathan V. Patwardhan)
     Re: perl program works on command line, but not when ru (I R A Aggie)
     Perl5.003 and sfio compile problem <byersa@agva.com>
     Programmers Association (David Crowder)
     Strange but True (Sara Young)
     Re: Strange but True (Honza Pazdziora)
     UserCreate for NT Perl <dhinkle@cisco.com>
     What is true?  was: simple new question! <Postmaster@dozyrosy.demon.co.uk>
     Win32::Registry <drwill@loginet.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 9 Mar 1997 04:35:57 GMT
From: Zenin <zenin@best.com>
Subject: Re: 10 commandments (was re: Which one is the best (pattern matching))
Message-Id: <5ftend$isi$1@nntp2.ba.best.com>

Todd Hoff <tmh@possibility.com> wrote:
: > : > 11) Thou shall use use strict;
: > : Jeeze, might as well start using C++ for everything again.
: > : Why turn perl into the no fun language?
: > That I disagree with -- I find it more fun to use strict.  Perhaps you
: > like debugging better than I do, though. 8-)

: Nope, code usually works the first time. Not much debugging
: needed.

	So can we assume then you don't write perl programs that are larger
	then a couple hundred lines?

	IMHO, when they get past ~200 it's almost mandatory, and if you go
	over ~1k it would be death without it...
-- 
Zenin                                                    Programing Consultant
  Zenin @ Best . com                    Perl, JavaScript, Web Graphic Design
    http://www.best.com/~zenin/                   Just another Perl hacker
     Spelling mistakes? Their couldn't be. -My modem is error correcting.


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

Date: Thu, 06 Mar 1997 14:41:49 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Basic $ENV questions
Message-Id: <fl_aggie-ya02408000R0603971441490001@news.fsu.edu>

In article <5fn3ap$dfu@fridge-nf0.shore.net>, nvp@shore.net (Nathan V.
Patwardhan) wrote:

+ Eddie Babin (ebabin@cyberenet.net) wrote:
+ 
+ : Thanks for your help.  This gave some of the environment variables.
+ : How can I access the rest?

+ That *was* all the environment variables.  Which others were you
+ looking for?

A basic misunderstanding of environmnetal variables & and HTTPD, I think.

Eddie: an environmental variable is set by the HTTTPD when a value is
available for it. For example, you mentioned an interest in REMOTE_IDENT.
This variable is, for the most part, left _unset_ by your typical WWW
browser. In fact, there is no way to enforce this to be set, or to be
set correctly. Therefore, it doesn't exist when you examine the %ENV
variable.

Bottom Line: if it ain't there, it ain't there. You could make it up, if
you like, but it don't exist.

James - not looking forward to reading Netscrape's commerce server's docs...

-- 
Consulting Minster for Consultants, DNRC

To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: Fri, 07 Mar 1997 11:49:05 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Basic $ENV questions
Message-Id: <fl_aggie-ya02408000R0703971149050001@news.fsu.edu>

In article <5fpfkc$di9@news.cyberenet.net>, ebabin@cyberenet.net (Eddie
Babin) wrote:


+ I guess I'm mistaken but I've seen references to the following which I
+ also thought were environment variables:

[deletia]

+ Is there anyway to retrieve these values?

Only if they're set. If they're set, they're in %ENV. If they're not,
they're not in %ENV.

James

-- 
Consulting Minster for Consultants, DNRC

To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 6 Mar 1997 03:07:01 GMT
From: ryan@paranbi.snu.ac.kr (Kim DongHyun)
Subject: core dump problem
Message-Id: <5flccl$q7q$1@snunews.snu.ac.kr>
Keywords: core dump perl

hi, I've got a core dump file.

my script is used for ftp-search indexing,
when I index about 20MB data and put it into Berkeley DB

How can I get messages about error with core dump?
or is there any command-line option to check where is error-line?

(my script is running over 3-4hour, so I can't use perl-debugger)

I'll wait for your kind responce.

-- 
------------------------------------------
Kim Dong Hyun  (ryan@cs.snu.ac.kr)	
Dept. of Computer Science                  
Seoul National University, KOREA       
http://yahanbi.snu.ac.kr/~ryan/
------------------------------------------


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

Date: Thu, 06 Mar 1997 17:50:08 -0500
From: Jason Paugh <jpaugh@cs.wvu.edu>
Subject: Date functions
Message-Id: <331F4A1F.ADC@cs.wvu.edu>

Does anyone know of a good PERL library that provides functions for
converting dates.  For example converting a date string to it's Julian
date and vice versa or other similar functions.  I'm sure that I could
write one for myself, but I hate to go through all the trouble if there
is already one out there.  If anyone could help me I would greatly
appreciate it.

Jason Paugh
jpaugh@cs.wvu.edu



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

Date: 9 Mar 1997 10:01:57 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Date functions
Message-Id: <5fu1ql$m11$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    jpaugh@cs.wvu.edu writes:
:Does anyone know of a good PERL library that provides functions for
:converting dates.  For example converting a date string to it's Julian
:date and vice versa or other similar functions.  I'm sure that I could
:write one for myself, but I hate to go through all the trouble if there
:is already one out there.  If anyone could help me I would greatly
:appreciate it.

So, what did CPAN, Deja News, and Alta Vista say about this question?

--tom

=head1 Data: Dates

=head2 How do I find the week-of-the-year/day-of-the-year?

The day of the year is in the array returned by localtime() (see
L<perlfunc/"localtime">):

    $day_of_year = (localtime(time()))[7];

or more legibly (in 5.004 or higher):

    use Time::localtime;
    $day_of_year = localtime(time())->yday;

You can find the week of the year by dividing this by 7:

    $week_of_year = int($day_of_year / 7);

Of course, this believes that weeks start at zero.

=head2 How can I compare two date strings?

Use the Date::Manip or Date::DateCalc modules from CPAN.

=head2 How can I take a string and turn it into epoch seconds?

If it's a regular enough string that it always has the same format,
you can split it up and pass the parts to timelocal in the standard
Time::Local module.  Otherwise, you should look into one of the
Date modules off of CPAN.

=head2 How can I find the Julian Day?

Neither Date::Manip nor Date::DateCalc deal with Julian days.  Instead,
is an example of Julian date calculation in
CPAN/authors/David_Muir_Sharnoff/modules/Time/JulianDay.pm.gz, which should
help.

=head2 Does Perl have a year 2000 problem?

Not unless you use perl to create one. The date and time functions
supplied with perl (gmtime and localtime) supply adequate information
to determine the year well beyond 2000.  The year returned by these
functions when  used in an array context is the year minus 1900. For
years between 1910 and 1999 this  I<happens> to be a 2-digit decimal
number. To avoid the year 2000 problem simply do not treat the year as
a 2-digit number. It isn't.

When gmtime() and localtime() are used in a scalar context they return
a timestamp string that contains a fully-expanded year.  For example,
C<$timestamp = gmtime(1005613200)> sets $timestamp to "Tue Nov 13 01:00:00
2001". There's no year 2000 problem here.
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
    "Historically speaking, the presence of wheels in Unix has never precluded
    their reinvention."
    	--Larry Wall


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

Date: Sun, 09 Mar 1997 07:34:49 GMT
From: bailey766@aol.com (---)
Subject: Re: Help! Simple Question: Error 501: "Not Supported"
Message-Id: <5ftes3$rin@sjx-ixn8.ix.netcom.com>

tadmc@flash.net (Tad McClellan) wrote:

>--- (bailey766@aol.com) wrote:
>: I have the Perl interpreter installed on my NT 4.0 server running IIS
>: 3.0.  I wrote a simple Perl script that simply writes a string to a
>: file when it is run (so that I know it was executed).  I put together
>: a simple HTML file with a submit button that runs the Perl program
>: using the syntax:

>: <FORM METHOD=POST ACTION="filetest.pl">
>: <INPUT TYPE="SUBMIT">
>: </FORM>

>: etc etc.

>: When I load this page from my CLIENT machine, a Win95 box with
>: Internet Explorer 3.0, I get "Error 501- Not Supported".  If I load it
>                               ^^^^^^^^^^^^^^^^^^^^^^^^
>That is not a perl error message.

>Looks like some kind of HTTP message or something...

>: using IE3.0 locally, from the SERVER, it thinks I want to download the
>: file.

>: these error messages myself?  I waded through much of the online docs
>: and could not find the error codes listed.  Is this an IE3.0 error or
>: a Server error?

>We wouldn't know. 
>IE and servers are not perl. 
>This is the perl newsgroup ya know  ;-)

I posted to the Perl newsgroup because (being a newbie to CGI/Perl) I
have absolutely no way of knowing where an error message is coming
from, or whether the error message is the result of a wrongly
configured Perl installation, etc.  Since a Perl script was the
primary subject of the message, not servers or browsers, (at least I
thought it was at the time), it seems to make sense to post that
message here.  It could have been worse, I could have spammed it
across every www-related group I could find :)
But really, with all the bulk e-mailers and other internet scum out
there, couldn't your badgering energy be spent more effectively on one
of them instead of a well-meaning Perl newbie such as moi?  :)





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

Date: 9 Mar 1997 07:15:57 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Help! Simple Question: Error 501: "Not Supported"
Message-Id: <5fto3d$aa8@fridge-nf0.shore.net>

--- (bailey766@aol.com) wrote:

: I posted to the Perl newsgroup because (being a newbie to CGI/Perl) I
: have absolutely no way of knowing where an error message is coming
: from, or whether the error message is the result of a wrongly
: configured Perl installation, etc.  Since a Perl script was the

I think a lot of people share the same misunderstanding when it comes
to using Perl for web applications.  People don't understand server
errors and presume that Perl is "busting things up."

: But really, with all the bulk e-mailers and other internet scum out
: there, couldn't your badgering energy be spent more effectively on one
: of them instead of a well-meaning Perl newbie such as moi?  :)

Point taken.  But you must understand that 1 newbie question x 1 million
newbie questions generates A LOT of postings, and A LOT of traffic, and
much of it repeats itself ad nauseum.  People who are trying to help
beginners are more than a little irked at the number of people who don't
read the documentation and/or old postings from the newsgroups.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 9 Mar 1997 02:03:44 GMT
From: "Kathleen Ramsey" <kramsey@worldnet.att.net>
Subject: Looking for "HTML to Plain Text"  perl script
Message-Id: <01bc2c2e$14c67740$c26774cf@default>

Where can I find a "HTML to Plain Text"  perl script.

Kathy
kramsey@worldnet.att.net



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

Date: 9 Mar 1997 05:15:20 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Looking for "HTML to Plain Text"  perl script
Message-Id: <5fth18$8nm$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    "Kathleen Ramsey" <kramsey@worldnet.att.net> writes:
:Where can I find a "HTML to Plain Text"  perl script.

Where did you look for the answer to your question?
Did you try Deja News or Alta Vista?  Why not?  What
about some FAQs, like these:

    http://www.perl.com/perl/faq/idiots-guide.html
    http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml
    http://www.perl.com/perl/faq/perl-cgi-faq.html
    http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
    http://www.boutell.com/faq/

Oh well, I give up.  Here are two entries from a FAQ I'm 
about to release:

    =head2 How do I remove HTML from a string?

    The most correct way (albeit not the fastest) is to use HTML::Parse
    from CPAN (part of the libwww-perl distribution, which is a must-have
    module for all web hackers).

    Many folks attempt a simple-minded regular expression approach,
    like C<s/E<lt>.*?E<gt>//g>, but that fails in many cases because
    the tags may continue over line breaks, they may contain quoted
    angle-brackets, or HTML comment may be present.  Plus folks forget
    to convert entities, like &lt; for example.

    Here's one "simple-minded" approach, that works for most files:

	#!/usr/bin/perl -p0777
	s/<(?:[^>'"]*|(['"]).*?\1)*>//gs

    If you want a more complete solution, see the 3-stage striphtml
    program in CPAN/authors/Tom_Christiansen/scripts/striphtml.gz .

    =head2 How do I fetch an HTML file?

    Use the LWP::Simple module available from CPAN, part of the excellent
    libwww-perl (LWP) package.  On the other hand, and if you have the
    lynx text-based HTML browser installed on your system, this isn't
    too bad:

	$html_code = `lynx -source $url`;
	$text_data = `lynx -dump $url`;

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

	  "And I don't like doing silly things (except on purpose)."
		--Larry Wall in <1992Jul3.191825.14435@netlabs.com>


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

Date: Sun, 09 Mar 1997 07:40:47 GMT
From: bailey766@aol.com (---)
Subject: Re: Looking for non-Unix Perl book
Message-Id: <5ftf79$rin@sjx-ixn8.ix.netcom.com>

nvp@shore.net (Nathan V. Patwardhan) wrote:

>Thomas Buehner (buehner@pfaffenhofen.netsurf.de) wrote:

>: As a non-Unix person, it took me an hour to find the Perl command for 
>: deleting a file: No reference to delete, erase, remove, etc. in the 
>: index of any Perl book I looked at. Too many hits on a search through 

>I just looked at three Perl books (from separate publishers/authors),
>and they both had "delete" (in the sense of deleting files) listed under
>_f_ile in the index.  I'll venture a guess that delete (file) isn't listed
>under _d_elete in the index because delete() and unlink() have unrelated
>meanings ... just a guess. tho.

What hasn't been mentioned is that whether or not "delete" or "unlink"
is in the index of any book has nothing to do with UNIX.  
FWIW, I spent about 5 mins browsing through the Camel book (the one
everyone seems to use and recommend) and "unlink" caught my eye
immediately.  This book is not cryptic or poorly laid out, and
methinks quite usable.  Get it.





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

Date: 9 Mar 1997 07:19:42 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Looking for non-Unix Perl book
Message-Id: <5ftoae$aa8@fridge-nf0.shore.net>

--- (bailey766@aol.com) wrote:

: What hasn't been mentioned is that whether or not "delete" or "unlink"
: is in the index of any book has nothing to do with UNIX.  

Exactly.  If I'm correct, unlink() is part of ANSI C, which means it's 
a standard function that should be common to all Perl ports.  Whether or 
not people (who don't know C or ANSI from "antsy in the pantsy") will make 
the connection between unlink() and 'rm', or 'del' is another story.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 9 Mar 1997 03:28:10 GMT
From: "G. Naik" <gnaik@iname.com>
Subject: Newbie Help: Links
Message-Id: <01bc2c39$a6cad540$148158ce@gnaik.cyberwar.com>

My system is running FreeBSD with Apache. I created a symbolic link from
~/public_html/index.html -to- ~/public_html/cgi-bin/Welcome.cgi. 

When I try to access Index.html it goes to Welcome.cgi, but the script
doesn't run, I see the source of it. If I directly access Welcome.cgi it
works fine?? 

[IF possible please e-mail reply and post]
-- 
| G. Naik
| g.home.ml.org 
| gnaik@iname.com

|


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

Date: 9 Mar 1997 03:24:50 GMT
From: "G. Naik" <gnaik@iname.com>
Subject: Newbie: Help With "
Message-Id: <01bc2c39$2f5ccc20$148158ce@gnaik.cyberwar.com>

I am trying to use the following command and am having problems with it:

:: print "<A HREF="mailto:myaddr@whatever.net">Mail</A>\n";

I think the quotes are messing with it. 

[IF possible please e-mail reply and post]

Thanks in Advance
-- 
| G. Naik
| g.home.ml.org 
| gnaik@iname.com

|


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

Date: 9 Mar 1997 05:05:07 GMT
From: "David Williamson" <drwill@loginet.com>
Subject: PERL path
Message-Id: <01bc2c47$8cdfab20$1a4281ce@zonetemp.dns.microsoft.com>

I see #!/path/etc for use in PERL scripts for, what I assume, to be for use
in only UNIX platform scripts.  I haven't found, and would not have
expected, this to work on NT or 95, however.

When using or requiring PERL modules and other scripts, I have problems
finding them if they are in other directories other than the directory from
which I'm executing the script.

So, I thought I could manually add to @INC by:

	@INC = (@INC, "c:\\somepath");

Although this doesn't seem to be working for me, either.

Any ideas or advice from someone with NT or 95 PERL experience?

Thanks,

David Williamson


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

Date: 9 Mar 1997 07:26:17 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: PERL path
Message-Id: <5ftomp$aa8@fridge-nf0.shore.net>

David Williamson (drwill@loginet.com) wrote:
: I see #!/path/etc for use in PERL scripts for, what I assume, to be for use
: in only UNIX platform scripts.  I haven't found, and would not have
: expected, this to work on NT or 95, however.

That's correct.  #! is a Unix thing, and a swear word, so don't tell your
mother, or she'll ground you.  :-)  There was a wrapper at one time that
allowed your NT Perl scripts to use the shebang, but it's kind of useless,
since you can also wrap your scripts in a batch file without a shebang.

If you want to wrap an NT Perl script in a batch file, do something
like:

@perl.exe %0 %1
@goto end

print("Hi world!\n");

__END__
:end

: When using or requiring PERL modules and other scripts, I have problems
: finding them if they are in other directories other than the directory from
: which I'm executing the script.

For Windows NT/95, I've always used:

BEGIN
{
  unshift(@INC, "/path/to/lib");
}


--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Fri, 07 Mar 1997 11:12:12 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: perl program works on command line, but not when run through www server
Message-Id: <fl_aggie-ya02408000R0703971112120001@news.fsu.edu>

In article <331E85FA.45D3@nh1adm.uwaterloo.ca>, Chris Engel
<cengel@nh1adm.uwaterloo.ca> wrote:

+ Any help would be greatly appreciated!

See my sig...

James

-- 
Consulting Minster for Consultants, DNRC

To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: Sat, 08 Mar 1997 23:05:49 -0500
From: Al Byers <byersa@agva.com>
Subject: Perl5.003 and sfio compile problem
Message-Id: <3322371D.7BE2@agva.com>

I could use some help in installing Perl5.003_07 with sfio. I am
installing for use with the Apache 1.2b7 server. I am running on an
Alpha, OSF/1(3.2). I installed the sfio library per the instructions at
http://www.fastcgi.com/kit/doc/fcgi-perl.htm#S2 . I also untar'd
perl5.003 per the instructions(I think), ran './Configure -Duseperlio
-Dusesfio' and 'make depend'. 

My problem is that in both the 'make depend' and the 'make' operations,
I
get warnings that in varargs.h, the macro va_start is being redefined.
In util.c, the compile fails because va_start has the wrong number of
arguments. I assume that is because both stdarg.h and varargs.h are
being included, but this is as far as my Unix development experience can
take me. I cannot find where I_STDARG or I_VARARGS are being set, or if
they are really the problem. The output during make looks like this:

`sh  cflags libperl.a miniperlmain.o`  miniperlmain.c
          CCCMD =  cc -DPERL_CORE -c -DSTANDARD_C -I/usr/local/include
-D__LANGUAGE_C__ -D_NO_PROTO -I/disk2/home/byersa/perl5/sfio97/include 
-O2 -Olimit 2900   
/usr/lib/cmplrs/cc/cfe: Warning: /usr/include/varargs.h:34: Macro
va_start redefined.
`sh  cflags libperl.a perl.o`  perl.c
 ...

I would appreciate any help.
-- 

Al Byers                      Automation Group of Virginia
P.O. Box 1091                 Waynesboro, VA 22980
540.949.8777                  byersa@agva.com


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

Date: Sun, 09 Mar 1997 07:38:46 GMT
From: dcrowder@farhorizons.com (David Crowder)
Subject: Programmers Association
Message-Id: <332268ff.368830116@news.bridge.net>

Far Horizons Programmers Association benefits include discount virtual
servers, legal services, and market research.

Visit our site at http://www.farhorizons.com/index.html



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

Date: Sun, 9 Mar 1997 08:58:10 GMT
From: syoung@actcom.co.il (Sara Young)
Subject: Strange but True
Message-Id: <E6rq8z.2wH@actcom.co.il>

In a script of mine I have a loop like this:
while (($key, $value) = each %hash) {
   ...
  if ($key=$something) {
     last;
  }
}

This 'last' command seems to mess up the hash, because when it is accessed
again it doesn't find any pairs.  If I access the hash a third time - then
everything is fine.

Does this make sense to anybody?

Sara


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

Date: Sun, 9 Mar 1997 11:57:57 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Strange but True
Message-Id: <adelton.857908677@aisa.fi.muni.cz>

syoung@actcom.co.il (Sara Young) writes:

> In a script of mine I have a loop like this:
> while (($key, $value) = each %hash) {
>    ...
>   if ($key=$something) {
>      last;
>   }
> }
> 
> This 'last' command seems to mess up the hash, because when it is accessed
> again it doesn't find any pairs.  If I access the hash a third time - then
> everything is fine.
> 
> Does this make sense to anybody?

First, shouldn't the test be if ($key==$something) { instead of just =?

Also, the manpage for each says:

	The iterator can be reset only by reading all the elements
	from the array.

If you jump off the loop, and then start iterating again, it will
continue in the position where it stopped. So before the last command
you may need to do another while (each %hash) {} to "empty" the
iterator.

Hope this helps.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: 9 Mar 1997 02:43:10 GMT
From: "Daniel Hinkle" <dhinkle@cisco.com>
Subject: UserCreate for NT Perl
Message-Id: <01bc2c33$ce3e60c0$55cd44ab@rambo>

Has anyone got the Win32::NetAdmin::UserCreate function to work?  I tried
it on a NT 4.0 server and could not get it to work.  It looks pretty simple
so I can't see what I could be doing wrong.  I'm thinking maybe it just
doesn't work.

Daniel


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

Date: Sun, 9 Mar 1997 12:15:29 +0000
From: Rosemary I H Powell <Postmaster@dozyrosy.demon.co.uk>
Subject: What is true?  was: simple new question!
Message-Id: <RS4ClBAhnqIzEw22@dozyrosy.demon.co.uk>

In article <5fqmfn$o31$1@csnews.cs.colorado.edu>, Tom Christiansen
<tchrist@mox.perl.com> writes
> [courtesy cc of this posting sent to cited author via email]
Thank you!
>In comp.lang.perl.misc, 
>    webster@dozyrosy.demon.co.uk writes:
>:    $true = 1;
>:    $false = 0;
>:    $abc = $false; # or whatever, to start with
>
>Bad idea.  Get used to 0 and '' being false, all else being true.
>
>--tom
Yes, I'm sorry - in this context I was wrong, and I should have read
more carefully what the original poster was doing. But I think, in
general, there are two different sorts of "true" and "false"?

1) where a variable may or may not have a value (as in this instance)

2) where it DOES has a value set - but which value can be right/true or
wrong/false (e.g an answer to a question, or invalid data, whatever)
and you use a true/false switch or flag to identify/test this state

Being somewhat dozy late at night I was trying to apply the second
contruct to the first, if you see what I mean.

But, is this second option an "Evil Thing" :-( in Perl,

  $true  = $yes = 1;
  $false = $no  = 0;
  ....
  $debug_session = $yes;
  $bad_data      = $false; 
  ....
  if ($debug_session){
     ...do whatever....
  }
  ...
  if ($bad_data) {
     ...tell them whatever....
  } 
  
Is there a better/safer way to do it? If I AM carrying bad habits over
into Perl I ought to know now, before they get ingrained ...

Thanks in advance, 
Rosemary

-------------------------------------------------------------------
| Rosemary I.H.Powell  EMail: Home: rosemary@dozyrosy.demon.co.uk |     
|                             Work: r.i.h.powell@rl.ac.uk         |
|                       http://www.netlink.co.uk/users/dozyrosy/  |
|                       http://www.dozyrosy.demon.co.uk/          | 
-------------------------------------------------------------------


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

Date: 9 Mar 1997 04:48:42 GMT
From: "David Williamson" <drwill@loginet.com>
Subject: Win32::Registry
Message-Id: <01bc2c45$416a91c0$1a4281ce@zonetemp.dns.microsoft.com>

I found help for Win32::Registry with my PERL for NT install, but I do not
have the required registry.pm.  I did, however get a registry.pl which
seems completely different.

Does anyone know where I can find this module?  Where can I go to find
modules not included with the usual PERL install?

David R. Williamson


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

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

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