[16616] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4028 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 15 21:05:26 2000

Date: Tue, 15 Aug 2000 18:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966387914-v9-i4028@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 15 Aug 2000     Volume: 9 Number: 4028

Today's topics:
    Re: - Free ebooks and resources - <rsk@lafvb.com>
        active perl and xitami metza@my-deja.com
    Re: Certain Items in a string <godzilla@stomp.stomp.tokyo>
    Re: Cookie refresh problem under netscape commmunicator <stumo@bigfoot.com>
    Re: crypt function <All@n.due.net>
    Re: crypt function (Brandon Metcalf)
    Re: crypt function <no@email.for.me>
        form <sami.ylonen@mediamikkeli.fi>
        From 1,000,000 To 1.000.000 Please .. <rga@io.com>
    Re: From 1,000,000 To 1.000.000 Please .. <wyzelli@yahoo.com>
    Re: Help: Strange results from Perl's umask function (Neil Kandalgaonkar)
    Re: Help: Strange results from Perl's umask function <uri@sysarch.com>
        Listing users in Win NT <s24673@sp.edu.sg>
        parse HTML to make XML <arvind_kuk@hotmail.com>
    Re: Pattern match - Extract info from a page <valued_customers@emai.com>
        perl & postgres <troyr@vicnet.net.au>
    Re: perl & postgres <troyr@vicnet.net.au>
    Re: Perl code for a newbie!! <elephant@squirrelgroup.com>
    Re: Perl code for a newbie!! <elephant@squirrelgroup.com>
        Perl Newbie trying to parse file <estancio@cyberspace.org>
    Re: Procmail vs Perl. <elijah@workspot.net>
    Re: Quiting a: while (<STDIN>) (Brandon Metcalf)
    Re: Search problems: Van Gogh site <uscphysics@hotmail.com>
        Shared Memory PERL Help me! <pacabell@my-deja.com>
        suidperl security vulnerability (Jarkko Hietaniemi)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 15 Aug 2000 16:56:23 -0500
From: Ryan Kinder <rsk@lafvb.com>
Subject: Re: - Free ebooks and resources -
Message-Id: <3999BC87.CA98508E@lafvb.com>

>
> > asking on these newsgroups is a good way to start
>
> No it isn't.  You start by trying to do the obvious and then come to the
> newsgroup when you get stuck, anything else is rude.  And posting such a
> general question to six different newsgroups is especially rude.
>
> --
> Jeff

One word: whiner.

Ryan




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

Date: Wed, 16 Aug 2000 00:09:23 GMT
From: metza@my-deja.com
Subject: active perl and xitami
Message-Id: <8ncm37$2kk$1@nnrp1.deja.com>

Is it possible to get perl (active perl) to work with the Xitami
webserver for windows?

Thanks in advance


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Tue, 15 Aug 2000 16:47:05 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Certain Items in a string
Message-Id: <3999D679.2B87FFB@stomp.stomp.tokyo>

marxjkj123 wrote:
 
> Problem: I need to select certain items within a string.

 
> for example, I have a string($iw_Workarea) and I need to select
> everything from Workarea on and put it into a variable called $test.
> Basically, omitting everything preceeding \\Workarea.

Basically omitting or completely removing? Use of "basically"
indicates it doesn't matter if everything before Workarea
is removed or not. My presumption, based on your remarks,
is you actually want all characters before Workarea removed.

 
> $iw_Workarea = "Y:\\default\\main\\Web_Logic\\Workarea\\WL_Property_WA
 
> Result would should look like, $test = "Workarea\\WL_Property_WA";



Consider cleaning up your input data. Use of backslashes
for your path address are not needed in almost all cases.
Forward slashes work fine and will reduce the number of 
hoops through which your script will have to leap.

Once you straighten out your data, these two snippets:

$string =~ s!\\!//!g;

$new_string =~ s!//!\\\\!g;

can be removed for a quicker and more efficient script.
Try changing from \ to / and see if this doesn't work
just dandy in your path address. If you remove these
two snippets without fixing your path address, your 
script will not produce what you expect. There are 
other methods of dealing with this. However, seems 
more logical to straighten up your input data before 
it ever hits your script.


For this line:

$start = index ($string, "Workarea");

your word, Workarea, can be an argument variable.

A known bug is a case of the same directory name
twice or a number of multiple instances in an 
address path, which is not very bright but, could 
be. Some systems operators are not what I consider 
Rocket Scientist material.

My presumption is you have a minimum of
twenty-five mounted hard drives or an
extraordinary amount of partitions.
Perhaps a combination of both. Y?

My expectation, in exchange for free help, is
your posting of your code you have tried so
far. I am curious to read your efforts.


Godzilla!


TEST SCRIPT:
____________


#!/usr/local/bin/perl

print "Content-Type: text/plain\n\n";

$string = "Y:\\default\\main\\Web_Logic\\Workarea\\WL_Property_WA";

$string =~ s!\\!//!g;

$start = index ($string, "Workarea");

$new_string = substr ($string, $start, ((length ($string)) - $start));

$new_string =~ s!//!\\\\!g;

print $new_string;

exit;



PRINTED RESULTS:
________________


Workarea\\WL_Property_WA


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

Date: Wed, 16 Aug 2000 00:24:28 +0100
From: "Stuart Moore" <stumo@bigfoot.com>
Subject: Re: Cookie refresh problem under netscape commmunicator
Message-Id: <8ncje0$ijg$2@supernews.com>

John Gold <gold@kr8.com> wrote in message
news:8n6sd9$5eq$1@venus.telepac.pt...
> Hi,
> not sure if this is the right list but I have a problem refreshing a
cookie
> under netscape navigator, works fine in explorer, strangely I appear to be
> recieving the cookie values from the cache and not the cookie under
> navigator, does anybody have any suggestions, or is this a known bug?
>
> thanks,
>
> John
>
> email john@kr8.com

Firstly, I'd suggest comp.infrosystems.www.authoring.cgi would be a better
place (followups set).

How are you creating the cookies? And when are they set to expire?
Is there any chance you've got a proxy or the Netscape cache interfering? I
haven't had any problems with cookies and Netscape myself. You might find
JavaScript is a good way to check on the state of the cookie -
alert(document.cookie).

Any chance you can give a URL so others can try?

Stuart






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

Date: Tue, 15 Aug 2000 22:42:14 GMT
From: "Allan M. Due" <All@n.due.net>
Subject: Re: crypt function
Message-Id: <aHjm5.374$CW2.1494@news1.rdc1.ct.home.com>

"Jonas Nilsson" <jonas.nilsson@mbox326.swipnet.se> wrote in message
news:3999d081.10891009@news1.tninet.se...
: I have a text file with username:password, the password is crypt. I
: want to have an: "e-mail me my password because I forgot it"
: -function. When I do that I only get the crypted version. How do I
: decrypt the password.

you can't, the crypt function is one way encryption.

--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--Random Quote--
echo 'Congratulations.  You aren't running Eunice.'
   Larry Wall in Configure from the perl distribution




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

Date: 15 Aug 2000 22:30:18 GMT
From: bmetcalf@nortelnetworks.com (Brandon Metcalf)
Subject: Re: crypt function
Message-Id: <8ncg9q$pn7$1@bcrkh13.ca.nortel.com>

jonas.nilsson@mbox326.swipnet.se writes:

 > I have a text file with username:password, the password is crypt. I
 > want to have an: "e-mail me my password because I forgot it"
 > -function. When I do that I only get the crypted version. How do I
 > decrypt the password.

You can't.  The algorithm is one way.

Brandon


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

Date: Wed, 16 Aug 2000 00:35:30 GMT
From: "Dave @ kexis" <no@email.for.me>
Subject: Re: crypt function
Message-Id: <mllm5.169440$8u4.1601448@news1.rdc1.bc.home.com>

"Note that crypt() is intended to be a one-way function, much like breaking
eggs to make an omelette. There is no (known) corresponding decrypt
function"


"Jonas Nilsson" <jonas.nilsson@mbox326.swipnet.se> wrote in message
news:3999d081.10891009@news1.tninet.se...
> I have a text file with username:password, the password is crypt. I
> want to have an: "e-mail me my password because I forgot it"
> -function. When I do that I only get the crypted version. How do I
> decrypt the password.
>
> Thanks.
> Jonas N




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

Date: Wed, 16 Aug 2000 02:37:26 +0300
From: "Sami Ylönen" <sami.ylonen@mediamikkeli.fi>
Subject: form
Message-Id: <8nckb7$r0n$1@news.koti.tpo.fi>

I need to send same variable to 2 different perl programs
using form       How?




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

Date: Tue, 15 Aug 2000 18:40:34 -0500
From: "RGA" <rga@io.com>
Subject: From 1,000,000 To 1.000.000 Please ..
Message-Id: <rPkm5.478757$MB.7260870@news6.giganews.com>

How do I make the money formatting below do this:

    1
    1.000
    1.000.000

Instead of what it does now:

    1
    1,000
    1,000,000


sub CommifyMoney {

 local $_  = shift;
     1 while s/^(-?\d+)(\d{3})/$1,$2/;
     return $_;
   }

Thanks ..




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

Date: Wed, 16 Aug 2000 09:43:56 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: From 1,000,000 To 1.000.000 Please ..
Message-Id: <ljlm5.3$pf2.1663@vic.nntp.telstra.net>

"RGA" <rga@io.com> wrote in message
news:rPkm5.478757$MB.7260870@news6.giganews.com...
> How do I make the money formatting below do this:
>
>     1
>     1.000
>     1.000.000
>
> Instead of what it does now:
>
>     1
>     1,000
>     1,000,000
>
>
> sub CommifyMoney {
>
>  local $_  = shift;
>      1 while s/^(-?\d+)(\d{3})/$1,$2/;
                                   ^
>      return $_;
>    }

Maybe changing the comma to dot might do what you want?  Did you try?

Wyzelli




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

Date: Tue, 15 Aug 2000 22:11:51 GMT
From: neil@brevity.org (Neil Kandalgaonkar)
Subject: Re: Help: Strange results from Perl's umask function
Message-Id: <8nceri$o1b$1@localhost.localdomain>

In article <3999B8E1.A6EC16CE@paragen.com>,
Roger Rasmussen  <rrasmussen@paragen.com> wrote:

>umask(777);
>print "umask=",umask(),"\n";
>
>This prints out umask=265 ????

You are confusing octal and decimal numbers. Perl is doing the right
thing. See man perldata, grep for 'scalar value constructors'.

   umask (0777);
   #      ^
   #     important!

   printf "the umask is %03d in decimal and %03o in octal\n", umask(), umask();


-- 
Neil Kandalgaonkar <neil@brevity.org>


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

Date: Tue, 15 Aug 2000 22:14:46 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Help: Strange results from Perl's umask function
Message-Id: <x766p2xjca.fsf@home.sysarch.com>

>>>>> "EvR" == Erik van Roode <newsposter@cthulhu.demon.nl> writes:

  EvR>   I bet it gets a lot less bizarre if you realize umask expects an
  EvR> octal number. So try 0777 instead of 777 ...

actually it expects an integer which is the cause of the confusion. the
unix chmod command always uses a 3 digit OCTAL STRING as the mode
argument to make it easy to see the 3 groupings of 3 bits. so to provide
an integer value which looks nice with 3 groups of three, it has to be
an OCTAL LITERAL. note what i said, octal literal, ie. a digit string
which begins with 0. it still is just an integer to the umask
function. you could pass in a hex or decimal value and make it work if
you encoded the bits correctly. in 5.6 you could even use a bit string.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Wed, 16 Aug 2000 08:50:12 +0800
From: "s24673" <s24673@sp.edu.sg>
Subject: Listing users in Win NT
Message-Id: <3999e546.0@scctn03.sp.edu.sg>

Does anyone know how to list the users who are logged on in Win NT using
Perl?




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

Date: Tue, 15 Aug 2000 22:24:02 GMT
From: "Arvind Kuk" <arvind_kuk@hotmail.com>
Subject: parse HTML to make XML
Message-Id: <6qjm5.5303$Cc2.207931@newsread1.prod.itd.earthlink.net>

Anyone ever have to parse HTML to turn it into XML for storage?
Wondering what the best approach to do this would be, if anyone's got any
experience doing so.


Many thanks...

AK






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

Date: Tue, 15 Aug 2000 20:40:03 -0400
From: "wu.s" <valued_customers@emai.com>
Subject: Re: Pattern match - Extract info from a page
Message-Id: <8ncnt6$124h$1@msunews.cl.msu.edu>

Greg:

Thank you very much for providing me the code to HTML Parser. I have not got
it to work. While it doesn't give me any error message, it didn't write date
into the file or display anything. Could you tell me what's the problem?
(the code is as follows).

Thank you so much for your help.

-- Daniel

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

#! /usr/bin/perl -w

    use strict;

    use HTML::Parser();

    my @info;

    my $tds = 0;
    my @stack;
    sub start {
        my $tag  = shift;
        my $attr = shift;

        return unless $tds || $tag eq 'td';

        if ($tds == 3 && $tag eq 'a') {
            push @info, [ grep /\S/, @stack, $attr->{href} || "<No URL>" ];
            @stack = ();
            $tds   = 0;
        }
        else {
            ++$tds;
        }
    }

    sub text {

        return unless $tds;

        my $text = shift;
        $text =~ s/^\s+//;
        $text =~ s/\s+$//;

        push @stack, $text;
    }

    my $p = HTML::Parser->new(
        api_version => 3,
        start_h => [\&start, "tagname, attr"],
        text_h  => [\&text,  "dtext"],
    );

    $p->parse_file("/web/test/test.html");

    my @max = (0, 0, 0);
    for (@info) {
        my @lengths = map length($_), @$_;

        for (@max) {
            my $v = shift @lengths;
            $_ = $v if $v > $_;
        }
    }

    my $fmt = (join ' | ', map "%-${_}s", @max) . "\n";

#    printf $fmt, @$_ for @info;

    open (DATABASE2, ">/web/test/junk.txt") || die "can't open data file\n";
    printf DATABASE2 $fmt, @$_ for @info;
    close (DATABASE2);

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





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

Date: Wed, 16 Aug 2000 10:45:10 +1000
From: "Troy Rasiah" <troyr@vicnet.net.au>
Subject: perl & postgres
Message-Id: <nwlm5.90440$N4.2171601@ozemail.com.au>

Hi there,
             Was just wondering if anyone in this newsgroup uses PostGres
SQL?

if so then maybe you can help me out.
I'm trying to find a variable type which allows me to input this into the
database
ie 12.00
if i use float or int it changes the value to 12

Any have any ideas?

Thanks

--
----------------------------------------------------------------------------
----------------
Troy Rasiah
Database/Web Developer
Vicnet
troyr@vicnet.net.au
----------------------------------------------------------------------------
----------------




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

Date: Wed, 16 Aug 2000 10:51:26 +1000
From: "Troy Rasiah" <troyr@vicnet.net.au>
Subject: Re: perl & postgres
Message-Id: <iClm5.90441$N4.2171819@ozemail.com.au>

Okay the Numeric character type holds 6 decimal places fixed

--
----------------------------------------------------------------------------
----------------
Troy Rasiah
Database/Web Developer
Vicnet
troyr@vicnet.net.au
----------------------------------------------------------------------------
----------------
"Troy Rasiah" <troyr@vicnet.net.au> wrote in message
news:nwlm5.90440$N4.2171601@ozemail.com.au...
> Hi there,
>              Was just wondering if anyone in this newsgroup uses PostGres
> SQL?
>
> if so then maybe you can help me out.
> I'm trying to find a variable type which allows me to input this into the
> database
> ie 12.00
> if i use float or int it changes the value to 12
>
> Any have any ideas?
>
> Thanks
>
> --
> --------------------------------------------------------------------------
--
> ----------------
> Troy Rasiah
> Database/Web Developer
> Vicnet
> troyr@vicnet.net.au
> --------------------------------------------------------------------------
--
> ----------------
>
>




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

Date: Tue, 15 Aug 2000 23:39:29 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Perl code for a newbie!!
Message-Id: <MPG.1404721b12728e759896af@localhost>

Craig Pugsley wrote ..

>"Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
>news:Pine.GHP.4.21.0008141309030.28149-100000@hpplus03.cern.ch...
>> On Mon, 14 Aug 2000, Craig Pugsley hung upside-down from a news
>> server and blurted out to the foregathered multitude:
>>
>> > I share your sentiments exactly.
>>
>> And then quoted three different people who had been holding a
>> discussion on a particular technical detail.
>>
>> It's hard to see how one can hold all three points of view
>> simultaneously.  Maybe if you'd learn to quote...?
>
>WHAT IN GOODNESS NAME ARE YOU TALKING ABOUT?

have a look at Alan's post and then look at yours again .. Alan included 
exactly what he was commenting about from your post and then included a 
reply .. you (even with the followup that I'm responding to) still just 
included everything that was said previously .. you included it below 
your post and you made no attempt to even remove the signature

this is known as jeopardy style posting .. and it is not conducive to 
good newsgroup discussion

>Why should I have to quote examples just to justify my (personal)
>comments?

why would you assume that Alan was referring to your lack of examples ? 
 .. you just quoted everything from the previous discussion and said "I 
share your sentiments exactly" .. how is one to know who's sentiment you 
share ? .. or which sentiment of that person's you share ? .. just learn 
to quote properly

>I think your (and all others in this thread reflecting the same POV)
>comments seem to encapsulate exactly the extent to which the tech
>community has disappeared up its own (proverbial) backside.

it's nothing as complicated or elaborate as that .. it's just learning 
how to communicate appropriately with an existing community that has 
existing standards of communication .. and when people come in with 
complete disregard for those standards then the community reacts .. it 
happens all the time in every sphere of life .. you either reject the 
community - or learn how to deal with it appropriately .. the choice is 
yours

  [ jeopardectomy performed ]

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Tue, 15 Aug 2000 23:41:39 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Perl code for a newbie!!
Message-Id: <MPG.140472a2d934494b9896b0@localhost>

Craig Pugsley wrote ..

>I accept full responsibility for trying to be different. I've only been
>doing this newsgroups thing for about a week now, and have found that each
>different channel has its own 'character'.
>
>I think I'm getting a general idea as to the 'character' of this newsgroup.

and then you quote the entire contents of the previous post AFTER your 
post anyway .. time's up

*plonk*

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Tue, 15 Aug 2000 16:53:51 -0700
From: "SR" <estancio@cyberspace.org>
Subject: Perl Newbie trying to parse file
Message-Id: <spjlp35vr5j149@corp.supernews.com>

Hello:

I have a bunch of files that need to be parsed and updated to a mysql
database.

Could someone please help me with parsing this file or provide ideas:


Value1:    Data
Value2:    Data
                Data
                Data

Value3: Data
Value4: Data
              Data


Now how do I handle if data has got new lines embedded.

Please help!!!!

Thanks
Please post to the newsgroup.

sr





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

Date: 16 Aug 2000 00:34:18 GMT
From: Eli the Bearded <elijah@workspot.net>
Subject: Re: Procmail vs Perl.
Message-Id: <eli$0008151918@qz.little-neck.ny.us>

In comp.lang.perl.misc, Mike Stok <mike@stok.co.uk> wrote:
> Eli the Bearded  <elijah@workspot.net> wrote:
> >> >I've now started working on a Perl-based solution; so far I've only got
> >> >a few lines that split up the headers and separate them from the body,
> >> I think Mail::Header groks rfc822 messages
> >perl -MMail::Header
> >Can't locate Mail/Header.pm in @INC (@INC contains: /home/username/perl5lib
 ...
> >Hope you didn't lose your incoming mail.
> Maybe you need to install the Mail::Header module...

My point was that if your script is dependent on modules, then
you must be careful that mail does not get lost because the 
module is not installed. Eg, because it is a compiled module
and you just upgraded your perl and didn't reinstall all the
modules.

Anyway, I'm pretty sure that Mail::Header mangles headers too
much for my tastes in mail filtering. I'd like to know if
some mail had a 'Subject' or 'SUBJECT' line, sometimes. It
seems to be able to keep them internally with a particular
case, but there does not seem to be a way to get the extract
string used for the header name. (The whole list of headers,
yes, bot not a particular one.)

I also see that the parser of Mail::Header does not handle the
example A.3.3 from RFC822, sticking rather strictly to the
BNF definitions. (RFC822 is a bit contradictory at times, but
good software should be forgiving.)

Anyway, a simple header grep can be done quite simply in perl.
See hgrep in the scripts section of CPAN. (http://www.cpan.org/
for the comp.mail.misc folks.)

Elijah
------
doesn't like the data abstractions modules make sometimes


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

Date: 15 Aug 2000 22:10:18 GMT
From: bmetcalf@nortelnetworks.com (Brandon Metcalf)
Subject: Re: Quiting a: while (<STDIN>)
Message-Id: <8ncf4a$p03$1@bcrkh13.ca.nortel.com>

tim@ipac.caltech.edu writes:

 > "Tony L. Svanstrom" wrote:
 > > Maybe a simple last to get out of it is enough, maybe I have to accept
 > > it all, to avoid an error message otherwise... Anyone that knows for
 > > sure?
 > 
 > I don't mean to be snarky, but what's wrong with running an experiment and
 > finding out? You'll know for sure alot faster than by posting to Usenet.
 > 
 > perl -we 'my $n=0; while(<STDIN>) { last if ++$n > 3; print; }'
 > 
 > What happens when you type 3 lines of input at your terminal after executing
 > this one-liner? 

Nothing.  The fourth line has to be typed.

Brandon


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

Date: Tue, 15 Aug 2000 23:01:58 GMT
From: "Ricky J. Sethi" <uscphysics@hotmail.com>
Subject: Re: Search problems: Van Gogh site
Message-Id: <GZjm5.5431$Cc2.210763@newsread1.prod.itd.earthlink.net>


Marcel Grunauer <marcel@codewerk.com> wrote in message
news:slrn8pj0g3.cl4.marcel@gandalf.local...
> On Tue, 15 Aug 2000 16:54:56 GMT, David <brooksd@interlog.com> wrote:
>
[SNIP]
>
> Did you have a look at htdig (www.htdig.org) ?
>

That was pretty cool but might be overkill for a relatively small site.  I
use Perlfect's GPL'd Search script (http://perlfect.com/freescripts/search/)
which is written in Perl and is easily modifiable (I've done a fair bit of
customization on it for my sites and it was surprisingly easy).

Works like a charm,


Rick.





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

Date: Tue, 15 Aug 2000 22:51:38 GMT
From: The burr <pacabell@my-deja.com>
Subject: Shared Memory PERL Help me!
Message-Id: <8nchhj$tih$1@nnrp1.deja.com>

For some reason this isn't working for arrays, but will work for
scalars...

#!/usr/bin/perl

use IPC::Shareable;

$handle = tie(@buffer, 'IPC::Shareable', undef, {destroy => yes});
$| = 1;
$SIG{INT} = sub {die "$$ dying\n" };

unless($child = fork) {
  die "cannot fork: $!" unless defined $child;
  put();
  exit;
}

while(1) {
  print "Parent: " . \@$buffer . "\n";
  print "Buffer is @$buffer\n";
  sleep 1;
}
die "NOT REACHED";

sub put {
  my $i = 0;
  print "Child: " . \@$buffer . "\n";
  while(1) {
    $handle->shlock();
    $i++;
    $buffer->[0] = "$$ $i";
    $handle->shlock();
  }
}

PRINTS OUT THIS...
Parent: ARRAY(0x8197144)
Child: ARRAY(0x8197144)
Buffer is
Parent: ARRAY(0x8197144)
Buffer is
Parent: ARRAY(0x8197144)
Buffer is
Parent: ARRAY(0x8197144)
Buffer is
Parent: ARRAY(0x8197144)
Buffer is
Parent: ARRAY(0x8197144)
Buffer is
Parent: ARRAY(0x8197144)
Buffer is
Parent: ARRAY(0x8197144)
Buffer is
1526 dying
1527 dying

The Parent for some reason cannot access the array. I cannot find out
why.  When I use a scalar in place of the array it works fine. ANyone
know what is going on here? WHat can I do to fix this?????

pacabell


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 15 Aug 2000 21:47:58 GMT
From: jhi@beta.hut.fi (Jarkko Hietaniemi)
Subject: suidperl security vulnerability
Message-Id: <spjmuodpr5j34@corp.supernews.com>

A security vulnerability has been found in suidperl.

suidperl is an optional component of Perl installation which is
neither built nor installed by default.

The vulnerability affects all Perl 5 and Perl 4 versions,
including the latest official release 5.6.0.

The impact of the vulnerability is that local users of a system which
has suidperl installed are able to execute arbitrary commands as root.

CERT and various operating system vendors have been informed.
The details and some cures are available at

http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt

The information will be updated as needed.

Jarkko Hietaniemi <jhi@iki.fi>
Perl 5.7 development lead

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen




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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V9 Issue 4028
**************************************


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