[8337] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1954 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 23 02:07:39 1998

Date: Sun, 22 Feb 98 23:01:49 -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, 22 Feb 1998     Volume: 8 Number: 1954

Today's topics:
        How can i add users to the passwd file in unix with Per <insel@msn.com>
    Re: How can i add users to the passwd file in unix with (Martien Verbruggen)
    Re: How can i add users to the passwd file in unix with uri@sysarch.com
        HowTo "break" and ?: operator anand@erc.msstate.edu
    Re: HowTo "break" and ?: operator <tchrist@mox.perl.com>
    Re: HowTo "break" and ?: operator (Martien Verbruggen)
    Re: HowTo "break" and ?: operator (Mark-Jason Dominus)
    Re: if (-d $filename) in Win32 (Martien Verbruggen)
    Re: if (-d $filename) in Win32 <cdkaiser@delete.these.four.words.concentric.net>
    Re: if (-d $filename) in Win32 <webmaster@fccj.cc.fl.us>
    Re: if (-d $filename) in Win32 (Jonathan Feinberg)
    Re: if you're going to answer FAQs... Proposal: use SEE <Russell_Schulz@locutus.ofB.ORG>
    Re: Killfile Triage (Seymour J.)
    Re: Killfile Triage <schmuckel@ennui.org>
        Multidimensional Hashes and DBM Files <paul.bennett@digitalink.com>
    Re: Multidimensional Hashes and DBM Files <tchrist@mox.perl.com>
        My Own Header Proposals (was: Proposal: use SEEFAQ and/ (Jonathan Feinberg)
    Re: Need CGI programmer, search (Martien Verbruggen)
        Nntp Posting help (Brad Trainham)
    Re: Nntp Posting help <webmaster@fccj.cc.fl.us>
    Re: Nntp Posting help (Martien Verbruggen)
        Nntp Posting Script (Brad Trainham)
        Perl and Windows NT <slide@nospam.inconnect.com>
    Re: Perl and Windows NT (Troy Denkinger)
    Re: Perl training UK robert@shiels.com
    Re: Perl/sendmail  file attatchment (Martien Verbruggen)
    Re: Philisophical Response? Perl5/oop <rjk@coos.dartmouth.edu>
    Re: Philisophical Response? Perl5/oop (Abigail)
    Re: Philisophical Response? Perl5/oop (Billy Chambless)
    Re: Problem using GD to create VERY large gifs. (Martien Verbruggen)
    Re: Problem using GD to create VERY large gifs. (Jonathan Feinberg)
        pronouncing RTFM (was Re: Being Nice 2 Nice Beings...) <Russell_Schulz@locutus.ofB.ORG>
        regexp problem mkolus@atomico.com.ar
    Re: SEND E-MAIL , HELP! <lnelsonNOSPAM@pobox.com>
        the perl4/y2k joke:  get the wording right (was Re: Per <Russell_Schulz@locutus.ofB.ORG>
    Re: ts: Remove files in a PERL sript (brian moore)
    Re: ts: Remove files in a PERL sript (Martien Verbruggen)
    Re: ts: Remove files in a PERL sript <tchrist@mox.perl.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sun, 22 Feb 1998 20:00:18 +0100
From: "Hagen" <insel@msn.com>
Subject: How can i add users to the passwd file in unix with Perl?
Message-Id: <eK$cKh#P9GA.267@upnetnews03>

This is a multi-part message in MIME format.

------=_NextPart_000_0009_01BD3FCC.7FAD3D20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

How can i add users to the passwd file in unix?

Can someone help me

Hagen

insel@msn.com




------=_NextPart_000_0009_01BD3FCC.7FAD3D20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D1>
<P>How can i add users to the passwd file in unix?</P>
<P>Can someone help me</P>
<P>Hagen</P>
<P><A href=3D"mailto:insel@msn.com">insel@msn.com</A></P>
<P>&nbsp;</P></FONT></DIV></BODY></HTML>

------=_NextPart_000_0009_01BD3FCC.7FAD3D20--



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

Date: 23 Feb 1998 00:30:37 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How can i add users to the passwd file in unix with Perl?
Message-Id: <6cqfvd$hnq$5@comdyn.comdyn.com.au>

In article <eK$cKh#P9GA.267@upnetnews03>,
	"Hagen" <insel@msn.com> writes:
> This is a multi-part message in MIME format.

Don't do this. Most people will ignore your post. Usenet is a plain
text medium. Post in plain text.

> How can i add users to the passwd file in unix?

Open up the file in your favourite editor, and add a line. Or, use one
of your system specific admin tools. Or go and ask on a unix group.
This has nothing to do with perl.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Advertising:  The science of arresting
Commercial Dynamics Pty. Ltd.       | the human intelligence long enough to
NSW, Australia                      | get money from it.


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

Date: 22 Feb 1998 18:55:01 -0500
From: uri@sysarch.com
Subject: Re: How can i add users to the passwd file in unix with Perl?
Message-Id: <x7ogzz2o16.fsf@sysarch.com>

"Hagen" <insel@msn.com> writes:

> How can i add users to the passwd file in unix?
> Can someone help me
> Hagen
> insel@msn.com
        ^^^
ask uncle bill. i hear he is a unix guru. BTW what does this have to do
with perl? you can also read some manuals which are online in unix
systems (and are actually useful).

-- snip useless html

hope this doesn't help,

uri

-- 
Uri Guttman                     SYStems ARCHitecture and Software Engineering
uri@sysarch.com                                          Have Perl, Will Hack
http://www.sysarch.com                (781) 643-7504 x*2  FAX: (781) 643-2710
Try the Best Search Engine on the Net -------->  http://www.northernlight.com


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

Date: Sun, 22 Feb 1998 16:05:18 -0600
From: anand@erc.msstate.edu
Subject: HowTo "break" and ?: operator
Message-Id: <6cq7kr$jjo$1@nnrp2.dejanews.com>

Is there an equivalent of C "break" that can be used to terminate for example
a while loop? I tried the same "break" but doesn't seem to work.

And is there an equivalent of C's ?: operator used in conditional expressions?

TIA
Anand

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 23 Feb 1998 00:36:50 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: HowTo "break" and ?: operator
Message-Id: <6cqgb2$i70$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, anand@erc.msstate.edu writes:
:Is there an equivalent of C "break" that can be used to terminate for example
:a while loop? I tried the same "break" but doesn't seem to work.

I'm wonder how you missed this in the perlsyn(1) manpage.

:And is there an equivalent of C's ?: operator used in conditional expressions?

I'm wonder how you missed this in the perlop(1) manpage.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
clueless> $SOCK_STREAM = 2  
    Huh?  use Socket or die!
	    --Tom Christiansen <tchrist@mox.perl.com>


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

Date: 23 Feb 1998 03:46:27 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: HowTo "break" and ?: operator
Message-Id: <6cqrej$j6l$2@comdyn.comdyn.com.au>

In article <6cq7kr$jjo$1@nnrp2.dejanews.com>,
	anand@erc.msstate.edu writes:
> Is there an equivalent of C "break" that can be used to terminate for example
> a while loop? I tried the same "break" but doesn't seem to work.

perldoc perltrap
/C Traps

3rd point

> And is there an equivalent of C's ?: operator used in conditional expressions?

perldoc perlop
/Conditional Operator

Of course, in perl the ?: operator is a bit more flexible.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
NSW, Australia                      | 


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

Date: 22 Feb 1998 21:35:36 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: HowTo "break" and ?: operator
Message-Id: <6cqn9o$3em$1@monet.op.net>
Keywords: coat estimable Salisbury wrongdoing


In article <6cq7kr$jjo$1@nnrp2.dejanews.com>,  <anand@erc.msstate.edu> wrote:
>Is there an equivalent of C "break" that can be used to terminate for example
>a while loop? I tried the same "break" but doesn't seem to work.

Try `last'.

You know, you might consider getting the Camel Book, ``Programming
Perl,'' by Wall, Christiansen, and Schwartz.  I looked in the index
under `break' and it said

	break command (in C), 533
	break statement (see last operator)

>And is there an equivalent of C's ?: operator used in conditional expressions?

Yeah.  Try ?:.

You really should get some book and read it before you go posting any
more questions like these.  Looking in the index can answer a lot of
these questions faster than Usenet will.





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

Date: 23 Feb 1998 01:44:24 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: if (-d $filename) in Win32
Message-Id: <6cqk9o$ibq$1@comdyn.comdyn.com.au>

In article <34F0BE77.64C0A55E@fccj.cc.fl.us>,
	Bill Jones <webmaster@fccj.cc.fl.us> writes:
> Hmmm, maybe I missed something, but
> either should work, IE -
> 
> #!perl -w
> 
> print 'I am looking for C:\/(?)Temp' . "\n\n";
> 
> print 'Found it as C:/Temp!     ' if (-d "c:/Temp");
> 
> print 'Still there as C:\Temp...' if (-d "c:\Temp");

"c:\\temp" or 'c:\temp'

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Advertising:  The science of arresting
Commercial Dynamics Pty. Ltd.       | the human intelligence long enough to
NSW, Australia                      | get money from it.


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

Date: 22 Feb 1998 21:54:02 GMT
From: Cameron Kaiser <cdkaiser@delete.these.four.words.concentric.net>
Subject: Re: if (-d $filename) in Win32
Message-Id: <6cq6pq$pcq@examiner.concentric.net>

Chipmunk <rjk@coos.dartmouth.edu> writes:

>> while($filename = readdir(HOMEDIR)) {

>Hmm...  I wonder what that would do if I had a file named 0 (zero)...

Good call. Didn't think of that. :-*

--
Cameron Kaiser
cdkaiser at concentric dot net (it hasn't helped the spam yet though)
*** visit the Spectre Server at www.sserv.com
*** C64 software lives! www.computerworkshops.home.ml.org


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

Date: Sun, 22 Feb 1998 19:10:36 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: if (-d $filename) in Win32
Message-Id: <34F0BE77.64C0A55E@fccj.cc.fl.us>

Hmmm, maybe I missed something, but
either should work, IE -

#!perl -w

print 'I am looking for C:\/(?)Temp' . "\n\n";

print 'Found it as C:/Temp!     ' if (-d "c:/Temp");

print 'Still there as C:\Temp...' if (-d "c:\Temp");


HTH,
Bill



Andrew M. Langmead wrote:

> jdf@pobox.com (Jonathan Feinberg) writes:
>
> >I appreciate your correction, but I'm puzzled.  DOS (including command.com in
> >NT) does not recognize '/' as a directory separator; it's used as the switch
> >prefix.  '\' is the only path separator that will work on DOS machines.
> >Please unconfuse me.
>
> You're confusing the operating system with a program that runs on the
> operating system.
>
> On Unix, the operating system itself is contained in a file called
> /vmunix or something. It has operating system calls, or entry points
> that are responsible for starting new processes, and for opening,
> reading, and writing files, among other things (for a hopefully
> comprehensive list, see the section 2 man pages.) At some point, it
> will start a program called a shell (/bin/sh, or something similar.)
> **The shell is not the operating system**. It is just a program that
> makes calls to the operating system.
>
> On MS-DOS, you have something similar, but the operaing system kernel
> are in files called msdos.sys and io.sys. By default, when booting up,
> MS-DOS initially runs a copy of COMMAND.COM. Again, COMMAND.COM is not
> the operating system, it is just a program.
>
> Now when a program needs to do something that the operating system is
> in charge of, (like running another program, reading or writing files,
> whatever.) it makes a call to the operating system.  The way a program
> makes an operating system call varies between operating systems. In
> MS-DOS, the program first fills up various CPU registers with certain
> data and then executes a CPU INT instruction. It doesn't interact with
> any sort of shell or command interpreter in any way. In MS-DOS, since
> the concept of directories were introduced in version 2, any operating
> system call that takes a file or directory name as an argument treats
> forward and backslashes identically.
>
> Now the shell or command interpreter is a program that performs a lot
> of operating system calls. It takes user input, parses it and splits
> it up, maybe adds some of its own information, and then makes the
> appropriate operating system call. On COMMAND.COM under MS-DOS, when a
> user types a forward slash, the program tries to intepret the forward
> slash as in option, and so it messes up the argument before it passes
> it to the operating system.
>
> Since perl is making calls to the operating system, not the command
> interpreter, it is not subject to the syntax parsing limiations of
> COMMAND.COM.
>
> (For simplicities sake, I used the term "MS-DOS" where I really meant
> the more general phrase. "MS-DOS, including the copy of MS-DOS that is
> bundled Windows '95. Some of these features may be present in later
> Microsoft operating systems.)
>
> --
> Andrew Langmead





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

Date: Sun, 22 Feb 1998 21:22:47 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: if (-d $filename) in Win32
Message-Id: <MPG.f5aa77e8cd30e22989731@news.concentric.net>

webmaster@fccj.cc.fl.us said...
: Hmmm, maybe I missed something, but
: either should work, IE -

: print 'Still there as C:\Temp...' if (-d "c:\Temp");

You really have a folder called "c:Temp" ? (You didn't escape your backslash!)
-- 
#Jonathan Feinberg         jdf@pobox.com        Sunny Brooklyn, NY


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

Date: Sun, 22 Feb 1998 23:11:55 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: if you're going to answer FAQs... Proposal: use SEEFAQ and/or OFFTOP
Message-Id: <19980222.231155.3g3.rnr.w164w@locutus.ofB.ORG>

aml@world.std.com (Andrew M. Langmead) writes:

> Steven Tolkin <steve.tolkin@fmr.com> writes:
>
>> I agree completely.  I read Tom's postings for the information they
>> contain.  But recently there have been a lot of "see the FAQ".
>
> 1. It still leaves the original question unkilled. Its the FAQs that
> are the real problem, not the posts that tell the FAQ asker that their
> question is a FAQ. 

this is an independent problem.

the problem I mentioned is dealing with a bimodal person where half
of the posts are useful, and half are the same rote text.

we just want to easily ignore the rote text ones.

> 4. Some people use awful little newsreaders that thread based on
> subject lines rather than references headers.

I had suggested an extra header.  perhaps `SEEFAQ' in the Keywords:
header would be enough.  perhaps a `FAQ-Pointer: yes' would.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: Fri, 20 Feb 98 19:47:33 -0500
From: Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org>
To: rone+usenet@ennui.org (boar dome)
Subject: Re: Killfile Triage
Message-Id: <6cqj7v$94m$3@news1.mnsinc.com>

In <6ccvla$smi$1@shell13.ba.best.com>, on 02/17/1998
   at 01:32 PM, rone+usenet@ennui.org (boar dome) said:

>You just fell off the World Wide Web truck and woke up in Usenetland,
>didn't you?

Wrong again. But since I don't suffer fools gladly, and since you seem
to be a person with the ethics of grubor and the intellect of boursey,
it's time to update my filters. Ask your friends, if any, to explain:

*PLONK*


--
-----------------------------------------------------------
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     Atid/2
     Team OS/2
     Team PL/I

Any unsolicited commercial junk E-mail will be subject to legal
action.  I reserve the right to publicly post or ridicule any abusive
E-mail.

I mangled my E-mail address to foil automated spammers; reply to
domain acm dot org user shmuel to contact me.  Do not reply to
spamtrap@library.lspace.org
-----------------------------------------------------------



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

Date: 22 Feb 1998 18:24:11 -0800
From: <schmuckel@ennui.org>
Subject: Re: Killfile Triage
Message-Id: <rone.SunFeb22182208PST1998.520@ennui.org>

In article <6cqj7v$94m$3@news1.mnsinc.com>,
Shmuel (Seymour J.) Metz  <spamtrap@library.lspace.org> wrote:
>In <6ccvla$smi$1@shell13.ba.best.com>, on 02/17/1998
>   at 01:32 PM, rone+usenet@ennui.org (boar dome) said:
>>You just fell off the World Wide Web truck and woke up in Usenetland,
>>didn't you?
>Wrong again. But since I don't suffer fools gladly, and since you seem
>to be a person with the ethics of grubor and the intellect of boursey,

 ... says the man with the 15-line .sig.

rone
oh, and the address works.  luser.
-- 
Chaining yourself to a stump isn't civil disobedience unless you're really
against stump-chaining laws.
					- gomi no sensei <gomi@best.com>


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

Date: Sun, 22 Feb 1998 19:50:52 +0000
From: "Paul R. Bennett" <paul.bennett@digitalink.com>
Subject: Multidimensional Hashes and DBM Files
Message-Id: <34F0819C.12F3@digitalink.com>

Is there any way to use opendbm to save a multidimensional hash to disk 
so that it can be retrieved later after the script that created it has 
terminated? When I try to do this, the primary keys can be retrieved but 
not the secondary keys or values. I believe this is because the primary 
dimension's values are references, and these references are no longer 
valid after the script terminates. Any suggestions?

P.S. It's no problem with a unidimensional hash or if reading a 
multidimensional hash within the same script that created it.


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

Date: 23 Feb 1998 01:00:39 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Multidimensional Hashes and DBM Files
Message-Id: <6cqhnn$i70$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    paul.bennett@digitalink.com writes:
:Is there any way to use opendbm to save a multidimensional hash to disk 
:so that it can be retrieved later after the script that created it has 
:terminated? 

You mean other than the ways documented in the manpages?  

    % grep -l MLDBM /usr/src/perl/pod/*.pod /usr/lib/perl5/man/man3/*
    /usr/src/perl/pod/perldsc.pod
    /usr/src/perl/pod/perlfaq4.pod
    /usr/src/perl/pod/perltie.pod
    /usr/lib/perl5/man/man3/DB_File.3

Probably not. :-)

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


    "It's okay to be wrong temporarily." --Larry Wall


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

Date: Sun, 22 Feb 1998 21:42:49 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: My Own Header Proposals (was: Proposal: use SEEFAQ and/or OFFTOP)
Message-Id: <MPG.f5aac30129f1d93989733@news.concentric.net>

Russell_Schulz@locutus.ofB.ORG said...
: I had suggested an extra header.  perhaps `SEEFAQ' in the Keywords:
: header would be enough.  perhaps a `FAQ-Pointer: yes' would.

While we're at it, how about METOO, Mostly-Quote, SPAM, Written-In-Anger, 
With-Attached-Pamela-Anderson-Lee-Mpegs, SPAM, OT, WAY-OT, Just-Killfile-Me-
Now, SPAM, SPAM, Kludgy-Rewrite-Of-Printf, SPAM_SPAM_SPAM...
-- 
Jonathan Feinberg         jdf@pobox.com        Sunny Brooklyn, NY
eagerly waiting for his suggestion to catch


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

Date: 23 Feb 1998 00:22:38 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Need CGI programmer, search
Message-Id: <6cqfge$hnq$4@comdyn.comdyn.com.au>

In article <6cm5u4$9ok$1@nnrp2.dejanews.com>,
	drnkl@ibm.net writes:
> offer recommendations and a quotation (your fees) please. This is part of a
> very large job, 30 web sites times n.

Fees? Depends on what I have to do. Count on about $90 p/h, Increments
of 15 minutes.

Since you posted this crap about 6 times, and I had to read all of
them, you have a bill of $22.50. Where do I send it?

> As I said, do not bother to reply unless you know your job, please.Thanks,
> Dr. Nichols

Oh, ok, sorry.
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd.       | why kamikaze pilots wore helmets - Dave
NSW, Australia                      | Edison 


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

Date: Sun, 22 Feb 1998 17:17:20 -0700
From: trainham@onr.com (Brad Trainham)
Subject: Nntp Posting help
Message-Id: <QAM80U3Ey0JS092yn@onr.com>


-- 
Brad Trainham


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

Date: Sun, 22 Feb 1998 23:06:19 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: Nntp Posting help
Message-Id: <34F0F5BB.62930A57@fccj.cc.fl.us>

Obviously...

Brad Trainham wrote:

> --
> Brad Trainham





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

Date: 23 Feb 1998 00:32:30 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Nntp Posting help
Message-Id: <6cqg2u$hnq$6@comdyn.comdyn.com.au>

In article <QAM80U3Ey0JS092yn@onr.com>,
	trainham@onr.com (Brad Trainham) writes:
> 

Hmm.. I see that you indeed do need help with this. Maybe you should
use a newsreader? Or use News::NNTPClient?

http://www.perl.com/CPAN/modules/

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
NSW, Australia                      | 


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

Date: Sun, 22 Feb 1998 18:29:09 -0700
From: trainham@onr.com (Brad Trainham)
Subject: Nntp Posting Script
Message-Id: <lDN80U3Eys3N092yn@onr.com>


Hi,
I want to either write or find a script I can use to 
prepare messages to be uploaded to my news server by the souper program.
I'm using Mks Kornshell uneer Windows95 and am using the
Mks perl implementation. In the case of replies and
follow-ups, I want to be able to call the script or a variant of it from 
within vi using the shell escape facility. 
Any help would be appreciated. 
Thanks,


-- 
Brad Trainham


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

Date: Fri, 20 Feb 1998 18:35:18 -0700
From: Mark <slide@nospam.inconnect.com>
Subject: Perl and Windows NT
Message-Id: <34EE2F55.EB7DD440@nospam.inconnect.com>

Hi there,

        I've been using PERL for a while now and creating scripts that
run under UNIX. But now I need to run those same scripts under NT
server. Can anyone tell me an easy way (yeah right) to do this? I'm
pretty much lost. Do I need to create a cgi-bin directory, put perl's
path in my scripts, etc. Any help would be greatly appreciated.


Mark




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

Date: Sun, 22 Feb 1998 04:36:53 GMT
From: troy@whadda.com (Troy Denkinger)
Subject: Re: Perl and Windows NT
Message-Id: <6cquj6$rjh$1@hirame.wwa.com>

In article <34EE2F55.EB7DD440@nospam.inconnect.com>, Mark <slide@nospam.inconnect.com> wrote:
>        I've been using PERL for a while now and creating scripts that
>run under UNIX. But now I need to run those same scripts under NT
>server. Can anyone tell me an easy way (yeah right) to do this? I'm

Should be no real problem as long as you haven't done 
anything NT can't do.  <g>

>pretty much lost. Do I need to create a cgi-bin directory, put perl's

If you're wanting to do CGI with your Perl scripts, consult 
your web server docs.  Otherwise, probably not.  CGI is just 
a small portion of what Perl is capable of.

>path in my scripts, etc. Any help would be greatly appreciated.

Not necessary, just make sure that the Perl binary directory 
is in your path.  However, I do include the path on the 
hash-bang line because I feel better doing it and it gives 
me somewhere to put my -w that doesn't look silly.

Regards,

Troy Denkinger



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

Date: Sun, 22 Feb 1998 23:29:55 GMT
From: robert@shiels.com
Subject: Re: Perl training UK
Message-Id: <34f0ab05.12401627@news.ftech.net>

"nospam" <nospam@no.spam> wrote:

>We are looking into conducting Perl training in the UK, with a top UK based
>computer training agency or with a top Perl Hacker from Stonhenge
>Consulting, oregon http://www.perltraining.com
>
>We have not found any other places in the UK fro training.

For the record - Learning Tree do a 4 day Perl course in Hammersmith,
London.

Robert

------
Robert Shiels - www.shiels.demon.co.uk
------


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

Date: 23 Feb 1998 00:15:43 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl/sendmail  file attatchment
Message-Id: <6cqf3f$hnq$3@comdyn.comdyn.com.au>

In article <34ED805F.96617C1A@net7.co.uk>,
	Robert Barker <billy@net7.co.uk> writes:
> Can u attatch files with sendmail???

Who is 'u'?

You shouldn't be using sendmail. You should be using one of the Mail::
modules that you can get from CPAN. If you want to work with email
attachments, get MIME::Lite as well.

http://www.perl.com/CPAN/

> I want the user to select a file from a html pulldown menu, fill in
> their
> email address and have the file sent back to them.

You are aware of the dangers of running external programs with user
supplied input, right? You have read the perlsec documentation, right?

perldoc perlsec

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
NSW, Australia                      | 


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

Date: Sun, 22 Feb 1998 22:48:34 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Laurel Shimer <autopen@autopen.com>
Subject: Re: Philisophical Response? Perl5/oop
Message-Id: <34F0F195.D723215@coos.dartmouth.edu>

[posted and mailed]

Laurel Shimer wrote:
> 
> Hope I haven't missed this sort of discussion in the past.

> I am working with someone who writes all their Perl as object oriented
> Perl.
> [...]
> When we talk he always says 'you are going to need to write this (new
> code) in Perl 5'. It seems to me that since I invoke the Perl5 interpreter
> and use functions that are new to Perl 5 (chomp, newer version of
> subroutine calls, etc.) that I am 'writing in Perl 5'. He, of course,
> feels that to write in Perl 5 is to write object oriented only.

There was a brief discussion on this a few days ago, I believe.  Basically,
you're right, and he's wrong.  Yes, you can write object-oriented Perl5 code,
but Perl5 code is not necessarily object-oriented.

>From the manpage for perl, with perl5.004:

   Perl version 5 is nearly a complete rewrite, and provides the
   following additional benefits: 

       Many usability enhancements ...
       Simplified grammar ...
       Lexical scoping ...
       Arbitrarily nested data structures ...
       Modularity and reusability ...
       Object-oriented programming ...
       Embeddable and Extensible ...
       POSIX compliant ...
       Package constructors and destructors ...
       Multiple simultaneous DBM implementations ...
       Subroutine definitions may now be autoloaded ...
       Regular expression enhancements ...
       Innumerable Unbundled Modules ...
       Compilability ...

Object-oriented programming is just one of many additions to Perl5.

-- 
 _ / '  _      /             rjk@coos.dartmouth.edu
( /)//)//)(//)/(                     chipmunk@m-net.arbornet.org
    /                                        http://www.ziplink.net/~rjk/
        It's funny 'cause it's true ... and vice versa.


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

Date: 22 Feb 1998 22:38:50 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Philisophical Response? Perl5/oop
Message-Id: <6cq9dq$6mv$10@client3.news.psi.net>

Laurel Shimer (autopen@autopen.com) wrote on 1636 September 1993 in
<URL: news:autopen-2202981053190001@dynamic58.pm07.mv.best.com>:
++ 
++ When we talk he always says 'you are going to need to write this (new
++ code) in Perl 5'. It seems to me that since I invoke the Perl5 interpreter
++ and use functions that are new to Perl 5 (chomp, newer version of
++ subroutine calls, etc.) that I am 'writing in Perl 5'. He, of course,
++ feels that to write in Perl 5 is to write object oriented only.

He's wrong.

++ I'm curious about the communities  attitudes towards object oriented Perl
++ and also the concept that Perl 5 implies object oriented code.

Perl allows you to use OO code, but it certainly doesn't require
you. And that's a good thing, as Perl's way of dealing with OO
leaves lots and lots to wish for.



Abigail
-- 
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
           print+Just (), another (), Perl (), Hacker ();'


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

Date: 23 Feb 1998 00:58:24 GMT
From: billy@cast.msstate.edu (Billy Chambless)
Subject: Re: Philisophical Response? Perl5/oop
Message-Id: <6cqhjg$gl3$2@nntp.msstate.edu>

In article <6cptro$lrr@fridge.shore.net>, nvp@shore.net (Nathan V. Patwardhan) writes:
|> Laurel Shimer (autopen@autopen.com) wrote:

|> : subroutine calls, etc.) that I am 'writing in Perl 5'. He, of course,
|> : feels that to write in Perl 5 is to write object oriented only.

|> No.  He's incorrect.  There's been much written in Perl (using 'Perl
|> 5') that's not OOP.

For that matter, there's been a lot written in Perl5 OO Syntax  that's
not really OO in any real way. A lot of the modules just use an "object"
as a place to keep global methods (which are frowned on by true OO
snobs).

Not to say that this is bad, but sometimes people get wrapped up in the
buzzword side of technology, and lose tracl of the prpose of a given
technique.

|> Ohh the buzzwords that people will fall for.  That Java is bound to do
|> us all in.  :-)

Did you know that Java has made all other programmming languages
obsolete? I know this because I was told by the same guy who told me in
1994 that C++ was going to replace all other languages. ;)
-- 
* "And there _is_ a real world. In fact, some of you
*    are in it right now."  -- Gene Spafford


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

Date: 23 Feb 1998 03:42:58 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Problem using GD to create VERY large gifs.
Message-Id: <6cqr82$j6l$1@comdyn.comdyn.com.au>

In article <1d4uipc.dm4i02fng40wN@twig.demon.co.uk>,
	fergus@twig.demon.co.uk (Fergus McMenemie) writes:
> Hello
> 
> I am using Perl 5.002 and GD to create a very large GIF,

You really should upgrade to a newer version of perl.

> 12000x6000 pixels. The script creats an empty gif and then

Maybe a silly question, but does your machine have enough memory to
deal with this? I am not sure how gdlib handles this internally, but I
suspect that at some point, it will have a bitmap in memory. 1 byte
per pixel, probably.

12000 x 6000 is approximately 72 MB, just for the bitmap in memory.
That is not counting anything else, duplications or whatever.

Again: I am not sure that that is what gdlib does internally, but it
wouldn't surprise me. Large image manipulations are notorious for the
amounts of memory they can use.

>        Cant fork at /usr/local/lib/perl5/site_perl/GD.pm line 78

Since you don't provide us with a version of GD you are using, it is
very hard to say what exactly is done at 'line 78'.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd.       | inexactitude.
NSW, Australia                      | 


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

Date: Sun, 22 Feb 1998 21:29:58 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: Problem using GD to create VERY large gifs.
Message-Id: <MPG.f5aa9369ae169de989732@news.concentric.net>

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

fergus@twig.demon.co.uk said...
: I am using Perl 5.002 and GD to create a very large GIF,

You oughta upgrade to Gurusamy Sarathy's binary distribution of perl5.004_02, 
which has a working GD port.

http://www.perl.com/CPAN-local/authors/Gurusamy_Sarathy/perl5.00402-bindist04-
bc.tar.gz

Perhaps try that, and let us know if it doesn't work.
-- 
#!/usr/bin/perl -w --                     Just another Perl hacker,
(open 0),$_=<0>,s,.*- +,,,chop;for(split?@*?){($$_++or$}=$_,y,y \,\
y,<STDIN>,,$$=~s\^\"sub $_ {print'$}'};7"\ee),y,} \,},>STDOUT,,&$_}
# Jonathan Feinberg         jdf@pobox.com        Sunny Brooklyn, NY


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

Date: Sun, 22 Feb 1998 23:05:54 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: pronouncing RTFM (was Re: Being Nice 2 Nice Beings...)
Message-Id: <19980222.230554.4O4.rnr.w164w_-_@locutus.ofB.ORG>

bart.mediamind@tornado.be (Bart Lateur) writes:

> Why not create a censored version. Something like
>         RT*M

I tell people `RTFM', but when they ask what it stands for, I always say

  Read The Manual

I learned this from a TA once, and I think it is non-offensive (unless
the person you tell it to wants it to be).
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: 22 Feb 1998 17:25:37 -0800
From: mkolus@atomico.com.ar
Subject: regexp problem
Message-Id: <6cqj6h$k31@edrn.newsguy.com>

Hello!   Why this:  s/^From:\s([^\S]*)/\1/i;   return an string with the \n at
the end?.. i also tried [^\n\r] and didnt work.


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

Date: Sun, 22 Feb 1998 20:01:01 -0500
From: Lee Nelson <lnelsonNOSPAM@pobox.com>
Subject: Re: SEND E-MAIL , HELP!
Message-Id: <34F0CA4D.311EFBEE@pobox.com>



Is it possible that you $addressee variable has an
extra newline at the end?  That would cause the
problem you describe, although when I tested it,
the subject showed up as the first line as the
body.

And what's with the comma at the end
of this line:

    print SENDMAIL "Subject: ", $subject, "\n\n",

Perhaps that is causing your problem?

    -Lee



Alexander Kovalenko wrote:

> hey , how is it going?
> I have a problem with following procedure...
> sub send_mail
> {
>   local($addressee, $subject, $message) = @_;
>   local($sendmail) = "/usr/sbin/sendmail";
>   open(SENDMAIL, "| $sendmail -t");
>   print SENDMAIL "To: ", $addressee, "\n";
>   print SENDMAIL "Subject: ", $subject, "\n\n",
>   print SENDMAIL "$message\n";
>   close(SENDMAIL);
> }
> it sends e-mail , ok... but it does not use a subject , so it just leave
> it blank...
> what's wrong am I doing ? thanks in advance!
>
> --
> With best wishes,
> Alex.





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

Date: Sun, 22 Feb 1998 23:17:12 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: the perl4/y2k joke:  get the wording right (was Re: Perl 4/5)
Message-Id: <19980222.231712.8N2.rnr.w164w_-_@locutus.ofB.ORG>

charlot@CAM.ORG (Richard Bellavance) writes:

> Have you tried telling you system manager (or his boss) that Perl
> 4 is not year 2000 compliant, and that there are no plans to make
> it so ?

no, no, no.  the correct statement does not have any falsehoods:

  ``There are no plans to make Perl4 y2k-compliant.''
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: 23 Feb 1998 03:28:27 GMT
From: bem@news.cmc.net (brian moore)
Subject: Re: ts: Remove files in a PERL sript
Message-Id: <slrn6f1r7o.468.bem@thorin.cmc.net>

On 23 Feb 1998 03:03:10 GMT, 
Craig Berry <cberry@cinenet.net> wrote:
>Tom Christiansen (tchrist@mox.perl.com) wrote:
>: In comp.lang.perl.misc, bem@news.cmc.net (brian moore) writes:
>: :Larry, Tom, Randal, and the rest of the people responsible for the Perl
>: :docs did a great job of writing them.  
>: 
>: Thanks, but s/Randal// -- he hasn't written any manpages.
>
>I count _Learning Perl_ and _Programming Perl_ among the "Perl docs" -- 
>'doc' neq 'online doc' (though admittedly that's what most of this thread 
>has talked about).

I do as well.  (And -both- editions of the Camel.)  Tempted to even throw
in the Panther, but the problem usually isn't in people that would find
answers there.

They are part of the 'M' in RTFM at any rate.



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

Date: 23 Feb 1998 00:05:48 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: ts: Remove files in a PERL sript
Message-Id: <6cqegs$hnq$2@comdyn.comdyn.com.au>

In article <6chuo9$a1j@news3.euro.net>,
	<soul@explorer.com> writes:
> yeah all you hardcore perl hackers make this joint a dull experience.
> 
> the reason people are asking questions that are in the faq and the
> manpages is because the manpages are way technical and half the
> time don't explain stuff thoroughly!

You could of course always hire a nanny to hold your hand and
translate the difficult words. It's not a manual for a toothpick. It's
documentation for a programming language.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | The gene pool could use a little
Commercial Dynamics Pty. Ltd.       | chlorine.
NSW, Australia                      | 


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

Date: 23 Feb 1998 00:56:43 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: ts: Remove files in a PERL sript
Message-Id: <6cqhgb$k7a$1@csnews.cs.colorado.edu>

In comp.lang.perl.misc, bem@news.cmc.net (brian moore) writes:
:Larry, Tom, Randal, and the rest of the people responsible for the Perl
:docs did a great job of writing them.  

Thanks, but s/Randal// -- he hasn't written any manpages.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
"...we will have peace, when you and all your works have perished--and
 the works of your dark master to whom you would deliver us.  You are a
 liar, Saruman, and a corrupter of men's hearts."  --Larry Wall in perl/taint.c, citing Theoden from LOTR


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

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

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