[12286] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5885 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 4 11:12:27 1999

Date: Fri, 4 Jun 99 08:00:22 -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           Fri, 4 Jun 1999     Volume: 8 Number: 5885

Today's topics:
    Re: Anyone know what is this script line meaning ?? <gellyfish@gellyfish.com>
    Re: Calling another Perl script (Greg Bacon)
        Copying any files <Alar@mtk.ut.ee>
        Dataset update/Security question <jeffm641@ibm.net>
        Executing adduser? <madvin@dds.nl>
    Re: GD, PPM, XML: Parser marlon-shakespeare@hotbot.com
    Re: GD, PPM, XML: Parser <matt-news@sergeant.org>
    Re: how to track users (w/out cookies) and write to the (brian d foy)
    Re: how to track users (w/out cookies) and write to the (Marc Bissonnette)
    Re: Installing PERL on AIX 4.1.2.0 <hal9000@fetchmail.com>
    Re: know Perl to maintain Perl (was: Re: I pass an arra (Greg Bacon)
    Re: know Perl to maintain Perl (was: Re: I pass an arra (Greg Bacon)
    Re: know Perl to maintain Perl <upsetter@ziplink.net>
    Re: Multiple line read from file ?? (Larry Rosler)
    Re: Multiple line read from file ?? <vincent_vanbiervliet@be.ibm.com>
    Re: Multiple line read from file ?? <vincent_vanbiervliet@be.ibm.com>
    Re: Multiple line read from file ?? <vincent_vanbiervliet@be.ibm.com>
    Re: Password Generator (hymie!)
    Re: Perl Objects (Randal L. Schwartz)
    Re: Problem copying file <kjl@inforonics.com>
    Re: s/a*/x/g behavior <jdf@pobox.com>
    Re: s/a*/x/g behavior <gellyfish@gellyfish.com>
    Re: s/a*/x/g behavior <dgris@moiraine.dimensional.com>
        Signals on Win32? <pkotala@logis.cz>
    Re: Socket problem <gellyfish@gellyfish.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 4 Jun 1999 14:44:57 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Anyone know what is this script line meaning ??
Message-Id: <3757d859@newsread3.dircon.co.uk>

Matt Sergeant <matt-news@sergeant.org> wrote:
> David Cassell wrote:
>> 
>> If the intention is to drop the '.' and '..' directories
>> [the current dir and the parent dir], then you'd be
>> better off writing that line as:
>> 
>> @files = grep !/^\.{1,2}$/, readdir(DIR);
> 
> Too many characters... :)
> 
> @files = grep !/^\.\.?$/, readdir(DIR);
> 

Oh no ! Matt's been posessed by the spirit of Larry R ;-}

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: 4 Jun 1999 14:20:59 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Calling another Perl script
Message-Id: <7j8ncb$nqd$3@info2.uah.edu>

In article <34P53.3$xx4.1438@vic.nntp.telstra.net>,
	"Wyzelli" <wyzelli@yahoo.com> writes:
: What is the correct (or best) way to invoke one Perl Script from another?

I don't know about the best way, but

    system "/usr/bin/perl", "/path/to/other/program", @args;

is usually sufficient for me.  You might also want to look at the
exec() operator.

Greg
-- 
I don't like people who keeps secret from their neighbors, but you should be
able to protect yourself from the government.
    -- RMS


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

Date: Fri, 4 Jun 1999 16:07:29 +0300
From: "Alar Pandis" <Alar@mtk.ut.ee>
Subject: Copying any files
Message-Id: <7j8j2v$gr6$1@kadri.ut.ee>

Hi!
I am new one in this programming area. I would like ask You to help me - I
need just copy files via Perl (5.x) from one location into another location
(no matter what is a file type; with only text-files no problem). How can I
do that?
Thanks,
Alar.





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

Date: Fri, 04 Jun 1999 09:09:25 -0400
From: Jeff Miller <jeffm641@ibm.net>
Subject: Dataset update/Security question
Message-Id: <3757D005.4B42@ibm.net>

Hello, 
 I have a Perl security question - I have a webpage that is created in
Perl by reading a data file - the page is a list of monthly specials,
and the data file contains the items for sale with their price(hopefully
makes updates eaiser, but not easy enough). What I would like to do( and
have partially done) is create a form page that is PW protected to read
the data file from above, then with the submit button, update the data
file with the new information, thus changing the specials page without
any FTP or editing. I believe that I have most of the above close to
working, but I am concerned about security - any
suggestions/thoughts/additions?? Will PW protecting the pages be enough?

Thanks for any help!! Jeff Miller       jeffm641@ibm.net


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

Date: 4 Jun 1999 14:28:58 GMT
From: Vincent Ridderikhoff <madvin@dds.nl>
Subject: Executing adduser?
Message-Id: <3757E2A6.CD80D40A@dds.nl>

Hi,

I want to execute adduser from perl, I first get the usernames and
passwords from a file (which goes just great?) and the I need to pass
them to the system() or the exec() function.but somehow this always give
back an error, I don't know why. When I try to execute is without the
variables $USER and $PASS and just pass static text (const. value) to
the system() function al goes well, as soon as I use a variable it goes
completly wrong.

Greetz Vincent...

:-))



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

Date: Fri, 04 Jun 1999 12:02:24 GMT
From: marlon-shakespeare@hotbot.com
Subject: Re: GD, PPM, XML: Parser
Message-Id: <7j8f8c$avt$1@nnrp1.deja.com>

In article <37563BB0.E76076EE@sergeant.org>,
  Matt Sergeant <matt-news@sergeant.org> wrote:
> David Cassell wrote:
> >
> > Errm, maybe not.  Before you re-install, you might go to the
> > ActiveState website and check under Packages/support.  PPM uses the
> > XML::Parser module internally, so it's possible to hose this
> > [like trying to install a new XML::Parser module from PPM
> > itself].  I think ActiveState has a doc on fixing this problem.
>
> XML::Parser is what's returning the error - it's not hosed, some XML
> file that it's trying to parse is hosed. Either all the ppd's on AS's
> repository are hosed (doubtfull) or ppm.xml on this guy's machine is
> hosed.

I may be having a related problem to this: When trying to install
GIFgraph from the command line: ppm install GIFgrapg.ppd (firewall probs
prevent using ppm) under build 509 and 517 I receive the error: "not
well formed at line 5, column 14, byte 67 at
c:/perl/site/lib/XML/Parser.pm"

Any help would be greatly appreciated.
Cheers,
Marlon


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 04 Jun 1999 15:32:46 +0100
From: Matt Sergeant <matt-news@sergeant.org>
Subject: Re: GD, PPM, XML: Parser
Message-Id: <3757E38E.6DF6B124@sergeant.org>

marlon-shakespeare@hotbot.com wrote:
> 
> I may be having a related problem to this: When trying to install
> GIFgraph from the command line: ppm install GIFgrapg.ppd (firewall probs
> prevent using ppm) under build 509 and 517 I receive the error: "not
> well formed at line 5, column 14, byte 67 at
> c:/perl/site/lib/XML/Parser.pm"

I fear you either downloaded a broken GIFgraph.ppd, or it broke
somewhere along the lines. I just downloaded it from
www.activestate.com/packages/zips and the XML file is fine (and installs
fine). Try downloading it again.

Matt.


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

Date: Fri, 04 Jun 1999 11:02:46 -0400
From: brian@pm.org (brian d foy)
Subject: Re: how to track users (w/out cookies) and write to them individually
Message-Id: <brian-ya02408000R0406991102460001@news.panix.com>

> Only cookies or using the HIDDEN tag will work
> for session tracking, unless you install clickstream
> module for Apache or something similar.

that's not right.  there are other ways to do it, but none of
them are specifically Perl.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: Fri, 04 Jun 1999 14:59:12 GMT
From: dragnet@internalysis.com (Marc Bissonnette)
Subject: Re: how to track users (w/out cookies) and write to them individually
Message-Id: <4RR53.3161$5a.5681@news20.bellglobal.com>

In article <brian-ya02408000R0406991102460001@news.panix.com>, brian@pm.org 
says...
>
>> Only cookies or using the HIDDEN tag will work
>> for session tracking, unless you install clickstream
>> module for Apache or something similar.
>
>that's not right.  there are other ways to do it, but none of
>them are specifically Perl.

Wouldn't you be able to do it if the navigation of each page were a form, 
parsed by Perl? If, upun submit for next link, the script printed out the next 
page to <STDOUT>, replacing the HIDDEN tag (as mentioned above) with a session 
ID? Probably kinda clunky, but I've used that to track users through a 
multi-form process online.

-- 
----------------------------
Marc Bissonnette
InternAlysis
Corporate Internet Research and Results!
http://www.internalysis.com



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

Date: Fri, 04 Jun 1999 15:35:32 +0200
From: hal9000 <hal9000@fetchmail.com>
Subject: Re: Installing PERL on AIX 4.1.2.0
Message-Id: <3757D623.FECBDB9E@fetchmail.com>

Jiri Banas wrote:
> 
> I want to install PERL from a source distribution on AIX 4.1.2.0.
> But when I run ./Configure it very soon exits with the message:
> Configure: Syntax error at line 141: `)' not expected.
> 

Do not know if this helps you but... I have installed Perl
on AIX 4.3 using the .bff from the Bull Shareware Archive
<http://www.bull.de/pub/>. It installs without pain from
smit.

-- 
~hal9000


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

Date: 4 Jun 1999 14:11:32 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: know Perl to maintain Perl (was: Re: I pass an array...)
Message-Id: <7j8mqk$nqd$1@info2.uah.edu>

In article <37571c88.0@usenet.fccj.cc.fl.us>,
	"Bill Jones" <bill@fccj.org> writes:
: Larry did say something about Baby Talk Perl :]

Babies talk baby talk because they're inexperienced with language.  By
the time someone reaches adolescence and has had plenty of practice and
experience with language, we stop talking to them in small words and
simple concepts.

Greg
-- 
Kyle:    You're gonna need to kick more ass than that to beat the Cowboys.
Cartman: Hey, speaking of pounding ass, here comes Stan's little homo dog.


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

Date: 4 Jun 1999 14:17:38 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: know Perl to maintain Perl (was: Re: I pass an array...)
Message-Id: <7j8n62$nqd$2@info2.uah.edu>

In article <1dsumz2.iorgs510fsvd7N@[207.60.170.185]>,
	rjk@linguist.dartmouth.edu (Ronald J Kimball) writes:
: Greg Bacon <gbacon@itsc.uah.edu> wrote:
: > Would you write software documentation in a certain way because it
: > would make maintenance easier for someone who doesn't know English?
: 
: If I were planning to distribute my software to people who don't know
: English, yes, of course I would.

How are you possibly going to write documentation in English in such a
way that it will be of any use to someone who doesn't speak (or at least
read) English?

: What is wrong with making Perl code accessible?

Perl is plenty accessible to people who know Perl.  I know of no
programming language in which it's possible to write code such that
someone who doesn't know the language could maintain.  I think Tom was
right when he said, "Down this path lies COBOL."

    ASSIGN 3 TO A
    PERFORM KICK-ME-IN-THE-HEAD

Greg
-- 
Because you can't just make shit up and expect the computer to magically
know what you mean, Retardo!
    -- mjd


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

Date: Fri, 04 Jun 1999 14:45:51 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: know Perl to maintain Perl
Message-Id: <zER53.1858$nn.563695@news.shore.net>

Eric Bohlman <ebohlman@netcom.com> wrote:
: But demanding that code be "accessible" to someone who doesn't know Perl,
: or even worse, to someone who doesn't know programming, is a nonsensical
: goal.

And one that was never espoused by anyone in this group. I indicated that
I intentionally avoided one of Perl's more obscure idioms (idia?) because
there was a very real possibility that a programmer without a whole lot of
perl experience might have to maintain my scripts some day. Seems not at
all unreasonable in the working world, but too "politically correct" for
some, apparently.

--Art

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


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

Date: Fri, 4 Jun 1999 06:58:07 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Multiple line read from file ??
Message-Id: <MPG.11c17b4ab613b53d989b6a@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <7j8f7u$87n$1@tasmania.dev.ict.nl> on Fri, 4 Jun 1999 
14:04:33 +0200, Robert Meppelink <robert.meppelink@ict.nl> says...

<SNIP of data reproduced below>

> Now I want to read the all data line's from Label_1 till Label_2, Label2
> till Label_3 etc.
> As long as no eof(). Textfile is just normal ASCII and every line ends with
> a \n.

Change the definition of a 'line' using $INPUT_RECORD_SEPARATOR, aka $/.  
I've marked the records that result.  You'll have to deal with beginning 
and ending anomalies yourself.  You might choose to use "\nLabel_" 
instead.


#!/usr/local/bin/perl -w
use strict;

{
    local $/ = 'Label_';
    while (<DATA>) {
        print "%%%%$_&&&&\n"
    }
}
__DATA__
Label_1:
    data
    data
    data
Label_2:
    data
    data
Label_3:
    data
    data
Label_1:
    data
    data
    data
Label_2:
    data
    data
Label_3:
    data
    data


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


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

Date: Fri, 4 Jun 1999 16:24:26 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: Multiple line read from file ??
Message-Id: <3757d2e2@news.uk.ibm.net>

Robert Meppelink <robert.meppelink@ict.nl> wrote in message
news:7j8f7u$87n$1@tasmania.dev.ict.nl...

<SNIPPET>

> open(hVLOG_File, "<" . $VLOG_CMD) or die "Can't open file $VLOG_CMD";
> $first_attribute  = "Label_1:";
> $second_attribute = "Label_2:";
> undef $/;

Do you know what happens when you undef $/? If not, read what $/ means, but
the consequence is that your following
sentence doesn't make a lot of sense: just reading one "line" of your file
will actually read the complete file.
In other words: <hVLOG_File> stores the complete file in $_, thus
while(<...>) will only be executed once.

> while (<hVLOG_File>){
>    while(/$first_attribute(.*?)$second_attribute/ms){
>       print "Data found is: $1\n";
>       last;
>    }
> }
>
> It read's it correctly once, but it must read several times until eof().
And
> when I remove the last; statement it never stops?

Of course not. Why should it? Your while condition doesn't change...

> Can somebody help me with this ??
>
> Thanx !
>
I'm not sure if the following code does exactly what you want, but what is
does is creating an array called data. The first element
stores the data that's not defined (i.e. if your file wouldn't start with
'Label_x:'), the others contain the data specified under their
label, thus $data[1] contains all data from all Label_1's, separated with a
'\n'.

#===begin===
# assume file is opened allready...
$label=0;
while (<hVLOG_File>) {
   chomp;
   if (/^Label/) {($label=$_)=~s/\D*//g;next}
   $data[$label].="$_\n";
}
close hVLOG_File;

# Output results to a file to check
$out='out.txt';
open OUT, ">$out";
if ($data[0]) {print OUT "Data that couldn't be matched against a
label:\n$data[0]\n";}
for $i (1 .. $#data) {
        print OUT "Label $i:\n$data[$i]\n";
}
close OUT;


#===end===

To be sure the array was correct, I used this datafile:

Label_1:
  data1.1
  data1.2
  data1.3
Label_2:
  data2.1
  data2.2
  data2.3
Label_3:
  data3.1
  data3.2
  data3.3
Label_1:
  data1.4
  data1.5
  data1.6
Label_2:
  data2.4
  data2.5
Label_3:
  data3.4
  data3.5
  data3.6

This was the output:
Label 1:
  data1.1
  data1.2
  data1.3
  data1.4
  data1.5
  data1.6

Label 2:
  data2.1
  data2.2
  data2.3
  data2.4
  data2.5

Label 3:
  data3.1
  data3.2
  data3.3
  data3.4
  data3.5
  data3.6


Hope this helps, en indien niet stuur je maar een mailtje.

Vincent




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

Date: Fri, 4 Jun 1999 16:48:36 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: Multiple line read from file ??
Message-Id: <3757d892@news.uk.ibm.net>

Maybe I understood your post wrong, but I have no idea why the output would
be interesting. This is what I got:

Larry Rosler <lr@hpl.hp.com> wrote in message
news:MPG.11c17b4ab613b53d989b6a@nntp.hpl.hp.com...
> [Posted and a courtesy copy sent.]
>
> In article <7j8f7u$87n$1@tasmania.dev.ict.nl> on Fri, 4 Jun 1999
> 14:04:33 +0200, Robert Meppelink <robert.meppelink@ict.nl> says...
>
> <SNIP of data reproduced below>
>
> > Now I want to read the all data line's from Label_1 till Label_2, Label2
> > till Label_3 etc.
> > As long as no eof(). Textfile is just normal ASCII and every line ends
with
> > a \n.
>
> Change the definition of a 'line' using $INPUT_RECORD_SEPARATOR, aka $/.
> I've marked the records that result.  You'll have to deal with beginning
> and ending anomalies yourself.  You might choose to use "\nLabel_"
> instead.
>
>
> #!/usr/local/bin/perl -w
> use strict;
>
> {
>     local $/ = 'Label_';
>     while (<DATA>) {
>         print "%%%%$_&&&&\n"
>     }
> }
> __DATA__
> Label_1:
>     data
>     data
>     data
> Label_2:
>     data
>     data
> Label_3:
>     data
>     data
> Label_1:
>     data
>     data
>     data
> Label_2:
>     data
>     data
> Label_3:
>     data
>     data
>
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Company
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com




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

Date: Fri, 4 Jun 1999 16:49:39 +0200
From: "Vincent Vanbiervliet" <vincent_vanbiervliet@be.ibm.com>
Subject: Re: Multiple line read from file ??
Message-Id: <3757d8cb@news.uk.ibm.net>


Vincent Vanbiervliet <vincent_vanbiervliet@be.ibm.com> wrote in message
news:3757d892@news.uk.ibm.net...
> Maybe I understood your post wrong, but I have no idea why the output
would
> be interesting. This is what I got:

 ... and then this message decided to get posted without waiting for my
aproval...
So here's my output:

%%%%Label_&&&&
%%%%1:
    data
    data
    data
Label_&&&&
%%%%2:
    data
    data
Label_&&&&
%%%%3:
    data
    data
Label_&&&&
%%%%1:
    data
    data
    data
Label_&&&&
%%%%2:
    data
    data
Label_&&&&
%%%%3:
    data
    data

&&&&


>
> Larry Rosler <lr@hpl.hp.com> wrote in message
> news:MPG.11c17b4ab613b53d989b6a@nntp.hpl.hp.com...
> > [Posted and a courtesy copy sent.]
> >
> > In article <7j8f7u$87n$1@tasmania.dev.ict.nl> on Fri, 4 Jun 1999
> > 14:04:33 +0200, Robert Meppelink <robert.meppelink@ict.nl> says...
> >
> > <SNIP of data reproduced below>
> >
> > > Now I want to read the all data line's from Label_1 till Label_2,
Label2
> > > till Label_3 etc.
> > > As long as no eof(). Textfile is just normal ASCII and every line ends
> with
> > > a \n.
> >
> > Change the definition of a 'line' using $INPUT_RECORD_SEPARATOR, aka $/.
> > I've marked the records that result.  You'll have to deal with beginning
> > and ending anomalies yourself.  You might choose to use "\nLabel_"
> > instead.
> >
> >
> > #!/usr/local/bin/perl -w
> > use strict;
> >
> > {
> >     local $/ = 'Label_';
> >     while (<DATA>) {
> >         print "%%%%$_&&&&\n"
> >     }
> > }
> > __DATA__
> > Label_1:
> >     data
> >     data
> >     data
> > Label_2:
> >     data
> >     data
> > Label_3:
> >     data
> >     data
> > Label_1:
> >     data
> >     data
> >     data
> > Label_2:
> >     data
> >     data
> > Label_3:
> >     data
> >     data
> >
> >
> > --
> > (Just Another Larry) Rosler
> > Hewlett-Packard Company
> > http://www.hpl.hp.com/personal/Larry_Rosler/
> > lr@hpl.hp.com
>
>




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

Date: 4 Jun 1999 14:04:57 GMT
From: hymie@lactose.smart.net (hymie!)
Subject: Re: Password Generator
Message-Id: <7j8me9$ncc$1@news.smart.net>

In our last episode, the evil Dr. Lacto had captured our hero,
  NukeEmUp@ThePentagon.com (David Cantrell), who said:
>
>vanity5trump
>morning$disc

Correct in theory, but if you're going to use crypt(), you need shorter words.
Only 8 characters are significant.

 ..hymie!         http://www.smart.net/~hymowitz         hymie@lactose.smart.net
===============================================================================


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

Date: 04 Jun 1999 07:39:46 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Perl Objects
Message-Id: <m17lpkghcd.fsf@halfdome.holdit.com>

>>>>> "Tommi" == Tommi Niemi <tniemi@paju.oulu.fi> writes:

Tommi> Thanks..I was just curious if I there's any possible to do that
Tommi> with objects (...I have already done that with threads ).

To me, that reads like "I was just curious if there was any way to do
that with variables that start with a consonant, because I've already
done it from a CGI program".

You're mixing apples and horses here.

A thread gets you multiple program counters within a program (poorly :).

An object encapsulates data, and ties it closely with the algorithms
associated with that data.  It doesn't have a program counter.

print "Just another Perl hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Fri, 4 Jun 1999 13:20:55 GMT
From: "Kurt J. Lanza" <kjl@inforonics.com>
Subject: Re: Problem copying file
Message-Id: <3757D2B7.65A0FA55@inforonics.com>

Scott Wells wrote:
> 
> I wrote a perl script on an OpenBSD machine to update a DNS zone file.
> Update goes fine, but no matter what I do, when it's called by Apache it
> won't copy back to the /var/named directory.  The script has suid
> permissions set, and is owned by named.  /var/named is owned by named,
> as well as is the file I'm tryng to put there.  The command I'm trying
> is:
> 
> system("cp /tmp/zone.file /var/named/my.zone");
> 
> Whenever I run this script from the shell prompt, it works fine (as root
> or named).  I am using Apache 1.3.6.
> 
> Please cc: to my e-mail (shadowsystems@ibm.net).
> 
Permissions, permissions, permssions. The script runs with the same
uid/gid as the Apache which starts it. On most systems the suid bit is
ignored by script interpreters because it would be a huge security hole.
Forget suid. Arrange for Apache to have write permssions into the
directory and the script it runs will have the same.


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

Date: 04 Jun 1999 09:16:53 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: james_peregrino@harvard.edu (James Peregrino)
Subject: Re: s/a*/x/g behavior
Message-Id: <m3vhd414xm.fsf@joshua.panix.com>

james_peregrino@harvard.edu (James Peregrino) writes:

> why doesn't "H" match /a*/?

In what way can the letter "H" be said to be "zero or more a's"?

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


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

Date: 4 Jun 1999 14:16:07 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: s/a*/x/g behavior
Message-Id: <3757d197@newsread3.dircon.co.uk>

James Peregrino <james_peregrino@harvard.edu> wrote:
> Hi,
>    I was explaining regular expressions to someone, and as I was
> changing expressions around and showing how the results differed, I said
> that
> 
> $_ = "Haas";
> s/a*/x/g;
> print "$_\n";
> 
> should print out "xxxx".  But instead it prints out "xHxxsx".  My
> reasoning falls apart at the beginning - why doesn't "H" match /a*/ ?
> 

It is probably easier to say why it matches what it does match.  Which
is 0 or more instances of the character 'a' - which matches the abscence
of the character in the nothingness that is at the beginning and of the 
string and the 'aa' in the middle - as neither 'H' nor 's' are zero or
more instances of 'a' these dont match.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: 04 Jun 1999 09:01:30 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: s/a*/x/g behavior
Message-Id: <m34skoxb5h.fsf@moiraine.dimensional.com>

Jonathan Feinberg <jdf@pobox.com> writes:

> james_peregrino@harvard.edu (James Peregrino) writes:
> 
> > why doesn't "H" match /a*/?
> 
> In what way can the letter "H" be said to be "zero or more a's"?

I must be confused, in what way can the letter `H' _not_
be said to be "ZERO or more a's".

dgris
-- 
Daniel Grisinger          dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: Fri, 4 Jun 1999 16:04:46 +0200
From: "Pavel Kotala" <pkotala@logis.cz>
Subject: Signals on Win32?
Message-Id: <928505255.179944@gate.logis.cz>

Signals on Win32 do not work?

I have tried this:

$SIG{INT} = sub { print "Int";$disp->DESTYROY};
$SIG{QUIT} = sub { print "Quit";$disp->DESTYROY};
$SIG{KILL} = sub { print "Kill";$disp->DESTYROY};

But CTRL-C does print nothing, ALT-F4 (closing DOS window) does not work.
Why?

Thank You

Pavel Kotala





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

Date: 4 Jun 1999 14:40:51 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Socket problem
Message-Id: <3757d763@newsread3.dircon.co.uk>

Michel Dalle <michel.dalle@usa.net> wrote:
> In article <375797d2@newsread3.dircon.co.uk>, Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>>lamj@softhome.net wrote:
> [snip]
>>If you want to play with Sockets you might want to try connecting to a port
>>which bears a simpler protocol.
> 
> Many of the low port number were specifically introduced to test socket
> programs.
> I would recommend port 7 (echo) : send something, and the server will send it 
> back.
> Also port 13 (daytime) : the server will send you the day and time, and close
> the connection.
> 

In principle yes, however on many systems these will be disable by a zealous
administrator as a potential security risk.  They certainly are on this
server.

I was thinking more in terms of a relatively common service such as HTTP.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

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

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