[11450] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5050 Volume: 8

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

Date: Wed, 3 Mar 99 23:00:16 -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           Wed, 3 Mar 1999     Volume: 8 Number: 5050

Today's topics:
    Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos (Ronald J Kimball)
    Re: -- # -*-Perl-*- in perl script <rra@stanford.edu>
    Re: -- # -*-Perl-*- in perl script <mpersico@erols.com>
    Re: breaks vs. last  (and $^W ???) (Jim Matzdorff)
    Re: breaks vs. last  (and $^W ???) <zenin@bawdycaste.org>
    Re: breaks vs. last  (and $^W ???) (Ronald J Kimball)
    Re: can I make this code better? (Larry Rosler)
        How do i get the first 100 words from a paragraph <kelby@mplx.com>
    Re: How to run Perl program as NT service? <morrowc@his.com>
    Re: Inserting a 'newline' in arrays? (Tad McClellan)
        Issuing CTL-ALT-DEL from PERL l_burchard@my-dejanews.com
        Need help with server / client perl scripts <fredrick@smacked.com>
        Perl Flatfile seach <carys@indigo.ie>
        Perl insert BLOB's (Binary Large Objs) into Oracle? (Damon K. Haley)
    Re: PerlScript locking up MS Access file <morrowc@his.com>
    Re: Regular Expressions (Ronald J Kimball)
    Re: Securing files in a password protected area <dimitrio@sympatico.ca>
    Re: Securing files in a password protected area (Bill Moseley)
        solution: confused about $/ RABM@prodigy.net
    Re: split on meta question <jdf@pobox.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 4 Mar 1999 01:34:51 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <1do47vu.1hsb3s8pi9erkN@bay1-106.quincy.ziplink.net>

Philip Newton <Philip.Newton@datenrevision.de> wrote:

> Abigail wrote:
> > 
> > Ronald J Kimball (rjk@linguist.dartmouth.edu) wrote on MMX September
> > MCMXCIII in <URL:news:1do2799.dvk4pb1as2dmmN@bay1-134.quincy.ziplink.net>:
> [...]
> 
> Abigail, where are you getting those dates from? MMX September MCMCXIII,
> indeed!

In keeping with the theme of this thread:

http://www.dejanews.com/
This issue has already been discussed to death.

:)

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


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

Date: 03 Mar 1999 19:30:30 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: -- # -*-Perl-*- in perl script
Message-Id: <yl4so2q6cp.fsf@windlord.stanford.edu>

Steve Linberg <linberg@literacy.upenn.edu> writes:

> Looks like an emacs mode line.  It doesn't have to be on the first line
> (at least for my version of emacs), so you can break it up like this:

> #!/usr/local/perl -w
> # -*- Perl -*-

If you're using a recent version of emacs, you don't need it at all.
#!/usr/local/bin/perl will be sufficient for emacs to figure out that it's
a Perl script.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Thu, 04 Mar 1999 00:06:42 -0500
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: -- # -*-Perl-*- in perl script
Message-Id: <36DE14E2.76155B2E@erols.com>



Russ Allbery wrote:
> If you're using a recent version of emacs, you don't need it at all.
> #!/usr/local/bin/perl will be sufficient for emacs to figure out that it's
> a Perl script.
> 

And, if you are running multiple versions of Perl (for testing or
adventure) and you swap the versions in and out of your path, this
shebang will work no matter where ON YOUR PATH perl is located:

#!/usr/bin/env perl

And XEmacs is smart enough to figure it's a Perl script to boot.

Wish I remember where I stole, er, found that trick.
-- 
Matthew O. Persico
http://www.erols.com/mpersico
http://www.digistar.com/bzip2


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

Date: 3 Mar 1999 18:56:07 -0800
From: syran@best.com (Jim Matzdorff)
Subject: Re: breaks vs. last  (and $^W ???)
Message-Id: <7bkso7$74e$1@shell18.ba.best.com>

Opps... I guess I should have said "break" and "last" -- i was referring
to the statements in perl (or one of them, anyhow).

I realized that break was no longer a statement, but I wasn't sure if it
ever was (which apparently, it wasn't) which is what I was asking I
guess ... just not to clearly.

But thanks for the help.

On a completely unrelated topic that hopefully someone will read...

I am getting a warning that states "Unquoted string "fname" may
clash....." -- "fname" is an argument to close (ie: close (fname)).
My first question is why is it saying this?  It's a file handle.
Although I can guess that at the time it gets to this part, it doesn't
know it's a file handle.  SO, therefore, I figure I would turn off
warnings.

I put $^W = 0 before it, but it still gets displayed.

The function is in a package, and if I put $^W = 0 at the begginning of
the package, it still doesn't do anything.

Can anyone give me a hint as to why this isn't turning off warnings?
Using that on other packages works fine (well, I've only tried it on one
other, but it did work).  Confused,

--jim
-- 
--
One tequila, two tequila, three tequila, floor.


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

Date: 04 Mar 1999 04:09:18 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: breaks vs. last  (and $^W ???)
Message-Id: <920520748.722856@thrush.omix.com>

[posted & mailed]

Jim Matzdorff <syran@best.com> wrote:
	>snip<
: I am getting a warning that states "Unquoted string "fname" may
: clash....." -- "fname" is an argument to close (ie: close (fname)). My
: first question is why is it saying this?  It's a file handle. Although I
: can guess that at the time it gets to this part, it doesn't know it's a
: file handle.

	Post your code (a small snippit that shows the problem) and we can
	help.

: SO, therefore, I figure I would turn off warnings.

	Ack!  Don't do that!

: I put $^W = 0 before it, but it still gets displayed.

	That's a runtime statement.  The "Unquoted string" message is a
	compile time warning.  You need to wrap that in a BEGIN block if you
	want it moved to compile time, but as I said above you likely don't
	want to be doing this at all.

: The function is in a package, and if I put $^W = 0 at the begginning of
: the package, it still doesn't do anything.

	Try using the much more standard convention of all uppercase names
	for file handles and you might be surprised to see your warnings go
	away on there own.

: Can anyone give me a hint as to why this isn't turning off warnings?
: Using that on other packages works fine (well, I've only tried it on one
: other, but it did work).  Confused,

	See above about runtime vs compile time.

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Thu, 4 Mar 1999 01:34:53 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: breaks vs. last  (and $^W ???)
Message-Id: <1do48ah.qak5n2yndag8N@bay1-106.quincy.ziplink.net>

Jim Matzdorff <syran@best.com> wrote:

> I am getting a warning that states "Unquoted string "fname" may
> clash....." -- "fname" is an argument to close (ie: close (fname)).
> My first question is why is it saying this?  It's a file handle.

Make your filehandles all uppercase, and you won't have this problem.

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
           perl -le 'print "Just another \u$^X hacker"'


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

Date: Wed, 3 Mar 1999 20:11:35 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: can I make this code better?
Message-Id: <MPG.1147a7caf6dee6929896d0@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <36dfd5ae.13300639@news.supernews.com> on Thu, 04 Mar 1999 
00:38:08 GMT, Alan Young <alany@2021.com >says...
 ...
> LR>  open FH, 'inventory' or die "Couldn't read 'inventory'. $!\n";
 ... 
> LR>Wouldn't an absolute path or a visible chdir be more appropriate?
> 
> What do you mean?  ./inventory as opposed to inventory?

No, I mean '/home/alany/subdir/inventory' (or whatever), or

  chdir '/home/alany/subdir/' or die "Couldn't chdir. $!\n";

 ...
> LR>  my %inventory = map { (split /\|/)[0], $_ } <FH>;
> 
> Let me make sure I understand what you've done here:
> 
> $_ is the individual lines from FH
> 
> (split /\|/) will split $_ into an anonymous array @() (Is that the
> same as @_ ?)

No.
 
> map returns ()[0] as the key and the original line as the value
> 
> >  my @items = map $inventory{(split /\|/)[0]} ||
> >      "$_ does not exist in inventory\n", @line;
 ... 
> Waitaminnit ... is the precedence here
> 
> my @items = map
> ($inventory{(split /\|/)[0]} || "$_ not exist"),
> @line
> 
> ?

Yes.  The comma operator has very low precedence.  That statement might 
be clearer if the BLOCK notation were used, instead of the EXPR 
notation.

> That has to be it (it would explain where $_ is getting its values),
> but please tell me if I'm screwing up here.
> 
> Ok... I've been working this out as I've gone along here, so if I want
> the "not exist" message to only include the first field it would be
> 
> ...
> "Item " . (split /\|/)[0] . " does not exist in inventory.\n", @line;

Yes.  But rather than do the split twice, I would write:

  my @items = map { my $item = (split /\|/)[0];
    $inventory{$item} || "Item $item does not exist in inventory.\n" }
    @line;

Now the BLOCK notation is mandatory.

> >That's about as compressed as it gets!  You'll be astounded by how much 
> >faster it is than your code for reasonable amounts of data.
> 
> What's reasonable?  This is for multiple clients, some of whom have
> upwards of several thousand items (not really, but they have separate
> item codes for colours, sizes, etc.).

Yes, that's quite reasonable.  You are reading the inventory file once 
(instead of 'multiple' times), and storing the data in an appropriately 
fast data structure (access time is almost independent of the number of 
elements).

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personl/Larry_Rosler/
lr@hpl.hp.com


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

Date: Wed, 3 Mar 1999 22:09:48 -0500
From: "Kelby Valenti" <kelby@mplx.com>
Subject: How do i get the first 100 words from a paragraph
Message-Id: <7bkte8$3fs@aaron.hamilton.edu>

I am looking for a way to get the first one hundred from a given paragraph.
However, i don't want the program to cut the sentence off in the middle.  I
want it to keep going until it hits the period for that sentence.  Please
give me any advice that you may have.

Thanks,
    Kelby




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

Date: Thu, 04 Mar 1999 00:27:46 -0500
From: Chris Morrow <morrowc@his.com>
To: Bob Fillmore <fillmore@nrn1.nrcan.gc.ca>
Subject: Re: How to run Perl program as NT service?
Message-Id: <36DE19D2.A5EF8A6C@his.com>

see srvany in the NT resource kit... 

-Chris

Bob Fillmore wrote:
> 
> I would like to run a Perl program as an NT service so that it's started
> on each reboot.
> I created a batch file that calls perl with the script file name as a
> parameter,
> then I installed the .bat file as a service using SRVANY in the NT
> Resource Kit.
> I then tried to start the service using the Services control panel, but
> it times out
> with a message saying it can't start the service.   What's the "proper"
> method
> for doing this?
> 
> Any help is much appreciated.
> 
> --
> Bob Fillmore, Technical Services Division       email:
> fillmore@NRCan.gc.ca
>   Information Management Branch,
>   Natural Resources Canada,                     Voice: (613) 992-2832
>   580 Booth St., Ottawa, Ont., Canada  K1A 0E4  FAX:   (613) 996-2953


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

Date: Wed, 3 Mar 1999 17:57:31 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Inserting a 'newline' in arrays?
Message-Id: <roekb7.4e8.ln@magna.metronet.com>

Mick (horizon@internetexpress.com.au) wrote:

: push @{ $hash{$user_name} }, join(",",$date,$elapsed_time);

: How do I force a \n after the $elapsed time but without placing a ','
: after the $elapsed_time?


   push @{ $hash{$user_name} }, join(",",$date,$elapsed_time) . "\n";


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


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

Date: Thu, 04 Mar 1999 02:46:41 GMT
From: l_burchard@my-dejanews.com
Subject: Issuing CTL-ALT-DEL from PERL
Message-Id: <7bks6e$b7a$1@nnrp1.dejanews.com>

Hello!
  Does anyone know how to issue a CTL-ALT-DEL from a PERL script from an NT
workstation (assuming you are an administrator) to another NT workstation in
order to lock it?  Or if there is another way to lock a workstation remotely,
that would be fine too.  We are having difficulty figuring out how to issue 3
characters (CTL-ALT-DEL) simultaneously.  Thanks in advance.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 04 Mar 1999 03:04:55 GMT
From: Fred <fredrick@smacked.com>
Subject: Need help with server / client perl scripts
Message-Id: <36DDF781.20E06FC7@smacked.com>

Does anyone know of any client / server perl programs that allow the
client to execute certain commands on the remote host?
Thanks




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

Date: Thu, 4 Mar 1999 03:26:33 -0000
From: "carys" <carys@indigo.ie>
Subject: Perl Flatfile seach
Message-Id: <t_mD2.302$1O5.160@news.indigo.ie>

I'm trying to search a tab delimited text file and am a bit of a novice at
this. Some of the code is below so if someone could give me a bit of advice
I would be very grateful. What its doing at the moment is this:
The item to use for searching is being taken fine from the previous HTML
page.
When the *.pl file runs it will always give me Your search has not been
found try again etc.
The problem is more than likely within the Do_Search sub.

I have written the warnings I've been getting using -w in comments within
the program.
I cant get to grips with the -d debugging procedure, and I'm having trouble
finding places to be told things like the simple syntax and uses for while()
and if() statements. The logic behind any of the seperate searches I have to
do is easy. I'm just getting bogged down in the implementation with noone in
my department who has a clue. Anyway, its late here in Dublin and I should
sleep on this.

Many thanks
frustrated newbie




#!/perl/perl.exe -w

require "html.pm"; # contains HTML_Header and _Footer

# uninitialised values on line below? thought I was initialising (or
declaring)
# an array which had the following elements.

@headings =
($Title,$Subsection,$Course,$Duration,$Full-time,$Part-time,$Entry,$Comments
);
$datafile = "DCU.txt";

$SearchString = $ENV{'QUERY_STRING'};

 # another uninitialised value here?
 ($tag,$search) = split (/=/, $SearchString);

&Do_Search;
$count=@matches;

&No_Matches if($count == 0);
&Print_Results;
exit;

sub Do_Search{
 open(DATAFILE,"$datafile");

 # says I'm reading on closed file handle
 # here though I opened it with previous line of code.

 while(<DATAFILE>){
  if(/$search/i){
   push @matches, $_;
  } # End of if.
 } # End of while.
 close(DATAFILE);
 return;
} # End of Do_Search subroutine.

sub Print_Results{
 &HTML_Header('Your Search Results');

  print<<"END_OF_TEXT";
   <FONT FACE=ARIAL SIZE=6><CENTER>Search Results</CENTER></FONT>
   <HR WIDTH=80%>
   <CENTER>
   <TABLE BORDER=1 CELLSPACING=0>
    <TR>
     <TD><FONT FACE=ARIAL SIZE=2><B><CENTER>Title</CENTER></B></TD>
     <TD><FONT FACE=ARIAL SIZE=2><B><CENTER>Subjection</CENTER></B></TD>
     <TD><FONT FACE=ARIAL SIZE=2><B><CENTER>Entry
Requirements</CENTER></B></TD>
    </TR>
END_OF_TEXT

  foreach $match (@matches){
    @headings = split(/\t/, $match);

 print<<FOUND_TEXT;
  <TR>
     <TD><FONT FACE=ARIAL SIZE=2><CENTER>$Title</CENTER></TD>
     <TD><FONT FACE=ARIAL SIZE=2><CENTER>$Subjection</CENTER></TD>
     <TD><FONT FACE=ARIAL SIZE=2><CENTER>$Entry</CENTER></TD>
    </TR>
FOUND_TEXT

  } # End of foreach.

  print<<END_OF_TEXT;
   </TABLE>
   </CENTER>
END_OF_TEXT
 &HTML_Footer;

 return;
} # End of Print_Results subroutine.

sub No_Matches{
 &HTML_Header('Your Search Results');
 print<<REST;
        <h1>Sorry, there were no matches for $search.</h1>
        <h3>Please use your BACK button and try again.</h3>
REST
 &HTML_Footer;
 exit;
} # End of No_Matches subroutine.




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

Date: 4 Mar 1999 03:49:48 GMT
From: dhaley@infobeat.com (Damon K. Haley)
Subject: Perl insert BLOB's (Binary Large Objs) into Oracle?
Message-Id: <slrn7ds0mp.3al.dhaley@dhcp194.corp.merc.com>

Hello,

I need to store attatchments for an e-mail program into
our Oracle 7.x database.

We are using the DBH module for most of out Perl to Oracle
communication and it works great, except that I heard a programmer
say that Perl wouldn't transfer files over 250k? into an Oracle
Long datatype.

Has anyone heard of this?

I'm trying to insert a 2MB file into a Long Raw datatype.

The programmer said he solved the problem by breaking the file
up into 250k? section and re-assembling it later.

I'd like to avoid this problem, but I wanted to verify it
first.

Thanks in advance

Damon Haley


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

Date: Thu, 04 Mar 1999 00:24:08 -0500
From: Chris Morrow <morrowc@his.com>
To: brian_smith@sonat.com
Subject: Re: PerlScript locking up MS Access file
Message-Id: <36DE18F8.C1D09059@his.com>

Can I suggest you get a real database?

Access is NOT the right solution for a Web database, it's not really
good at multiple simultaneous access.

Try SQL Server? or Oracle?

(The behaviour you are describing is quite common on Windows
systems...as a whole, unfortunately)

-Chris

brian_smith@sonat.com wrote:
> 
> My PerlScript/ASP pages seem to lock onto my MS Access file with the very
> first page access, and I cannot replace/edit the file without killing the
> process where the PerlScript dll has a lock on it, sometime even have to
> restart web service.
> 
> I make sure to destroy my connection and resultset objects.
> 
> Please help.
> brian
> 
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own


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

Date: Thu, 4 Mar 1999 01:34:54 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Regular Expressions
Message-Id: <1do49ok.yeddvbdognghN@bay1-106.quincy.ziplink.net>

Mario Schomburg <mario.schomburg@iname.com> wrote:

> Tony Curtis wrote:
> > 
> > Re: Regular Expressions, Mario
> > <mario.schomburg@iname.com> said:
> > Mario> Hi, does anyone know a possibility to
> > Mario> generate a regular expression for a couple of
> > Mario> strings?  I would like to provide these
> > Mario> strings to a function which will return a
> > Mario> regular expression matching all these
> > Mario> strings.
> > 
> > sub matchall { '.*'; }
> 
> ;-) I knew about this ...

> [...]

> The generated regexp does not need to be the best regexp for the
> strings (is it possible to find it in a program?), but should (as I
> said above) be far more complicated than (.*).

Without knowing _what you intend to use this regex for_, /.*/ is as good
an answer as any other.  ;-)

Offhand, I would guess that there are some modules on CPAN that could
help you compare strings and identify matching sections.

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
perl -e'$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'


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

Date: Wed, 03 Mar 1999 21:58:07 -0500
From: Dimitri Ostapenko <dimitrio@sympatico.ca>
Subject: Re: Securing files in a password protected area
Message-Id: <36DDF6BF.30E9AC84@sympatico.ca>

This is a multi-part message in MIME format.
--------------FB9FF9963E3CCC7009AB08AC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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.


--------------FB9FF9963E3CCC7009AB08AC
Content-Type: text/x-vcard; charset=us-ascii;
 name="dimitrio.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Dimitri Ostapenko 
Content-Disposition: attachment;
 filename="dimitrio.vcf"

begin:vcard 
n:Ostapenko;Dimitri
tel;cell:905.730.1959
tel;home:905.389.3660
tel;work:905.734/7476 x 258
x-mozilla-html:TRUE
org:Fantom Technologies Inc.;Engineering
adr:;;91 Ascoli Dr.;Hamilton;ON;L9B 1Y3;Canada
version:2.1
email;internet:dimitrio@sympatico.ca
title:CAD Designer (Euclid) / Sys Admin (Irix)
fn:Dimitri Ostapenko
end:vcard

--------------FB9FF9963E3CCC7009AB08AC--



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

Date: Wed, 3 Mar 1999 21:00:19 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: Securing files in a password protected area
Message-Id: <MPG.1147b33becfea0879896cb@206.184.139.132>

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: 03 Mar 1999 22:34:58 -0500
From: RABM@prodigy.net
Subject: solution: confused about $/
Message-Id: <u4so2c4gt.fsf@prodigy.net>


Hi,

After much confusion, my own, Rick Delaney explained what was wrong about
the following:

    >> 
    >> $/="\025\010";
    >> my @msgs = ();
    >> open( RMAIL, "$rmail") || die "can't open $rmail $!\n";
    >> while ( <RMAIL> ) {

    Rick> You probably want to chomp off "\025\010" here.

    Rick>     chomp;

    >> push @msgs, {
    >> SUBJECT => /^Subject:\s*(?:Re:\s*)*(.*)/mi,
    >> NUMBER  => scalar @msgs,  # which msgno this is
    >> TEXT    => '',
    >> } if /^From/m;
    >> $msgs[-1]{TEXT} .= $_;
    >> }

 Rick> [snip]

    >> Now I get the "modification of non-creatable array." message.

 Rick> At chunk 1, right?  This is because the first "record" is empty, i.e.
 Rick> your file starts with the record terminator.  So you're trying to assign
 Rick> to $msgs[-1] in an array with no elements.

 Rick> You could throw away the first record by reading from <RMAIL> before the
 Rick> while loop but it would be better to put that assignment inside the if
 Rick> block.  Or do both.

 Rick>     if (/^From/m) {
 Rick>         push @msgs, {
 Rick>             SUBJECT => /^Subject:\s*(?:Re:\s*)*(.*)/mi,
 Rick>             NUMBER  => scalar @msgs,  # which msgno this is
 Rick>             TEXT    => '',
 Rick>         };
 Rick>         $msgs[-1]{TEXT} .= $_;
 Rick>     }
 Rick>     else { warn "Invalid header at record $.\n" }

 Rick> Hope this helps.

It certainly helped to which I send Rick my many thanks.

perl -e "{$ty=qq{thank you!!!\n} x 1000; print $ty}"


-- vjm


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

Date: 03 Mar 1999 23:02:57 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: George Collins <gcollins@mnsinc.com>
Subject: Re: split on meta question
Message-Id: <m3pv6pyk9a.fsf@joshua.panix.com>

George Collins <gcollins@mnsinc.com> writes:

> I'm trying do something like:
> 
> ($a, $b, $c)=split( "\.", "a.b.c" ) or
> ($a, $b, $c)=split( "\|", "a|b|c" )

By the time those double-quote operators get done with those
backslashes, they're gone with the interpolating wind.  Try

  @a = split '\.', "a.b.c";

or

  @b = split /\|/, "a|b|c";

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

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

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