[11457] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5057 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 4 18:07:34 1999

Date: Thu, 4 Mar 99 15:00:17 -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           Thu, 4 Mar 1999     Volume: 8 Number: 5057

Today's topics:
        <STDIN> Question <upsetter@ziplink.net>
        CANT load POSIX for ceil function <"paskd;jf"@hasdf.com>
        Cross Platform DBMs <mcaleer@jlab.org>
        FAQ 1.1: What is Perl?   <perlfaq-suggestions@perl.com>
    Re: FAQ 1.1: What is Perl? <uri@ibnets.com>
        gcc, perl, and IRIX 6.5 <richardr@ldr.com>
    Re: Getting rid of ^M (Robert Saunders)
    Re: Getting rid of ^M <bwebb@fred.net>
    Re: Getting rid of ^M <jglascoe@giss.nasa.gov>
        grep oddity - looking for explaination <sandym@landolittlepeople.com>
    Re: grep oddity - looking for explaination <sandym@landolittlepeople.com>
        mSQL and Perl: Parsing SELECT data <saij@tampabay.rr.com>
    Re: Perl - deleting files that are 2 days old (Larry Rosler)
    Re: perl script records empty fields (Tad McClellan)
    Re: procmail-ish mail handler in perl? <cassell@mail.cor.epa.gov>
    Re: Regexp: split on ; but not on \; (Tad McClellan)
    Re: scripting image conversions? (Larry Rosler)
    Re: scripting image conversions? <elaine@cts.wustl.edu>
    Re: Securing files in a password protected area <aidan.curran@agilesoft.com>
    Re: Securing files in a password protected area <aidan.curran@agilesoft.com>
    Re: y2k and 4-digit dates (was Re: foreach and while) <staffan@ngb.se>
    Re: y2k and 4-digit dates (was Re: foreach and while) <staffan@ngb.se>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 04 Mar 1999 22:08:58 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: <STDIN> Question
Message-Id: <_vDD2.147$I51.15386@news.shore.net>

Greetings;

I have what I suspect is a simple question, but I'm not sure whether I'm
running up against a limitation of the shell, or I've just missed the
explanation I seek in the docs (I've been looking, believe me!).

I have a program that, in a certain situation, reads a file from STDIN (in
other words, it's called as 'myscript < myfile').

Is there a way, once STDIN has been read and stored in an array, to
"reset" STDIN so I can interact with the user? (a la 'chomp ($response =
<STDIN>);'). 

TIA,

--Art


-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Thu, 04 Mar 1999 14:47:04 -0700
From: "Paul M. Neth" <"paskd;jf"@hasdf.com>
Subject: CANT load POSIX for ceil function
Message-Id: <36DEFF58.9B6E34CF@hasdf.com>

I need to call the CEIL function in the posix package but it doesnt
work.

The perl 5.004_02 win32 binary distribution compiled with borland c.
"Not activision".

I copied the posix.pm and autosplit.ix to the @inc paths but it still
doesnt seem to work. First I got unable to load posix.pm but here is the
lastest error message.

Can't locate auto/POSIX/autosplit.ix in @INC (@INC contains:
D:\perl5\lib\site D
:\perl5\lib c:\perl\lib c:\perl\lib\site c:\perl\lib\site .) at
D:\perl5\lib/Aut
oLoader.pm line 84.
 at D:\perl5\lib\site/POSIX.pm line 6
Can't find loadable object for module POSIX in @INC (D:\perl5\lib\site
D:\perl5\
lib c:\perl\lib c:\perl\lib\site c:\perl\lib\site .) at compvisi.pl line
7
BEGIN failed--compilation aborted at compvisi.pl line 7.

What do I need to do to get the posix modules loaded?

Thanks in advance.
Paul



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

Date: Thu, 04 Mar 1999 16:57:33 -0500
From: Simeon McAleer <mcaleer@jlab.org>
Subject: Cross Platform DBMs
Message-Id: <36DF01CD.FA142789@jlab.org>

I am trying to use a internal PERL DBM database to record the output of
some programs I am running. On Sun machines perl database files are
created in pairs with the file extensions .dir and .pag. On Linux there
is only one file created with a .db extension. The files created on one
platform can not be accessed by PERL on the other platform. Does any one
know how to get around this problem? Thanks in advance.



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

Date: 4 Mar 1999 15:39:41 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 1.1: What is Perl?  
Message-Id: <36df0bad@csnews>

(This excerpt from perlfaq1 - General Questions About Perl 
    ($Revision: 1.21 $, $Date: 1999/01/26 09:55:05 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq1.html
if your negligent system adminstrator has been remiss in his duties.)

  What is Perl?

    Perl is a high-level programming language with an eclectic
    heritage written by Larry Wall and a cast of thousands. It
    derives from the ubiquitous C programming language and to a
    lesser extent from sed, awk, the Unix shell, and at least a dozen
    other tools and languages. Perl's process, file, and text
    manipulation facilities make it particularly well-suited for
    tasks involving quick prototyping, system utilities, software
    tools, system management tasks, database access, graphical
    programming, networking, and world wide web programming. These
    strengths make it especially popular with system administrators
    and CGI script authors, but mathematicians, geneticists,
    journalists, and even managers also use Perl. Maybe you should,
    too.

-- 
The only way to get rid of a temptation is to yield to it.
                -- Oscar Wilde


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

Date: 04 Mar 1999 17:38:19 -0500
From: Uri Guttman <uri@ibnets.com>
To: perlfaq-suggestions@perl.com (Tom and Gnat)
Subject: Re: FAQ 1.1: What is Perl?
Message-Id: <39yalchodg.fsf@ibnets.com>


tom,

this faq entry was line wrapped at about 105 chars. please fix the faq
poster to use the more common 72-76 widths of usenet. also since the
body is indented by 5 chars, count that too.

<quote>
    Perl is a high-level programming language with an eclectic heritage written by Larry Wall and a cast
    of thousands. It derives from the ubiquitous C programming language and to a lesser extent from sed,
    awk, the Unix shell, and at least a dozen other tools and languages. Perl's process, file, and text
</quote>


it is good to seem them starting up again. if they come out at the
current pace of a few a day, it won't feel like it is flooding the group.


thanx,

uri


-- 
Uri Guttman                             Hacking Perl for Ironbridge Networks
uri@sysarch.com				uri@ironbridgenetworks.com	


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

Date: Thu, 04 Mar 1999 14:56:27 -0800
From: Richard Robinson <richardr@ldr.com>
Subject: gcc, perl, and IRIX 6.5
Message-Id: <36DF0F91.F384BCCE@ldr.com>

I'm running into compiler problems on a new IRIX 6.5 installation.

Background: First I wanted to compile mysql. But that kept giving me
errors. So I thought I'd skip it for now, and go on. Then I installed
Apache 1.3.4, with no problems (Apache 1.3.3 was installed, but I didn't
have its source, and wanted to install mod_perl, etc). I went to install
mod_perl, but this required that PERL be compiled with same compiler as
Apache -- my Perl was compiled with cc, and Apache was compiled with
gcc. So I got perl500502 and began to configure.

My configure of perl gave me following warnings in many diff places:

     Checking for GNU C Library:
     ld32: Warning 84: /usr/lib32/libdb.so is not used for
     resolving any symbol.
     ld32: Warning 84: /usr/lib32/libm.so is not used for resolving
     any symbol.

Configure went through to the end. But when I tried to make, make gave
me an error (many errors of same time but diff line number, till it make
gave up):

       Use of unitialized value at config.pm line ...
        config.pm: tmp not valid at config.pm line 403
         *** Error Code 2 (bu21)

Where do I begin to solve this compilation issue? I didn't install the
IRIX 6.5 OS, but the person that did said he installed only the bare
minimum that I would need.

IRIX details (from hinv):
CPU: MIPS R4400 Processor Chipd Revision: 6.0
200 MHZ IP22 Procession
96 Mbytes

GCC details (from gcc -v):
Reading specs from
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.8.1/specs
gcc version 2.8.1

Any suggestions are welcome as to how I might begin to solve this
issue(s)

--
Richard Robinson
Web Administrator
Litho Development & Research
richardr@ldr.com
503-255-5800 x172




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

Date: Thu, 04 Mar 1999 22:05:51 GMT
From: robert@iminet.com (Robert Saunders)
Subject: Re: Getting rid of ^M
Message-Id: <2FBF67C649F82922.E7EE99BF8A546ED4.7533C38D6CB95482@library-proxy.airnews.net>

Ok... I found it.. I knew it was to simple..

$data_line =~ s/\s+$//ig;

did the trick.. sorry about that I had been looking for awhile.. then
wrote the message and turned a few more pages in the cookbook and
found it.. 





On Thu, 04 Mar 1999 21:55:08 GMT, robert@iminet.com (Robert Saunders)
wrote:

>
>I am sure this is very simple.. but I have a data files that gets
>created and I open it up and want to take out the ^M at the end of
>several lines.. 
>
>I have tried the simple 
>
>$data_line =~ s/\^M//ig;
>
>With no luck.. it doesnt seem to want to remove it.. I have been
>looking the perl books I have but so far have not ran across the
>symbol.. 
>
>
>Robert Saunders
>robert@iminet.com
>



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

Date: Thu, 4 Mar 1999 17:15:45 -0500
From: "Robert E Webb" <bwebb@fred.net>
Subject: Re: Getting rid of ^M
Message-Id: <0CDD2.171$F4.223868@news.abs.net>

This should work:

#!/usr/bin/perl -p0777

s/\015$//;

Bob/


Robert Saunders wrote in message
<93FC37484AE94431.AF00EC6CCB0B644D.3399BC3470455A35@library-proxy.airnews.ne
t>...
>
>I am sure this is very simple.. but I have a data files that gets
>created and I open it up and want to take out the ^M at the end of
>several lines..
>
>I have tried the simple
>
>$data_line =~ s/\^M//ig;
>
>With no luck.. it doesnt seem to want to remove it.. I have been
>looking the perl books I have but so far have not ran across the
>symbol..
>
>
>Robert Saunders
>robert@iminet.com
>




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

Date: Thu, 04 Mar 1999 17:21:43 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Robert Saunders <robert@iminet.com>
Subject: Re: Getting rid of ^M
Message-Id: <36DF0777.6F41E07B@giss.nasa.gov>

Robert Saunders wrote:
> 
> I am sure this is very simple.. but I have a data files that gets
> created and I open it up and want to take out the ^M at the end of
> several lines..
> 
> I have tried the simple
> 
> $data_line =~ s/\^M//ig;

perl -ne 's/\cM//g; print' < infile > outfile

of course, if you're abso-smurf'ly certain that
<ctrl-M> only occurrs at the end of the lines,
try this:

do { s/\cM$//; print OUT; } while (<IN>);

Or perhaps:

foreach (<IN>) { chop; print OUT; }

--  
"What shall we do now Papa Smurf?"
  --some smurf or other

"The same thing we do every night, Pinky:
 try to take over the world!"
  --Brain


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

Date: Thu, 04 Mar 1999 15:30:54 -0700
From: Sandy Maple <sandym@landolittlepeople.com>
Subject: grep oddity - looking for explaination
Message-Id: <36DF099E.612560FE@landolittlepeople.com>

Greetings,

Executive Summary:

The following line of code produces a different result when typed in
from the command line of the debugger than when it is executed with a n,
next, command.  Why?

$exists=grep(?$dir?i, @uniqueDirs);

When stepping through the debugger, $exists is set to 0 (which is not
what I expected, but never mind that), however, when the same code is
executed from the command line of the debugger, $exists is set to 1.  I
found this a bit odd; does anyone have an explanation for this behavior?

(More) Explicit Info:

Source code and debugging session follows (with line numbers).  Line 23,
in the debugging output, shows the value of $exists after stepping over
line 12 of the source code.  Line 29, of the debug output, shows the
value of $exists after typing line 12 into the command line.

##### grepbug.pl #####

 1
 2 # greg/debug bug?
 3
 4 $searchPath="d:/jdk1.2/bin;m:/sourcecode/win32;C:/Program
Files/DevStudio/SharedIDE/BIN;C:/Program
Files/DevStudio/VC/BIN;C:/Program
Files/DevStudio/VC/BIN/WINNT;d:/jdk1.2/bin;m:/sourcecode/win32;";
 5
 6 local(@dirs)=split(/;/, $searchPath);
 7 grep($_=~s/\s*$/;/, @dirs); # Replace whitespace at end of path with
';'
 8 local(@uniqueDirs, $dir, $exists);
 9 foreach $dir (@dirs)
10 {
11     print "grep for -$dir- in -@uniqueDirs-\n";
12     $exists=grep(?$dir?i, @uniqueDirs);
13     print "\$exists = $exists\n";
14     if (!$exists && "$dir" ne ";") # skip dupes and empty paths
15     {
16         push(@uniqueDirs, $dir);
17     }
18 }
19
20 $searchPath=join('',@uniqueDirs);

##### Debug output #####
1 DB<2> c
2 $exists = 0
3 grep for -C:/Program Files/DevStudio/VC/BIN/WINNT;- in -d:/jdk1.2/bin;
m:/source code/win32; C:/Program Files/DevStudio/SharedIDE/BIN;
C:/Program Files/DevStudio /VC/BIN;-
4 main::(grepbug.pl:12):      $exists=grep(?$dir?i, @uniqueDirs);
5   DB<2> c
6 $exists = 0
7 grep for -d:/jdk1.2/bin;- in -d:/jdk1.2/bin; m:/sourcecode/win32;
C:/Program Files/DevStudio/SharedIDE/BIN; C:/Program
Files/DevStudio/VC/BIN; C:/Program Files/DevStudio/VC/BIN/WINNT;-
8 main::(grepbug.pl:12):      $exists=grep(?$dir?i, @uniqueDirs);
9   DB<2> b 14
10   DB<3> c
11 $exists = 1
12 main::(grepbug.pl:14):      if (!$exists && "$dir" ne ";") # skip
dupes and empty paths
13 main::(grepbug.pl:15):      {
14   DB<3> $exists=grep(?$dir?i, @uniqueDirs);
15
16   DB<4> print "\$exists = $exists\n";
17 $exists = 1
18
19   DB<5> c
20 grep for -m:/sourcecode/win32;- in -d:/jdk1.2/bin;
m:/sourcecode/win32; C:/Program Files/DevStudio/SharedIDE/BIN;
C:/Program Files/DevStudio/VC/BIN; C:/Program
Files/DevStudio/VC/BIN/WINNT;-
21 main::(grepbug.pl:12):      $exists=grep(?$dir?i, @uniqueDirs);
22   DB<5> c
23 $exists = 0
24 main::(grepbug.pl:14):      if (!$exists && "$dir" ne ";") # skip
dupes and empty paths
25 main::(grepbug.pl:15):      {
26   DB<5> $exists=grep(?$dir?i, @uniqueDirs);
27
28   DB<6> print "\$exists = $exists\n";
29 $exists = 1
30
31   DB<7>

--
// Sandy Maple
// First Resort Software
// sandym@landolittlepeople.com
// http://www.opensource.org/halloween.html




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

Date: Thu, 04 Mar 1999 15:37:13 -0700
From: Sandy Maple <sandym@landolittlepeople.com>
Subject: Re: grep oddity - looking for explaination
Message-Id: <36DF0B19.ED39814F@landolittlepeople.com>

FYI,

In order to fix the bug I was working on, I changed line 12 in the source
code from

$exists=grep(?$dir?i, @uniqueDirs);

to

$exists=grep(/$dir/i, @uniqueDirs);

and the grep works just fine.  I didn't expect this to work because the
search string, $dir, contains the character '/' so, logically, the grep
should misinterpret the first '/' it comes to as the end of the search
string, but it doesn't.  I figure I have some reading to do...

Sandy

--
// Sandy Maple
// First Resort Software
// sandym@landolittlepeople.com
// http://www.opensource.org/halloween.html




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

Date: Thu, 04 Mar 1999 22:39:26 GMT
From: saij <saij@tampabay.rr.com>
Subject: mSQL and Perl: Parsing SELECT data
Message-Id: <36DF0E26.41BD1A7B@tampabay.rr.com>

Where is data stored after a statement like:

 my $sth = $dbh->prepare("CREATE TABLE NEWS(F_NAME CHAR(20) NOT NULL,
                                            L_NAME CHAR(20) NOT NULL,
                                            EMAIL CHAR(40) NOT NULL)");
 my $rc = $sth->execute;


How do I get the data? Where is it stored?

Please e-mail  - its an emergency!

Anon
http://www.studio703.com



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

Date: Thu, 4 Mar 1999 14:05:57 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl - deleting files that are 2 days old
Message-Id: <MPG.1148a39d576d1d969896df@nntp.hpl.hp.com>

In article <36DEE294.326BF463@giss.nasa.gov> on Thu, 04 Mar 1999 
14:44:20 -0500, Jay Glascoe <jglascoe@giss.nasa.gov> says...
 ...
> unlink foreach @file_list;

That unlinks them one at a time (and only in 5.005, at that).  And all 
system calls should be checked, no?

  unlink(@file_list) == @filelist
      or die "Couldn't unlink all of these files: @filelist. $!\n"; 

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


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

Date: Thu, 4 Mar 1999 11:03:15 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: perl script records empty fields
Message-Id: <3samb7.eml.ln@magna.metronet.com>

kristina.stoeva@cesoft.com wrote:

: I have an html form the info from which is posted to a perl script which
: among other things records the form fields to a text format file. All this
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   And you are using file locking to avoid corrupting the data?


: runnig on HP-UX 10.x or Solaris. The problem is that from time to time I get
: empty records in the text file. So I am looking for some kind of explanation?
: Any help will be much appreciated!


   You obviously have an error on line 17.



   We need a little info to give a little help.

   Are you using -w and "use strict"?

   Are you checking your server error logs for the output from same?


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 04 Mar 1999 14:17:45 -0800
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
To: Kodachrome Halpern <revjack@radix.net>
Subject: Re: procmail-ish mail handler in perl?
Message-Id: <36DF0689.D05ABF33@mail.cor.epa.gov>

Kodachrome Halpern wrote:
> 
> Elaine Ashton explains it all:
> :Lindbergh Loomis wrote:
> :> Has anyone here taken the plunge and authored their own e-mail handler
> :> application, in lieu of procmail or 3rd-party spamgards? Any success or
> :> failure stories?
> 
> :tom has some cool stuff here;
> :http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/ qmail
> :is written in Perl as is majordomo and a bunch of other doodads...so,
> :I'm sure that it has been done.
> 
> Thanks, but:
> 
> http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/msort
> 
> 404 - NOT FOUND
> 
> http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/qmail
> 
> 404 - NOT FOUND

Umm, you may have misunderstood what Elaine meant.  She didn't
mean to suggest that you would find 'msort' or 'qmail' at that URL.
She just meant that: (1) it would be a great place to start looking;
and (2) since qmail, majordomo, etc are written in Perl, that there
are likely to be such programs running about on the 'net.  Go to
the URL exactly as posted, and browse.  There are some cool tools
that I use on my Slowlaris box at work, and on my Win95/Linux box
at home. [hey, stop laughing!]

David
-- 
David L. Cassell, OAO               cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 4 Mar 1999 10:59:24 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Regexp: split on ; but not on \;
Message-Id: <skamb7.eml.ln@magna.metronet.com>

Collin Rogowski (collin@rogowski.de) wrote:

: How can I split a String at ; but not at \;


   With a resonably modern perl you can use lookbehind
   (documented in 'perlre.pod'):


      split /(?<!\\);/


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 4 Mar 1999 14:27:18 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: scripting image conversions?
Message-Id: <MPG.1148a8a347f733ff9896e0@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <RYBD2.2158$xv.16666365@WReNphoon2> on Thu, 04 Mar 1999 
12:23:21 -0800, rg3@iname.com <rg3@iname.com> says...
> I have a question regarding converting Sun raster images into .tiff
> files. Unfortunately, I need to convert a couple thousand images.
> There is a program on my Sun called Image Viewer (version 1.0 by Sun)
> which I am able to view the Sun raster images and convert it to the
> .tiff that is required for the new software my work will be switching to.
> 
> Is it possible to create a script that would do this process so I
> wouldn't need to convert each image one at a time? I have no
> experience with scripting but have a perl and awk manual to reference.

Generate a list of the names of the files to convert.

perldoc -f opendir
perldoc -f readdir

Call the system function in a loop using the same syntax you would from 
the command line, supplying it with each filename as an argument.  You 
probably want to use absolute pathnames.

perldoc perlsyn (for 'foreach')
perldoc -f system

An investment in a book called "Learning Perl" from O'Reilly and 
Associates will repay itself fast in terms of your time to learn.

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


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

Date: Thu, 04 Mar 1999 16:48:38 -0500
From: Elaine Ashton <elaine@cts.wustl.edu>
Subject: Re: scripting image conversions?
Message-Id: <36DEFFB6.1A651724@cts.wustl.edu>

rg3@iname.com wrote:
> Is it possible to create a script that would do this process so I
> wouldn't need to convert each image one at a time? I have no
> experience with scripting but have a perl and awk manual to reference.

http://www.cpan.org/modules/by-module/Image/PerlMagick-4.21.readme

:) enjoy.

e.


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

Date: Thu, 4 Mar 1999 14:40:17 -0800
From: "Aidan Curran" <aidan.curran@agilesoft.com>
Subject: Re: Securing files in a password protected area
Message-Id: <7bn2a8$17u$1@ffx2nh3.news.uu.net>

I would like to do something like what you suggested i.e. use a sctipt to
validate the cookie and then 'send' the static files, but how exactly do I
send the files?
(By the way my server is NT/IIS)

Bill Moseley wrote in message ...
>In article <36DDF6BF.30E9AC84@sympatico.ca>, dimitrio@sympatico.ca
>says...
>> Is it Unix box? Nt? What server? Apache? Fast Track?
>> Basic authentication in Apache is done through .htpasswd and .htgroup.
>> As far as this group goes, use HTTPD::UserAdmin ();
>
>I like the .htaccess method, too, but you already have your cookies.  Why
>not have a CGI script that validates the cookie send the static files,
>and put the files someplace the web server can't get to (like protected
>by .htaccess)?
>
>But, really a CGI question.
>
>> tel;cell:905.730.195x
>
>Oh, that's a scary thing to post!  Netscape asks people to fill out this
>vcard thingy and they do it?
>
>
>--
>Bill Moseley mailto:moseley@best.com




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

Date: Thu, 4 Mar 1999 14:43:03 -0800
From: "Aidan Curran" <aidan.curran@agilesoft.com>
Subject: Re: Securing files in a password protected area
Message-Id: <7bn2a9$17u$2@ffx2nh3.news.uu.net>

My server is NT/IIS

Dimitri Ostapenko wrote in message <36DDF6BF.30E9AC84@sympatico.ca>...
>Is it Unix box? Nt? What server? Apache? Fast Track?
>Basic authentication in Apache is done through .htpasswd and .htgroup.
>As far as this group goes, use HTTPD::UserAdmin ();
>
>Aidan Curran wrote:
>
>> We have an Extranet at our company where the user logs in and a cookie is
>> set for the duration of the session. All of the pages in the extranet use
a
>> script (Perl, ASP or JavaScript) to check the cookie before returning the
>> contents of the page. If the cookie is not set the script redirects the
user
>> to the login.
>>
>> But now we want to add non-web documents such as Word and PDF files to
the
>> extranet. So I am looking for a way to protect these documents so that
even
>> if someone knows the location of the document they still need to be
>> authenticated before they can gain access. Also I do not want to add any
>> additional password screens, once the user has logged in one time he
should
>> not need to log in again for the duration of that session.
>>
>> Any suggestions would be greatly appreciated,
>> Aidan Curran
>
>--
>Dimitri Ostapenko
>CAD Designer/Sys Admin
>Fantom Technologies Inc.
>
>




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

Date: Thu, 04 Mar 1999 23:41:51 +0100
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: y2k and 4-digit dates (was Re: foreach and while)
Message-Id: <36DF0C2F.31034CAF@ngb.se>

Tobias Brox wrote:
> Context is usually clear to humans, but usually never to
> computers. y2k seems nothing but a display problem to me. The problem
> is only occuring when storing dates as text. It seems rather silly to
> me, both to store a date as a text, and to store it as an ambigious
> text string.

How do you store a date unambiguously as a non-string? 1999? Well, is
that the christian, muslim or hebrew calendar? You may say context is
obvious, but I don't think it is... What I mean is that you use as an
_implicit_ context whatever seems too obvious to you to mention. In
1970, the '19' seemed to obvious to mention. Today it seems obvious that
we don't mean 11999, but one day it might not be so... (OK, that _was_
farfetched). The same goes for any data.

y2k is a problem if you think to narrowly and don't realise what you are
assuming about the context. Even for financial programs, there is
usually no problem with two digit dates, if the program was written to
handle the situation of the turn of a century, since financial
calculations rarely (if ever) need to run over a scope of more then 100
years.

(To calculate the accumulated value of a bond with 5% interest from '98'
to '05' on a yearly basis, you simply use  $x * 1.05 ** ( $y1 < $y2 ?
$y2 - $y1 : 100 + $y2 - $y1), and then you don't have to care whether
you use two-digit or four digit years.) 

I'd say that context to a computor is what the programmer tells the
computor to do with things. 

Staffan


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

Date: Thu, 04 Mar 1999 23:57:56 +0100
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: y2k and 4-digit dates (was Re: foreach and while)
Message-Id: <36DF0FF4.F1F88491@ngb.se>

Bart Lateur wrote:
> 
> Staffan Liljas wrote:
> 
> >Actually, AD1-AD9999 isn't really the overwhelming majority of all
> >cases. The Universe has existed for about 2E10 years
> 
> But how many of those count with regards to civilisation?

Context, my dear friend. If you're an astronomer, some of them do. If
you're a quant-physicist, others, if you're a geologist, some, if you're
a paleontologist, others.

I'd agree that you wouldn't need a one-year resolution for all of
them... But Considering some theories of when the first highly developed
civilizations appeared, 10E4 years isn't enough. And we have recorded
history at least some 6000 years back.

My point isn't that you should always use a gigabyte to represent a
date, to be on the safe side. Actually, for most purposes, two digits is
enough for a year, as long as you know that you're making assumptions
about context (and document this thouroughly). 

Staffan


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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