[6824] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 449 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 8 01:07:29 1997

Date: Wed, 7 May 97 22:00:21 -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, 7 May 1997     Volume: 8 Number: 449

Today's topics:
     Re: canned replies (Nathan V. Patwardhan)
     Re: Dates (Mike Stok)
     GD Problem (Won't "make") (Mont Erickson)
     Help a Newbie (please) <webmaster@rlws.com>
     How do I determine the real/effective user HOME dir giv (Mark Daku)
     Re: How do I determine the real/effective user HOME dir (Mike Stok)
     Re: need help w/forms and Perl (Geoffrey Hebert)
     Need help with PERL script! (Brian Locascio)
     Re: Need To Access Unix Database <billc@tibinc.com>
     Newbie question alert! Strip characters during split. <jcashman@eba.com.au>
     Re: Newbie question alert! Strip characters during spli (Tad McClellan)
     Re: No dbm on this machine (Brooks Davis)
     Re: Notice to antispammers - is there a list of spammer (Dylan Northrup)
     NT, NetWare, Perl, CGI -- all in one! <stranw@gte.net>
     Re: PERL cross reference generator (Geoffrey Hebert)
     Re: Split simple ? (David Alan Black)
     Re: Split simple ? (sdm)
     standards <walkerjl@swbell.net>
     Suggestion (Terrence M. Brannon)
     undesired spaces <dcounts@preferred.com>
     Re: undesired spaces (Tad McClellan)
     Re: uuencode? (Nathan V. Patwardhan)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 8 May 1997 02:02:22 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: canned replies
Message-Id: <5krc7e$mu@fridge-nf0.shore.net>

I R A Aggie (fl_aggie@hotmail.com) wrote:

: Probably an auto-responder for email. Yes?

Lord only knows.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 8 May 1997 02:00:32 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Dates
Message-Id: <5krc40$nr7@news-central.tiac.net>

In article <660BD04D3FA91343.0BD96569A5436C38.3B8B2855D40CC748@library-proxy.airnews.net>,
Robert Saunders <robert@duey.iminet.com> wrote:
>I am trying to use the date function. but I don't need all the
>information that it returns.. I would like to parse the information so
>I could get just the Month and the Day out of the date function. 

You can use localtime to get the date & time info back, depending on how
you want the data you can say something like

  @days = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
  @months = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
             'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');

  # ...

  ($monthDay, $dayNo, $monthNo) = (localtime)[3, 6, 4];
  print "It's $days[$dayNo] $monthDay $months[$monthNo]\n";

if you want to do all the work yourself, or the nearly equivalent

  use POSIX qw/strftime/;

  # ...

  print strftime "It's %a %d %b\n", localtime;

if you have a recent perl with the POSIX module (which should respect any
locale settings too.)  In perl 5 you can even use substr to chop out the
useful bits from the scalar return of localtime...

In perl 4 there was the ctime.pl library if you wanted a date string
without calling an external program.

Of course, there's more than one way yo do it in perl.

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: Thu, 08 May 1997 03:26:57 GMT
From: merick@xmission.com (Mont Erickson)
Subject: GD Problem (Won't "make")
Message-Id: <5krdmr$4qd$1@news.xmission.com>

Anyone out there compiled GD (Thomas Boutell's gd graphic library)
successfully on SunOS 4.1.3?  Or can someone at least give me an idea
of what to do to solve the following error when running "make" on it?

umask 0 && cp GD.pm blib/lib/GD.pm
AutoSplitting GD (./blib/lib/auto/GD)
umask 0 && cp qd.pl blib/lib/qd.pl
DEFINE=''; export DEFINE INC; \
cd libgd && make -e
cc -c  -O -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -pic
-I/usr/local/perl5.002/l
ib/sun4-sunos/5.002/CORE  gdfontg.c
"./gd.h", line 85: syntax error at or near type word "int"
"./gd.h", line 86: syntax error at or near word "struct"
"./gd.h", line 87: syntax error at or near word "struct"
"./gd.h", line 88: syntax error at or near word "struct"
"./gd.h", line 89: syntax error at or near variable name "im"
"./gd.h", line 89: gdImagePtr declared as parameter to non-function
"./gd.h", line 90: syntax error at or near variable name "im"
"./gd.h", line 90: gdImagePtr declared as parameter to non-function
"./gd.h", line 91: syntax error at or near variable name "im"

 ...etc etc etc...

Thanks in advance!






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

Date: Wed, 07 May 1997 16:37:06 +0100
From: "Eric A. Backlund" <webmaster@rlws.com>
Subject: Help a Newbie (please)
Message-Id: <3370A18A.1947@rlws.com>

I am looking for script that will allow users to download a file to
their disk, through a web page. The file has an .exe extentension, and
when I create a link to the file, it load the text into the browser
intstead of bringing up a Save As dialog box. Any help will be greatly
appreciated. 

Thanks,
Eric 
--webmaster@rlws.com


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

Date: 07 May 1997 21:47:54 -0400
From: daku@nortel.ca (Mark Daku)
Subject: How do I determine the real/effective user HOME dir given just the UID
Message-Id: <esqzpu6ybsl.fsf@nortel.ca>


Given a UID can I determine in a simple fashion the users Home
Directory?  I can not look at env vars at all for this. Thus
$ENV{HOME} will not work.

I'm looking for an optimal solution that minimzes external calls
and CPU.

Any Help would bea appreciated.

Mark Daku
daku@notel.ca


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

Date: 8 May 1997 02:13:51 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: How do I determine the real/effective user HOME dir given just the UID
Message-Id: <5krcsv$pht@news-central.tiac.net>

In article <esqzpu6ybsl.fsf@nortel.ca>, Mark Daku <daku@nortel.ca> wrote:
>
>Given a UID can I determine in a simple fashion the users Home
>Directory?  I can not look at env vars at all for this. Thus
>$ENV{HOME} will not work.

  $home = (getpwuid $uid)[7];

might be one way of doing it.

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: Thu, 08 May 1997 02:54:28 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: Re: need help w/forms and Perl
Message-Id: <5kre60$d7j$3@news3.microserve.net>

see below

peter.wood@axom.com (Peter Wood) wrote:

>Hello,

>I am working on a project in which I have a list of service orders for our
>company.  This is a list in table form, with each row representing a
>specific service order, with information on service order number, customer,
>description, etc.

>I am using Perl right now, because that's what I know.

>What I would like to do is have two buttons next to each row - one called
>"modify" and one called "close" - which would do the appropriate actions on
>service orders.  Also there would be a button at the bottom to open a new
>service order.  

>This is the intended final form anyway.  

>The way I have it now is this:  Each entry in the list has a radio button
>next to it, where the value of the button is the service order number,
>which is coded into the button when the HTML is generated from a raw data
>file.  These buttons are one set of buttons named "thenum."  Then, at the
>bottom, there is another set of radio buttons named "userchoice."  The
>users selects either modify, close, or open.  After selecting one of these,
>and "thenum" of the service order number above, they submit the form.  The
>script takes the "userchoice" and decides what form to send the user to
>next, passing "thenum" along with it to be placed into the appropriate spot
>on the form.

>This works pretty much as it should.  However, it's really supposed to be a
>one-click approach.  What I want to know is, how can I do this?  Is there
>anyway I can have a single-clickable button that is encoded with two
>values, so that rather than using three clicks, a user would look at the
>list, click a button, and be taken away?

I do this by making every selection a separate form.  On my site the
data I want to pass is in hidden fields.  The only thing the user sees
is the submit button which, of course, has a descriptive label.

>I know this might sound complicated but it is important, and right now, I'm
>stuck with the clumsy three-click approach.

>I have considered JavaScript, but right now I'm more concerned with getting
>the project done, and don't have time to learn a new language.

>Anyone with words of wisdom is welcome to submit them to my email address. 
>I can try and give you a more detailed description.  I might be able to
>provide you with some code portions, but not all...got to keep at least one
>or two industrial secrets, eh? :)

>Thanks,

>Peter

>Peter R. Wood, Technical Support <*--Axiom Technologies, Inc.--*>
>mailto:peter.wood@axom.com http://www.axom.com/ http://www.axom.com/~pwood/

-------  signature  ----------

Check out the Perl site!

http://www.microserve.net/~soccer/

use password perlmisc

Geat tool for Developers>



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

Date: Thu, 08 May 1997 04:09:33 GMT
From: brian@accesschicago.net (Brian Locascio)
Subject: Need help with PERL script!
Message-Id: <A0CB3853B454EE3F.E8326324DF80BD20.1D1456E67838644C@library-proxy.airnews.net>

Hello!

I am looking for some ideas/help on how to take information from a
space delimited text file that looks like this (see below) and imput
each line to the BSDI "adduser" program.  This script will save me the
trouble of entering account information manually for 1000+ users!


{username} {password} {First Name} {Last Name} {shell}


The script will need to read the information from this text file and
imput it to the "adduser" program with a few switches.  

Example of  BSDI "adduser" command line:

adduser -g {groupname} -h {user home directory} -P {password}


At this point I am not looking for anyone to write the script for me
(of course I would pay).  However, if you could give me ideas or setup
the framework for the small script, I would be in debt to you!

Thanks for your help!!!


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

Date: Wed, 07 May 1997 22:22:33 -0400
From: Bill Cowan <billc@tibinc.com>
To: Jerry Smith <jerry@ocfelections.com>
Subject: Re: Need To Access Unix Database
Message-Id: <337138E9.1A0A@tibinc.com>

Jerry Smith wrote:
> 
> I need to access my Unix Database (Oracle) from the Internet. I am using
> Windows NT as my Internet Server.
> 
> Can I use Oraperl to access the Oracle Database, or does anybody have any
> other Solutions.
> 
> PS The Oracle Database is not using ODBC

If there is not a port of Oracle and DBD/DBI for Windows NT, your only
option may be to add ODBC on NT.  (My guess is "quite probable".)

You would need to add Oracle's SQL*Net and ODBC driver to your NT system
where Internet server is.  And then get NT Perl module for ODBC access:

  Database access via ODBC by Dave Roth's Win32::ODBC module:
    Win32::ODBC Home Page with Online Documentation:
        http://www.roth.net/odbc/
    Also see FAQ for database questions.

    Download from:
        http://www.perl.com/CPAN/authors/Dave_Roth/

-- Bill
-----------------------------------------------------------------------
Bill Cowan <billc@tibinc.com>    Voice:919-490-0034   Fax:919-490-0143
Tiburon, Inc./3333 Durham-Chapel Hill Blvd Suite E-100/Durham, NC 27707


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

Date: Thu, 8 May 1997 11:40:56 +1000
From: "Jerry Cashman" <jcashman@eba.com.au>
Subject: Newbie question alert! Strip characters during split.
Message-Id: <5krbbd$1v@news.aus.world.net>

Hi all,

I am reading a bunch of records from a comma-seperated, quote delimited
text file and want to assign them to a group of named var's for further
processing.

I am currently assigning the var's using SPLIT on the comma which seperates
the fields, but would like an easy way to strip the quote delimiters from
the resulting strings at the same time.

I have tried a few variants of s/... in vague proximity to the split
operator but no sucess so far.

What I am trying to do is...

($v1, $v2, $v3) = (split(/,/$rec) =~ s/"//g) ... or something like this
which actually works :-)

I have RTFM'd but it obviously hasn't sunk in :-(   Can anyone help?
--
Jerry Cashman
Systems Development Manager
Encyclopaedia Britannica (Australia) 




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

Date: Wed, 7 May 1997 23:21:48 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Newbie question alert! Strip characters during split.
Message-Id: <sckrk5.qp.ln@localhost>

Jerry Cashman (jcashman@eba.com.au) wrote:
: Hi all,

: I am reading a bunch of records from a comma-seperated, quote delimited
                                               ^^^^^^^^^

Back in the good old days (up until about two weeks ago) someone
would probably have commented on that particular misspelling...


: text file and want to assign them to a group of named var's for further
: processing.

One or two example records would have been nice...


: I am currently assigning the var's using SPLIT on the comma which seperates
: the fields, but would like an easy way to strip the quote delimiters from
: the resulting strings at the same time.

: I have tried a few variants of s/... in vague proximity to the split
: operator but no sucess so far.

: What I am trying to do is...

: ($v1, $v2, $v3) = (split(/,/$rec) =~ s/"//g) ... or something like this
: which actually works :-)
  ^^^^^^^^^^^^^^^^^^^^

Or even just actually compiles ;-)  

(you're missing a comma in the split() call)


: I have RTFM'd but it obviously hasn't sunk in :-(   Can anyone help?



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

$_='"Jerry Cashman", "at", "AUSNet Services"'; # is this what a
                                               # comma-separated,
                                               # quote delimited field
                                               # looks like?
(undef, @parts) = (split /^"|"$|",\s*"/);
#^^^^^ lose that pesky initial null field

foreach (@parts) {print "$_\n"}
------------------



--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 8 May 1997 02:19:45 GMT
From: brdavis@orion.ac.hmc.edu (Brooks Davis)
Subject: Re: No dbm on this machine
Message-Id: <5krd81$oi$2@cinenews.claremont.edu>

Brian Diggle (brian.diggle@bl.uk) wrote:
: I've intalled perl 5.003 on my DEC Alpha, running DEC OSF 4. I'm 
: getting the error 'No dbm on this machine' when using dbmopen. Is
: there an option I need to specify on installation of PERL to get this
: working? If not, any ideas?

Have you tried adding the line:

use AnyDBM_File;

This will cause the dbmopen call to try several DBM implementations
including SDBM which is the really wimpy DBM clone that ships with Perl.

-- Brooks


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

Date: 7 May 1997 18:52:28 GMT
From: northrup@chem.ufl.edu (Dylan Northrup)
Subject: Re: Notice to antispammers - is there a list of spammers to pluginto procmail?
Message-Id: <5kqj1c$339@nostromo.clas.ufl.edu>

An infinite number of monkeys in the guise of Dave Regan <regan@ao.com> wrote:
=:In article <336f1c67.116909796@news.diac.com>,
=:	sitaram@diac.com (Sitaram Chamarty) writes:
=:
=:>My question, for Nathan or Tom or anyone else who knows, is: is there
=:>a frequently updated list of spammers that I can periodically plug
=:>into my procmail recipe as an include file?  (I do use procmail, but I
=:>got tired of constantly adding addresses to it, hence this question).
=:>
=:>If there was, I'd delete the no-spam junk in my email address.  I
=:>don't mind having to download something once a week (using LWP) (and
=:>that takes care of making this post on-topic for c.l.p.m :-).
=:
=:There is a list that AOL maintains.  It isn't necessarily in a format
=:for directly plugging into procmail.  See:
=:	http://www.idot.aol.com/preferredmail/
=:
=:With a short Perl program I'm sure you can remove the HTML wrapping
=:and get straight to the addresses.  From there it should be easy
=:to add the wrapping to make it fit into procmail.  Then you can fire
=:the whole mess off with cron and not have to worry about it anymore
=:(except for when AOL changes the format of the file. :))
=:
=:Once done, you can advertise your hack in all of the appropriate places.


Or, post it to clpm.

Here you go.  antispam.pl.  Enjoy

--BEGIN INCLUDED FILE--

#!/usr/local/bin/perl -w
#
# Program to snag AOL's list of spammers and make a procmail recipe to
# delete any mail coming from the listed sites.
#
# Written by Dylan Northrup <northrup@pobox.com>.  Idea from Dave Regan 
# <regan@ao.com>
#
#
# LWP needed to get file from AOL's site.

use LWP::Simple;

#
# Initialise useful variables
#
$spamlist = "http://www.idot.aol.com/preferredmail/";
$home = $ENV{HOME};

#
# Get the file from AOL
#
$file = get $spamlist;

if(defined $file){
    print STDERR "Got file from AOL\n";
} else {
    print STDERR "Cannot get file from site.  Try again later\n";
    exit 0;
}

#
# Get the file into lines.
#
@lines = split /\n/, $file;

#foreach $address (@addresses){
#    print $address . "\n";
#}

open(PROCRCIN, "$home/.procmailrc") || die "Cannot open $home/.procmailrc: $!\n";

while(<PROCRCIN>){
    push @procin, $_;
}

# Make a backup of the .procmailrc file.  There's gotta be a better way for 
# this as well.
#
# Backup stuff here by merlyn@stonehenge.com

{ local ($^I, @ARGV) = (".bak", $ENV{HOME}."/.procmailrc"); while(<>){ print; } } 


# Now, make sure we don't just keep appending the same old shit to the 
# .procmailrc over and over again.

open(PROCRCOUT, "> $home/.procmailrc") || die "Cannot open $home/.procmailrc for writing: $!\n";

$faucet = 1;

foreach $line (@procin){
    if($line =~ /Rest of lines inserted by Dylan\'s antispam\.pl/){
	$faucet = 0;
    }
    if($faucet == 1){
	print PROCRCOUT $line;
    }
}

#
# Ok, now we've got the original procmailrc without any additions that might
# have been made earlier by my program.
#
# Let's add the necessary recipes.

print PROCRCOUT "# Rest of lines inserted by Dylan's antispam.pl\n";
print PROCRCOUT "# Do not edit beyond this point.  Any changes will be deleted\n";
print PROCRCOUT "# the next time antispam.pl is run\n\n";

print PROCRCOUT ":0:\n";

$faucet = 0;

# When we print out, we edit out the crap from the AOL derived file such
# as all the stuff before and after the list of addresses.
#
# If AOL changes their file format THIS WILL BREAK

foreach $line (@lines){
    if($faucet == 1 && $line =~ /^<\/MULTICOL>/i){
	$faucet = 0;
    }
    if($faucet == 1){
	print PROCRCOUT "* 1^1 ^From.*$line\n";
    }
    if($faucet == 0 && $line =~/^<MULTICOL/i){
	$faucet = 1;
    }
}

print PROCRCOUT "/dev/null\n\n\n";

close PROCRCOUT;




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

Date: 8 May 1997 01:58:52 GMT
From: "William Stranathan" <stranw@gte.net>
Subject: NT, NetWare, Perl, CGI -- all in one!
Message-Id: <5krc0s$rka$1@news7.gte.net>

Okay, this is going to be a mouthful.  I'm sure that under WinNT it can't
be done, but I'll go ahead and see.

Config...
WinNT 4.0
IIS 3.0 (I think?)
Perl for Win32 5.003 (the ActiveWare one with PerlIS)

# Sample script...
# Print out the basic HTML header garbage, and then open a directory
# and read a dir listing, printing to STDOUT.
# Note:  R: is mapped to a Novell NetWare 3.12 file server!

print <<EOHTML;
HTTP/1.0 200 OK
Content-Type: text/html
<HTML>
<HEAD>
<TITLE>This is a test!</TITLE>
</HEAD>
<BODY>
<H1>Now checking</H1>
EOHTML

opendir (XMTDIR, "R:\\STAGE\\LOGS") || die "Couldn't open directory!";
while ($direntry = <XMTDIR>) {
	print "<H3>$direntry</H3><BR>\n";
}

print <<EOEND;
</BODY>
</HTML>
EOEND
# End

So what's the big deal?  Well, this looks like a piece of cake.  In Win95,
with Omni HTTPD, it's fantastic.  But in WinNT - I'm sure this is the
problem I'm having.  IIS runs as IUSR_%COMPUTERNAME%, right?  Well, if I
log in as IUSR_%COMPUTERNAME%, and map that R: drive, and run the script
from a DOS box, no problems.  But since IIS only runs AS a user, not really
logged in, I don't think he can really see that directory.

What I'm getting, BTW is that the first part of the script runs fine
(duh!), but once he tries that readdir, it just stops altogether.  I don't
know if he continues to try to make a connection to that drive, or what.

So, is there a Win32 module that might let me work around this somehow? 
The script only needs to be able to read from that fileserver.  Would a
system() to NET USE be in order?  Should I try to specify the UNC name, as
opposed to a drive letter?  This is kinda' a big deal.  Our department is
only allocating the dough for one web server, and other guys in my
department need to be able to do OLEISAPI garbage, IDC's, all the typical
Microsoft stuff, so a Win95 box logged in all the time is out of the
question.  I think staying logged into the WinNT box full time would also
make Information Security have a fit.

I appreciate any help!

Will Stranathan
stranw@gte.net


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

Date: Thu, 08 May 1997 03:11:14 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: Re: PERL cross reference generator
Message-Id: <5krf5c$d7j$4@news3.microserve.net>

John Call <johnc@interactive.ibm.com> wrote:

>I need a cross reference generator for PERL. Anybody know where I can
>get one?

I am developing one.  Follow instructions in signature - user perlmisc
password.  Will be looking for beta site next month.
(Is this a comercial request from IBM?)

>Thanks in advance,

>John

-------  signature  ----------

Check out the Perl site!

http://www.microserve.net/~soccer/

use password perlmisc

Geat tool for Developers>



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

Date: 8 May 1997 02:11:24 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Split simple ?
Message-Id: <5krcoc$dmk@pirate.shu.edu>

Hello -

soccer@microserve.net (Geoffrey Hebert) writes:

>Code works when there is more than one file in directory.  Does not
>work with one.  

>The Camel 5 book says (page 220)  "If the PATTERN doesnt match at
>all, split returns the original string as a single substring.

>Here is the code:
>print "59 if $cur_dir ne $a_dir\n";
>   if ($cur_dir ne $a_dir) {
>       print "61 do $cur_dir ne $a_dir p-subject is $p_subject\n";
>       $all_files = `ls $p_subject\/alpha\/$a_dir`;
>       print "all files is $all_files\n";
>       $all_files=~s/.//g;  # remove dir . and ..

I don't think you want to remove every character that matches /./ :-)

Then again, if it actually worked for dirs with more than one
file, then there must be some other (different?) problem.  But 
I can't duplicate it.

David Black
dblack@icarus.shu.edu


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

Date: 8 May 1997 04:06:40 GMT
From: sdm@red.seas.upenn.edu (sdm)
Subject: Re: Split simple ?
Message-Id: <5krjgg$etm@netnews.upenn.edu>

Geoffrey Hebert (soccer@microserve.net) wrote:
: Code works when there is more than one file in directory.  Does not
: work with one.  

Take a look at the Dirhandle module. It works like a charm to read in
directory contents into an array. I'm pretty sure its in the standard
perl5.00x distribution, so look through the manual! ;)


 ..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..-..- 
steve.m.
Unix Pronounciation Guide       http://st2184.tc.tufts.edu./
Research Associate              Penn netnews junkie             \ /
GTELabs                         Tufts undergraduate             [o]
superpages project              engineering psychology dept.     |
http://superpages.gte.net       "That drone from sector 7g"     _|_


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

Date: Wed, 07 May 1997 20:00:15 -0700
From: jonnie walker <walkerjl@swbell.net>
Subject: standards
Message-Id: <337141BF.7C1F@swbell.net>

Does anyone know of a source for programming standards in Perl?

Jonnie
walkerJL@swbell.net


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

Date: 7 May 1997 20:45:50 -0700
From: brannon@bufo.usc.edu (Terrence M. Brannon)
Subject: Suggestion
Message-Id: <ysizd8r2hbir.fsf@bufo.usc.edu>


File::Find should take an option to sort the files within individual
directories. 

-- 
o============o Sending  unsolicited commercial e-mail (UCE) to this address
 Legal Notice  is indication of your consent to pay me $120/hour for 1 hour
o============o minimum for professional proofreading & technical assessment.
terrence brannon * brannon@rana.usc.edu * http://rana.usc.edu:8376/~brannon


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

Date: Wed, 07 May 1997 23:38:16 -0500
From: Dale Counts <dcounts@preferred.com>
Subject: undesired spaces
Message-Id: <33714AA7.451A@preferred.com>

In the following, I am attempting to add a new user at
the end(next to last) of the file, replacing </LIMIT>
with the new line and adding a new </LIMIT> at the end
It does this as expected..
PROBLEM... each time through a SPACE(xx20) is placed at
the beginning of the second ($lines[1]) through the last
element of @lines....

Help please...

Thanks

Dale

___SNIP___
open(FILE,"<.htaccess");
             @lines = <FILE>;
             close FILE;
            $size = @lines;


$lines[$size-1] = "require user test";  ##add username
$lines[$size] = "</LIMIT>";

open(FILE,">.htaccess");
   print FILE "@lines";
   close FILE;


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

Date: Wed, 7 May 1997 23:46:57 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: undesired spaces
Message-Id: <1slrk5.hu.ln@localhost>

Dale Counts (dcounts@preferred.com) wrote:
: In the following, I am attempting to add a new user at
: the end(next to last) of the file, replacing </LIMIT>
: with the new line and adding a new </LIMIT> at the end
: It does this as expected..
: PROBLEM... each time through a SPACE(xx20) is placed at
: the beginning of the second ($lines[1]) through the last
: element of @lines....

: Help please...

: Thanks

: Dale

: ___SNIP___
: open(FILE,"<.htaccess");
:              @lines = <FILE>;
:              close FILE;
:             $size = @lines;


: $lines[$size-1] = "require user test";  ##add username
: $lines[$size] = "</LIMIT>";

: open(FILE,">.htaccess");
:    print FILE "@lines";
                ^      ^
                ^      ^

Lose the unnecessary double quotes there, and all will be well...

:    close FILE;


from the perlvar man page:

--------------------------
=item $LIST_SEPARATOR

=item $"

This is like "C<$,>" except that it applies to array values interpolated
into a double-quoted string (or similar interpreted string).  Default
is a space.  (Mnemonic: obvious, I think.)
--------------------------


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 8 May 1997 02:03:55 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: uuencode?
Message-Id: <5krcab$mu@fridge-nf0.shore.net>

silver@silverbergcom.com wrote:
: Anyone know how I can uuencode a variable & then print it to a file? I
: am trying to write an HTACCESS (HTTPD) web-based interface script that
: will edit the passwords w/o having to go into the unix shell.

I don't think you're looking for uuencode; I think you're looking for
crypt().

--
Nathan V. Patwardhan
nvp@shore.net



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

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

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