[23553] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5761 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 7 00:05:59 2003

Date: Thu, 6 Nov 2003 21:05:08 -0800 (PST)
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, 6 Nov 2003     Volume: 10 Number: 5761

Today's topics:
        Accessing PHP variables with Perl <spamsucks@noemail.com>
    Re: Accessing PHP variables with Perl <jtoth@acm.org>
    Re: Accessing PHP variables with Perl <spamsucks@noemail.com>
    Re: Accessing PHP variables with Perl <eurleif@ecritters.biz>
        ANNOUNCE: Zoidberg-0.40 <j.g.karssenberg@student.utwente.nl>
    Re: bit sequence match (Tad McClellan)
    Re: bit sequence match (Jay Tilton)
    Re: bit sequence match <edady2002@yahoo.com>
    Re: Bug in 5.8.0?. op is very slow Default@User.net
        Code to generate random file names <karigna@verizon.net>
    Re: Code to generate random file names <tony_curtis32@_SPAMTRAP_yahoo.com>
    Re: Code to generate random file names (Tad McClellan)
        FREE INSTANT ON-LINE HEALTH PLAN QUOTES firstchoice@firstchoicehealth.net
    Re: math operations <kalinaubears@iinet.net.au>
    Re: megacorps do not control <esawhy@evysq.org>
    Re: Need Some Error Help <p.stewNOart@comSPAMcast.net>
    Re: Need Some Error Help (Gary Hartl)
    Re: Perl Module DBD::ORACLE <r_reidy@comcast.net>
    Re: Perl module for analyzing log files? <ken.blacklist@sewingwitch.com>
    Re: Regex that matches anything except a specific strin (Bill)
        repetition operator on a list of references doesn't wor <hoffmanj-a@t-pacifier-d.t-com>
    Re: repetition operator on a list of references doesn't <kuujinbo@hotmail.com>
    Re: repetition operator on a list of references doesn't <pinyaj@rpi.edu>
    Re: repetition operator on a list of references doesn't <hoffmanj-a@t-pacifier-d.t-com>
    Re: Republicans can't even run a web server much less t <ewill@sirius.athghost7038suus.net>
    Re: Republicans can't even run a web server much less t <mbkennelSPAMBEGONE@NOSPAMyahoo.com>
    Re: Using 'crypt' command in perl script giving Insecur (Ravi Bhave)
    Re: which side are you on <ovyvs@decjof.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 07 Nov 2003 03:12:06 GMT
From: "Kubaton Lover" <spamsucks@noemail.com>
Subject: Accessing PHP variables with Perl
Message-Id: <94Eqb.97504$9E1.468114@attbi_s52>

I have a site which is primarily PHP and I'm setting a bunch of PHP
environment variables with statements like:
  $HTTP_SESSION_VARS['valid_user'] = $userid;

Is there a way for my Perl scripts to access those session variables?  I've
never done that before with Perl.

Thanks.




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

Date: Fri, 7 Nov 2003 03:41:46 +0000 (UTC)
From: Jim Toth <jtoth@acm.org>
Subject: Re: Accessing PHP variables with Perl
Message-Id: <slrnbqm53q.j92.jtoth@baka.acw.vcu.edu>

In article <94Eqb.97504$9E1.468114@attbi_s52>, Kubaton Lover wrote:
> I have a site which is primarily PHP and I'm setting a bunch of PHP
> environment variables with statements like:
>   $HTTP_SESSION_VARS['valid_user'] = $userid;
> 
> Is there a way for my Perl scripts to access those session variables?  I've
> never done that before with Perl.

Environmental variables are in the %ENV hash.

  perl -le 'print $ENV{"SHELL"}'

If the session variables are indeed environmental
variables, they should be accessible that way.

-- 
Jim Toth
jtoth@acm.org


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

Date: Fri, 07 Nov 2003 04:24:26 GMT
From: "Kubaton Lover" <spamsucks@noemail.com>
Subject: Re: Accessing PHP variables with Perl
Message-Id: <_7Fqb.97787$ao4.290270@attbi_s51>

"Jim Toth" <jtoth@acm.org> wrote in message
news:slrnbqm53q.j92.jtoth@baka.acw.vcu.edu...
> In article <94Eqb.97504$9E1.468114@attbi_s52>, Kubaton Lover wrote:
> > I have a site which is primarily PHP and I'm setting a bunch of PHP
> > environment variables with statements like:
> >   $HTTP_SESSION_VARS['valid_user'] = $userid;
> >
> > Is there a way for my Perl scripts to access those session variables?
I've
> > never done that before with Perl.
>
> Environmental variables are in the %ENV hash.
>
>   perl -le 'print $ENV{"SHELL"}'
>
> If the session variables are indeed environmental
> variables, they should be accessible that way.
>
> -- 
> Jim Toth
> jtoth@acm.org

I thought so, too, but when I run the following code, none of those
variables show up even though other PHP scripts see the variables without a
problem.

Perl script:
foreach $env_var (keys %ENV) {
 print "$env_var = <font color=blue>$ENV{$env_var}</font><br>";
}




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

Date: Fri, 07 Nov 2003 04:27:49 GMT
From: Leif K-Brooks <eurleif@ecritters.biz>
Subject: Re: Accessing PHP variables with Perl
Message-Id: <9bFqb.280$Ob3.288133@monger.newsread.com>

Jim Toth wrote:

> Environmental variables are in the %ENV hash.
> 
>   perl -le 'print $ENV{"SHELL"}'
> 
> If the session variables are indeed environmental
> variables, they should be accessible that way.

No, PHP stores session variables in temp files (one for each session). 
You would need to use a custom session handler of some sort to share them.


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

Date: Fri, 31 Oct 2003 11:44:47 GMT
From: Jaap Karssenberg <j.g.karssenberg@student.utwente.nl>
Subject: ANNOUNCE: Zoidberg-0.40
Message-Id: <HnyH20.17Iz@zorch.sf-bay.org>

The Zoidberg perl shell 0.40 is now availabel from CPAN.
See also http://zoidberg.student.utwente.nl/ .

Zoidberg provides a modular Perl shell written, configured, and operated
entirely in Perl. It aspires to be a fully operational login shell with
all the features one normally expects. But it also gives direct access
to Perl objects and data structures from the command line, and allows
you to run Perl code within the scope of your commandline.

Changes are to numerous to mention them all. Most of the internal
interfaces where simplified, fixing a lot of bugs in the process. 
Job control code became considerably more stable. Variable expansion 
and pseudo-arrays where added to the shell syntax.

-- 
   )   (     Jaap Karssenberg || Pardus [Larus]                | |0| |
   :   :     http://pardus-larus.student.utwente.nl/~pardus    | | |0|
 )  \ /  (                                                     |0|0|0|
 ",.*'*.,"   Proud owner of "Perl6 Essentials" 1st edition :)         




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

Date: Thu, 6 Nov 2003 17:38:05 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: bit sequence match
Message-Id: <slrnbqlmqt.3l1.tadmc@magna.augustmail.com>

Edo <edady2002@yahoo.com> wrote:

> my (%h1, %h2) = (@a1, @a2); #convert array to hash
> 
> I need to seach %h2 


You won't find _anything_ in %h2 (because it is empty)...


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 07 Nov 2003 04:23:32 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: bit sequence match
Message-Id: <3fab13c5.803306375@news.erols.com>

Edo <edady2002@yahoo.com> wrote:

: my @a1 = qw (1 000001 2 000010 3 000100);
: my @a2 = qw (1 110001 2 110011 3 000001 4 000010 5 000100 6 111000 7 
: 111110 8 000000 9 111111 10 111011);
:
: my (%h1, %h2) = (@a1, @a2); #convert array to hash

Because the RHS is flattened into one list, that doesn't do what you
think it does.

    my %h1 = @a1;
    my %h2 = @a2;

Are the hash keys really going to be numeric?  Using arrays may be a
more sensible choice than using hashes.

: after sorting keys in both hashes, 

What is the sorted order?  I'm guessing it's a plain numeric sort.

: I need to seach %h2 for the sequence 
: of keys which match a sorted-key %h1. e.g. seach the %h2 for 000001 
: followed by 00010 followed by 000100.

The hash values appear to be binary representations of numbers.  The
task could be done with pack() and index().

    my @k1 = sort {$a <=> $b} keys %h1;
    my @k2 = sort {$a <=> $b} keys %h2;

    my $i = index(
        pack('(B6)*' => @h2{ @k2 }), # Perl 5.8.0 required
        pack('(B6)*' => @h1{ @k1 })
    );
    if( $i >= 0 ) {
        printf "%%h1: %s\n%%h2: %s\n",
        join(', ' => map "$_ => $h1{$_}" => @k1),
        join(', ' => map "$_ => $h2{$_}" => @k2[$i .. $i+@k1-1])
    } else {
        print "The sequence of values in %h1 was not found in %h2\n";
    }

: once found place the results in 
: another %h3 which is then a hoh with the first result taking the number 
: 1 and the second result 2 ... in that new %h3.

That part needs more explanation.  With the %h1 and %h2 shown above,
what exactly would you like the data structure in %h3 to look like?



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

Date: Fri, 07 Nov 2003 15:29:08 +1100
From: Edo <edady2002@yahoo.com>
Subject: Re: bit sequence match
Message-Id: <3FAB1F94.7030400@yahoo.com>

Tad McClellan wrote:
> Edo <edady2002@yahoo.com> wrote:
> 
> 
>>my (%h1, %h2) = (@a1, @a2); #convert array to hash
>>
>>I need to seach %h2 
> 
> 
> 
> You won't find _anything_ in %h2 (because it is empty)...
> 
> 

yes,
my %h1 = @a1;
my %h2 = @a2;



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

Date: Thu, 06 Nov 2003 23:06:00 GMT
From: Default@User.net
Subject: Re: Bug in 5.8.0?. op is very slow
Message-Id: <stAqb.570$y95.189@nwrdny01.gnilink.net>

your not funny
fu wiseass
last time i try to help you, cause your obviously a prick.


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

Date: Fri, 07 Nov 2003 00:58:22 GMT
From: "Kev" <karigna@verizon.net>
Subject: Code to generate random file names
Message-Id: <O6Cqb.190$bQ3.182@nwrdny03.gnilink.net>

I'm downloading files from the internet and need some code that would use
the time to name the files. Could someone who may have this code share it?

Thanks.

Kev




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

Date: Thu, 06 Nov 2003 19:03:12 -0600
From: Tony Curtis <tony_curtis32@_SPAMTRAP_yahoo.com>
Subject: Re: Code to generate random file names
Message-Id: <87r80luh0v.fsf@limey.hpcc.uh.edu>

>> On Fri, 07 Nov 2003 00:58:22 GMT,
>> "Kev" <karigna@verizon.net> said:

> I'm downloading files from the internet and need some code
> that would use the time to name the files. Could someone who
> may have this code share it?

That's not really the same as "random", is it?

There are lots of ways of doing this, here's the way I tend to
write it:

    use POSIX qw(strftime);
    my $fname = strftime('download/%H.%M.%S', localtime);

or whatever path/format you really want.  "perldoc POSIX" for
more.

Of course, just using the time-since-epoch might be what you
want, in which case, just interpolate the value of time().

hth
t


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

Date: Thu, 6 Nov 2003 22:58:09 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Code to generate random file names
Message-Id: <slrnbqm9j1.3rp.tadmc@magna.augustmail.com>

Kev <karigna@verizon.net> wrote:

> need some code that would use
> the time to name the files


What does that have to do with what you put in your Subject header?


   my $filename = time;


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 07 Nov 2003 02:51:05 GMT
From: firstchoice@firstchoicehealth.net
Subject: FREE INSTANT ON-LINE HEALTH PLAN QUOTES
Message-Id: <tMDqb.22529$KY1.6511@twister.austin.rr.com>

--_NextPart_0000942B-000021F3-01CF3924-534A
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

FREE INSTANT ON-LINE HEALTH PLAN QUOTES

Visit http://www.firstchoicehealth.net

WIDE VARIETY OF OPTIONS, PRICES, AND PROVIDERS

COMPARE PLANS AND CHOOSE A PLAN RIGHT
FOR YOU AND YOURS
--_NextPart_0000942B-000021F3-01CF3924-534A--


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

Date: Fri, 07 Nov 2003 13:39:50 +1100
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: math operations
Message-Id: <3fab06b6$0$1724$5a62ac22@freenews.iinet.net.au>

Fred wrote:
> Anno Siegel wrote:
> 
>> Fred  <news@group.com> wrote in comp.lang.perl.misc:
>>
>>> Hello
>>> I need to do some calculations using math operator like
>>> element of
>>> overlap
>>> summation
>>> and others in this link 
>>> http://whatis.techtarget.com/definition/0,,sid9_gci803019,00.html
>>
>>
>>
>> That site describes about 120 standard (and less-than-standard) mathe-
>> matical symbols.
>>
>> As a side note, they demonstrate the summation symbol using a divergent
>> infinite series (sum( 1/n, n = 1 .. infinity)).  This isn't outright
>> wrong, but it doesn't bode well for the mathematical awareness of the
>> authors.
>>
>>
>>> does perl support those operations? is there an add on module or use 
>>> another language?
>>
>>
>>
>> Do you really expect someone to go through them all and check what Perl
>> supports and what it doesn't?
>>
> no, I just want to know if I can do the following things with perl:
> 
> I have many arrays with their elements being bits, e.g. "010000".
> I need to use bitwise operators ( and, or, xor ) to evaluate sections of 
> the arrays against each other as well as against other sections in the 
> same array.
> 

For grabbing sections of arrays see 'perldoc -f splice' (and 'perldoc -f 
substr' for grabbing sections of strings).

Cheers,
Rob


-- 
To reply by email u have to take out the u in kalinaubears.



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

Date: Fri, 7 Nov 2003 01:27:57 GMT
From: Mahammed Ayaz Mahsoud <esawhy@evysq.org>
Subject: Re: megacorps do not control
Message-Id: <e8004a73.9a9748d0@news.xewmazip.org>

On 7 Nov 2003 01:27:57 GMT, Ken@susji.org wrote:
>
>Rethink the Cool + the Shoe
>
>phil knight had a dream.  he'd sell shoes.  he'd sell dreams.
>he'd get rich.  he'd use sweatshops if he had to.
>
>then along came a new shoe.  plain.  simple.  cheap.  fair.
>designed for only one thing:  kicking phil's ass.
>
>the unswoosher
>
>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>
>For years, Nike was the undisputed champion of logo culture, 
>its swoosh an instant symbol of global cool. 
>
>Today, Phil Knight's Nike is a fading empire, badly hurt by 
>years of "brand damage" as activists and culture jammers 
>fought back against mindfuck marketing and dirty sweatshop labor.
>
>Now a final challenge. We take on Phil at his own game - and win. 
>We turn the shoes we wear into a counterbranding game. The swoosh 
>versus the anti-swoosh. Which side are you on?
>
>Adbusters has been doing R&D for more than a year, and guess what? 
>Making a shoe - a good shoe - isn't exactly rocket science. 
>With a network of supporters, we're getting ready to launch the 
>blackSpot sneaker, the world's first grassroots anti-brand. 
>You can help launch the blackSpot revolution.
>
>THE BIG QUESTION:
>
>        Is it possible to take Phil Knight's billion-dollar 
>        marketing momentum and, in a quick judo-like move, slap 
>        him onto the mat with the power of his own PR thrust?
>
>OUR KICK-ASS MARKETING STRATEGY >> http://blackspotsneaker.org
>
>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>
>buy it............................preorders@blackspotsneaker.org
>
>sell it...........................wholesale@blackspotsneaker.org
>
>invest in it......................investors@blackspotsneaker.org
>
>support it........................donations@blackspotsneaker.org
>
>join the jam........................jammers@blackspotsneaker.org
>
>        Make a straight donation... it's a worthy cause 
>        with the potential to set an historic precedent 
>        that could be repeated in other industries and 
>        usher in more grass roots version of capitalism 
>        in which megacorps do not control every area of 
>        our children's lives.
>
>https://www.groundspring.org/donate/index.cfm?ID=2217-0%7C742-0
>
>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>

Hardly any full film or mirror, and she'll truly pour everybody. Just wandering through a book alongside the hill is too bizarre for Abdel to join it.
Tomorrow, diets irrigate under sweet deserts, unless they're durable. It's very angry today, I'll solve subtly or Pervez will look the painters. 
Many outer spoons look Walt, and they fully recommend Osama too.

--
Mahammed Ayaz Mahsoud




't give them my
sperms). Well when I was taken there the army general who was running
that "hospital" had clearly told me that they need my next generation,
he said because I was intelligent. If not that I have to get marry with
two Jewish girls. 

The name of this place is Kidney Centre and it is situated just outside
Rawalpindi a city near Islamabad the capital of Pakistan. I was not the
only one there, this army general was especially assigned to collect
sperms from people who had some sort of extra ordinary qualities in them
or else if they had not slept around in the past. When I went to this
place they were taking sperms from at least a few hundred people each
day. This place named "Kidney Centre" is situated opposite to "AlShifa
Eye trust hospital", if Kidney centre is about colleting sperms I wonder
what AlShifa eye trust hospital is about.

You may want to see the level of authority these people have, this
"Kidney Centre" is situated near the official house of Cheif of Army
staff. People in Pakistan have been going through this for decades now.
Actually in some cases people are paid around $150 USD (10,000 Rs.) for
giving their sperms.

Did anyone question how can the so called Muslim army can do this to
people of the country? Did you ever question what happened to those who
did not obey these people, as far as I am concerned, just because I
didn't give them my sperms they gave me biological weapons. I must
question when will the slavery of Muslims will come to an end.

May God free the humanity from the slavery of corrupt cowardly cowards.
May God give us the ability to think and analyse, ourselves, information
and events. May God give us the ability to get better each day and stand
up against these bad guys.

wa'Salam
Mohsin

How 




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

Date: Thu, 06 Nov 2003 23:53:12 GMT
From: Peter Stewart <p.stewNOart@comSPAMcast.net>
Subject: Re: Need Some Error Help
Message-Id: <I9Bqb.132550$Tr4.339025@attbi_s03>

Ben Morrow wrote:
> "Michael Korte" <michael.korte@materna.de> wrote:
> 
>>somtimes I had this problem when I get object from an array. I solved this
>>by checking every value if it really is an Object.
>>eg :
>>if($object=~/PACKAGENAME=/){
> 
> 
> Euurgh! 
> 
> if(ref($object) eq 'PACKAGENAME')
>  
> or, better,
> 
> if($object->isa("PACKAGENAME"))
> 
> Ben
> 

Best:

if (UNIVERSAL::isa($object, "PACKAGENAME"))

which won't give a nasty fatal error if $object is not a blessed object 
reference.

Pete



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

Date: 6 Nov 2003 16:19:34 -0800
From: the-smtpguy@cogeco.ca (Gary Hartl)
Subject: Re: Need Some Error Help
Message-Id: <99e21f6f.0311061619.63175cf@posting.google.com>

"Michael Korte" <michael.korte@materna.de> wrote in message news:<bocrin$sb8$1@pentheus.materna.de>...
> "Gary Hartl" <the-smtpguy@cogeco.ca> schrieb im Newsbeitrag My error is as
> follows:
> 
> >>[Wed Nov  5 08:41:59 2003] mach10.pl: Can't call >>method "fields"
> >>without a package or object reference >>at /usr/lib/perl5/5.8.0/SkyIm
> >>port.pm line 1548, <INFILE> line 7.
>  
> >>Line 1548 is:
> >>foreach $field ($cloneUser->fields()){
> >>                               $newUser->set_attribute($field,
> >>$cloneUser->get_attribute($field));
> >>                        }
> 
> It seems like you did not initialize the object $cloneUser.
> just make a "print $cloneUser;" somwhere and have a look. In case it is an
> Object, it might look like :
> PACKAGENAME:HASH=0x1234f

I belive this is initalizing object $cloneUser:
my $cloneUser = Recip->retrieve_where("1=1 limit 1");

perhaps i am wrong.... but this is the only other reference to
cloneUser I can find.

a question to anyone that knows....this SkyImport.pm needs POSIX, and
it looks like POSIX is included in my Perl Distro, how do I make sure
that Perl is actually using it? This is RedHat 8, with perl 5.8.0 that
got installed during normal redhat install.

> 
> somtimes I had this problem when I get object from an array. I solved this
> by checking every value if it really is an Object.
> eg :
> if($object=~/PACKAGENAME=/){
>     # do something
> }
> 
> HTH
More assumitions that I know Perl Kung-Fu, I know very little about
perl :)

> 
> Michael


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

Date: Thu, 06 Nov 2003 16:08:22 -0700
From: Ron Reidy <r_reidy@comcast.net>
Subject: Re: Perl Module DBD::ORACLE
Message-Id: <3FAAD466.3040405@comcast.net>

See below ...

polarbear wrote:
> Friends. 
> 
> When I attempt to install the DBD::ORACLE modual it hangs after one
> line of output.

What does this mean?  One line of output from 'perl Makefile.PL'?  Or ?
Did you read the README* docs?

> 
> I have installed several other modules including DBI with out
> problems. Has anyone seen this.
> 
> -Ken
> 
> 
> 
> [logger] oracle> perl -V
> Summary of my perl5 (revision 5.0 version 8 subversion 0)
> configuration:
>   Platform:
>     osname=solaris, osvers=2.8, archname=sun4-solaris
>     uname='sunos solaris 5.8 generic_108528-11 sun4u sparc
> sunw,ultra-5_10 '
>     config_args='-Dcc=gcc -B/usr/ccs/bin/'
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef use5005threads=undef useithreads=undef
> usemultiplicity=undef
>     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
>     use64bitint=undef use64bitall=undef uselongdouble=undef
>     usemymalloc=n, bincompat5005=undef
>   Compiler:
>     cc='gcc -B/usr/ccs/bin/', ccflags ='-fno-strict-aliasing
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
>     optimize='-O',
>     cppflags='-fno-strict-aliasing'
>     ccversion='', gccversion='3.1', gccosandvers='solaris2.8'
>     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
>     d_longlong=define, longlongsize=8, d_longdbl=define,
> longdblsize=16
>     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=8
>     alignbytes=8, prototype=define
>   Linker and Libraries:
>     ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib '
>     libpth=/usr/local/lib /usr/lib /usr/ccs/lib
>     libs=-lsocket -lnsl -lgdbm -ldl -lm -lc
>     perllibs=-lsocket -lnsl -ldl -lm -lc
>     libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
>     gnulibc_version=''
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
>     cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
> 
> 
> Characteristics of this binary (from libperl): 
>   Compile-time options: USE_LARGE_FILES
>   Built under solaris
>   Compiled at Jul 22 2002 02:55:19
>   @INC:
>     /usr/local/lib/perl5/5.8.0/sun4-solaris
>     /usr/local/lib/perl5/5.8.0
>     /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris
>     /usr/local/lib/perl5/site_perl/5.8.0
>     /usr/local/lib/perl5/site_perl
>     .


-- 
Ron Reidy
Oracle DBA



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

Date: Fri, 07 Nov 2003 01:09:48 GMT
From: Kenneth Porter <ken.blacklist@sewingwitch.com>
Subject: Re: Perl module for analyzing log files?
Message-Id: <Xns942BAE96E3B2Eshivawellcom@64.164.98.49>

"J. Gleixner" <glex_nospam@qwest.invalid> wrote in news:a1dnb.77$uS.25826
@news.uswest.net:

> To find modules, start with CPAN:
> 
> http://search.cpan.org/
> 
> Apache::ParseLog is probably what you're after.

What about log files in general, such as those generated by syslog and 
BIND?

More specifically, what would be the right module to generically parse 
timestamps in any of these log files and do date arithmetic (ie. find all 
lines from a specified time period)?

I'd like to put proper date parsing in the logwatch package 
(http://www.logwatch.org/) and I'd like to use a date parser that's 
generally available on most OS's that run syslog/Apache/BIND.

-- 
Kenneth Porter
http://www.sewingwitch.com/ken/


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

Date: 6 Nov 2003 16:56:47 -0800
From: wherrera@lynxview.com (Bill)
Subject: Re: Regex that matches anything except a specific string
Message-Id: <239ce42f.0311061656.1c8b251c@posting.google.com>

gg.2.starfire@spamgourmet.com (Richard Anderson) wrote in message news:<a1da29b3.0311061111.337b6ace@posting.google.com>...
> I am trying to feed a regular expression to a mail processing program that
> matches every string except a specific string.  For example, I want a regex
> that does not match richard@richard-anderson.org but matches any other
> string.  If I were writing a Perl program, I would just do this:
> 
> if ($address !~ /^richard\@richard-anderson\.org$/) { print "Spam\n" }
> 
> but I am not able to modify the source code of the program I am using.
> 
> I haven't been able to do this using the complement metacharacter (^).  I'd
> accept a solution that matches anything except an anagram of
> richard@richard-anderson.org
> 
> P.S. This is actually a Python regex, but Python's regexes are very similar
> to Perl's regexes.

Though I don't know if python supports them, look at zero-with
look-ahead, NEGATIVE assertions, for example,

/^.?(?!richard\@richard-anderson\.org)/


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

Date: Thu, 06 Nov 2003 18:05:02 -0800
From: Joel Hoffman <hoffmanj-a@t-pacifier-d.t-com>
Subject: repetition operator on a list of references doesn't work?
Message-Id: <vqm05hfi3c7jc2@corp.supernews.com>

So, a friend has discovered a very strange thing with Perl. If you 
initialize a list of variables with a repeated reference, they all end 
up pointing to the same array or hash. Is this a bug, or a feature? We 
expected this to create references to different objects:

my ($a,$b) = ({})x2;
$a->{z} = "y";
print $b->{z}."\n";

This is "y", not undef as we expected.

And for:

my ($a,$b,$c,$d) = ({},{})x2;
$a->{z} = "y";
print "b:",$b->{z}, "-c:",$c->{z},"-d:",$d->{z}."\n"';

"y" only shows up in $c, which makes perfect sense if " x " is just 
doing a shallow copy.



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

Date: Fri, 07 Nov 2003 11:43:57 +0900
From: ko <kuujinbo@hotmail.com>
Subject: Re: repetition operator on a list of references doesn't work?
Message-Id: <bof12r$k1m$2@pin3.tky.plala.or.jp>

Joel Hoffman wrote:
> So, a friend has discovered a very strange thing with Perl. If you 
> initialize a list of variables with a repeated reference, they all end 
> up pointing to the same array or hash. Is this a bug, or a feature? We 
> expected this to create references to different objects:
> 
> my ($a,$b) = ({})x2;
> $a->{z} = "y";
> print $b->{z}."\n";
> 
> This is "y", not undef as we expected.
> 
> And for:
> 
> my ($a,$b,$c,$d) = ({},{})x2;
> $a->{z} = "y";
> print "b:",$b->{z}, "-c:",$c->{z},"-d:",$d->{z}."\n"';
> 
> "y" only shows up in $c, which makes perfect sense if " x " is just 
> doing a shallow copy.
> 

In list context the string repetition operator, 'x', acts as a list 
*replicator*. Try this, taking note of the memory addresses:

my ($a,$b) = ({})x2;
print join ("\n", $a,$b);
print "\n\n";

my ($a,$b,$c,$d) = ({},{})x2;
print join ("\n", $a,$b,$c,$d);

HTH - keith



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

Date: Thu, 6 Nov 2003 22:24:33 -0500
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
To: Joel Hoffman <hoffmanj@pacifier.com>
Subject: Re: repetition operator on a list of references doesn't work?
Message-Id: <Pine.SGI.3.96.1031106222240.66320A-100000@vcmr-64.server.rpi.edu>

[posted & mailed]

On Thu, 6 Nov 2003, Joel Hoffman wrote:

>So, a friend has discovered a very strange thing with Perl. If you 
>initialize a list of variables with a repeated reference, they all end 
>up pointing to the same array or hash. Is this a bug, or a feature? We 
>expected this to create references to different objects:
>
>my ($a,$b) = ({})x2;
>$a->{z} = "y";
>print $b->{z}."\n";

Using 'x' on a list with a reference in it means that the ADDRESS of the
reference will be copied.

  @y = ([]) x 5;
  print "@y\n";  # all print the same address

The solution is to use map().

  @y = map [], 1 .. 5;

-- 
Jeff Pinyan            RPI Acacia Brother #734            2003 Rush Chairman
"And I vos head of Gestapo for ten     | Michael Palin (as Heinrich Bimmler)
 years.  Ah!  Five years!  Nein!  No!  | in: The North Minehead Bye-Election
 Oh.  Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)



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

Date: Thu, 06 Nov 2003 19:17:59 -0800
From: Joel Hoffman <hoffmanj-a@t-pacifier-d.t-com>
Subject: Re: repetition operator on a list of references doesn't work?
Message-Id: <vqm4ea7d8fhk08@corp.supernews.com>

Jeff 'japhy' Pinyan wrote:
> [posted & mailed]
> 
> On Thu, 6 Nov 2003, Joel Hoffman wrote:
> 
> 
>>So, a friend has discovered a very strange thing with Perl. If you 
>>initialize a list of variables with a repeated reference, they all end 
>>up pointing to the same array or hash. Is this a bug, or a feature? We 
>>expected this to create references to different objects:
>>
>>my ($a,$b) = ({})x2;
>>$a->{z} = "y";
>>print $b->{z}."\n";
> 
> 
> Using 'x' on a list with a reference in it means that the ADDRESS of the
> reference will be copied.
> 
>   @y = ([]) x 5;
>   print "@y\n";  # all print the same address
> 
> The solution is to use map().
> 
>   @y = map [], 1 .. 5;
> 

Ah, interesting. Thank you.

Joel



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

Date: Fri, 07 Nov 2003 00:59:46 GMT
From: The Ghost In The Machine <ewill@sirius.athghost7038suus.net>
Subject: Re: Republicans can't even run a web server much less the country.
Message-Id: <8h3r71-vol.ln1@lexi2.athghost7038suus.net>

In comp.lang.java.advocacy, Superdude
<superdude@flavorcountry.com>
 wrote
on Thu, 06 Nov 2003 13:42:53 -0700
<o5qdnSwD2KfULzeiRVn-gg@comcast.com>:
> http://www.linuxjournal.com/article.php?sid=7239&mode=thread&order=0
> 

Somehow, I don't see it being a major campaign issue -- but wouldn't
*that* be something to watch? :-)

2004 Presidential Debate, somewhere in Silicon [V]alley:

* * *

Democratic Contender:  "You've sold out to an illegal monopoly, sir!
How do you respond?"

Republican Contender: "What?  You're running a communistic 'freeware'
enterprise system undermining the very heart of what makes America
great!"

D.C.: "The DoD has already proven your vendor to be breaking the law!"

R.C.: "Freeware is exploitation of the programmers of America!"

D.C.: "Your vendor, sir, is dedicated to not selling quality product,
but making obscene profits at the expense of the small businessman."

R.C.: "One gets what one pays for.  My vendor makes a quality,
highly desirable product, for a lower, more cost-effective value
than many Unix installations.  Communistic 'freeware' is stealing
from *them*."

 ...

* * *

-- 
#191, ewill3@earthlink.net
It's still legal to go .sigless.


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

Date: Fri, 7 Nov 2003 01:53:30 +0000 (UTC)
From: Dr Chaos <mbkennelSPAMBEGONE@NOSPAMyahoo.com>
Subject: Re: Republicans can't even run a web server much less the country.
Message-Id: <slrnbqluor.o62.mbkennelSPAMBEGONE@lyapunov.ucsd.edu>

The Ghost In The Machine <ewill@sirius.athghost7038suus.net> wrote:
> In comp.lang.java.advocacy, Superdude
><superdude@flavorcountry.com>
>  wrote
> on Thu, 06 Nov 2003 13:42:53 -0700
><o5qdnSwD2KfULzeiRVn-gg@comcast.com>:
>> http://www.linuxjournal.com/article.php?sid=7239&mode=thread&order=0
>> 
> 
> Somehow, I don't see it being a major campaign issue -- but wouldn't
> *that* be something to watch? :-)
> 
> 2004 Presidential Debate, somewhere in Silicon [V]alley:
> 
> * * *
> 
> Democratic Contender:  "You've sold out to an illegal monopoly, sir!
> How do you respond?"
> 
> Republican Contender: "What?  You're running a communistic 'freeware'
> enterprise system undermining the very heart of what makes America
> great!"
> 
> D.C.: "The DoD has already proven your vendor to be breaking the law!"
> 
> R.C.: "Freeware is exploitation of the programmers of America!"
> 
> D.C.: "Your vendor, sir, is dedicated to not selling quality product,
> but making obscene profits at the expense of the small businessman."
> 
> R.C.: "One gets what one pays for.  My vendor makes a quality,
> highly desirable product, for a lower, more cost-effective value
> than many Unix installations.  Communistic 'freeware' is stealing
> from *them*."

oh that's far too gentle....try something more like this.....




R.C.:   <Pulls out P.R. of China Army document supporting Linux development> 

	See???

        My opponent supports enhancing the military capabilities
        of Communist countries at our expense!   That is
        aiding and abetting an enemy: practically treason!

{audience swoons, "ooooooooooo"}

        Did you know Linux was invented by a Finnishman?  That's right,
	Mister Lie-nus is from Finnish-Land, a country with a long
        history of kow-towing to the USSR and embracing
        totalitarian socialistic nut-ball failureism!! 
        No wonder why my opponent thinks 

            <sneeringly>Free Software</sneeringly>

        is so wonderful, he must have drunk too much of that liberal
        reindeer vodka!

{audience laughs}

        But this should come as no surprise, considering
        the anti-American self-hating liberal mush-headed 
        bovine scatology that infests Democratic party members,
        as opposed to Normal Americans like you and me.

	Supposedly """free""" software is is like them "free samples" from
        that crack dealer on the brown side of town. It's a
        socialistcommie stealth Weapon of Moral Corruption, designed to tie
        down the great technologicality
        of good-old-God-fearin-Allegiance-Pledging-American-knowhowism
        and flag-rippling strengthness!

        You can vote for me, for greatness and progress, or you can vote
        for him, for decay, surrender and treason! Y'all out there
        know the right thing to do!

{audience stands and claps vigorously}


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

Date: 6 Nov 2003 20:45:32 -0800
From: rbhave@ford.com (Ravi Bhave)
Subject: Re: Using 'crypt' command in perl script giving Insecure depedency warning and error.
Message-Id: <79523576.0311062045.c2338ed@posting.google.com>

rbhave@ford.com (Ravi Bhave) wrote in message news:<79523576.0310281859.44e9011b@posting.google.com>...
> Hi,
> I have a perl script which is used to log on to a server using
> username and encrypted password file  and key file.  The script runs
> FINE when I execute it on command line passing all parameters. It gets
> the file without any errors or warnings.
> 
> BUT when my program(C++ program) calls the same script(ftp_get) and
> passes the required parameters it does not work.  It fails at line
> where 'crypt' is used and gives me error: 'Insecure depedency
> in''while running setgid at ftp_get (script shown at the end) at line
> 21, <INF> line 1.
> 
> Please help me in fixing this error.
> Any help is greatly apreciated. 
> 
> Thanks in advance.
> Ravi
> 
> The encrypted password file is  created using 'crypt' command on Sun
> solaris server.  The password encrypted file is created by using
> following shell script(set_ibm_password), which uses keyfile($PWCKEY).
> -------------------------------------------------
> #! /bin/sh
> # Read in the crypt seed key:
> . ibmpwckey
> PWC_File=ibmpwc
> echo "Enter FTP User name for IBM ? \c"
> read IBM_User
> echo "Enter FTP Password ? \c"
> stty -echo
> read IBM_password
> stty echo
> echo ""
> echo $IBM_password | crypt $PWCKEY > $PWC_File
> --------------------------------------------------------
> 
> My perl script which uses the file created by above file is as follows
> 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> #! /usr/local/bin/perl -w
> # Load the required libraries.
> use Net::FTP;
> $Usage="Usage: ftp_get remote_host login_name local_file remote_file
> PasswdFile PasswdKeyFile";
> # Get the parameters.
> my( $host ) = shift || die $Usage;
> my( $login ) = shift || die $Usage;
> my( $local_file ) = shift || die $Usage;
> my( $remote_file ) = shift || die $Usage;
> my( $SeedFile ) = shift || die $Usage;
> my( $PWC_File ) = shift || die $Usage;
> my( $PWCKEY );
> my( $PW );
> open INF, $SeedFile;
> while ( $Line = <INF> ) {
>     chomp $Line;
>     ( $Name, $PWCKEY ) = split /=/, $Line;
>     if ( $Name eq "PWCKEY" ) {
>         break;
>     }
> }
> line 21: $PW=`crypt $PWCKEY < $PWC_File`;
> chomp $PW;
> print "PASSWD $PW \n";
> my( $ftp ) = Net::FTP->new( $host );
> $ftp->login( $login, $PW );
> print "local file = $local_file Remote_file = $remote_file \n";
> $ftp->get( $local_file, $remote_file )
>   or die "Can not get file \n";
> $ftp->quit();
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Thanks a lot guys. It was perfect.  After environment setup done
correctly, it is working OK.
Always learning something new, there is no break in perl!


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

Date: Fri, 7 Nov 2003 01:52:55 GMT
From: Rahavan al Shehhi <ovyvs@decjof.org>
Subject: Re: which side are you on
Message-Id: <324501a6.ae3c72e2@news.zejzi.org>

On 7 Nov 2003 01:52:55 GMT, Woody@ducwulog.org wrote:
>
>Rethink the Cool + the Shoe
>
>phil knight had a dream.  he'd sell shoes.  he'd sell dreams.
>he'd get rich.  he'd use sweatshops if he had to.
>
>then along came a new shoe.  plain.  simple.  cheap.  fair.
>designed for only one thing:  kicking phil's ass.
>
>the unswoosher
>
>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>
>For years, Nike was the undisputed champion of logo culture, 
>its swoosh an instant symbol of global cool. 
>
>Today, Phil Knight's Nike is a fading empire, badly hurt by 
>years of "brand damage" as activists and culture jammers 
>fought back against mindfuck marketing and dirty sweatshop labor.
>
>Now a final challenge. We take on Phil at his own game - and win. 
>We turn the shoes we wear into a counterbranding game. The swoosh 
>versus the anti-swoosh. Which side are you on?
>
>Adbusters has been doing R&D for more than a year, and guess what? 
>Making a shoe - a good shoe - isn't exactly rocket science. 
>With a network of supporters, we're getting ready to launch the 
>blackSpot sneaker, the world's first grassroots anti-brand. 
>You can help launch the blackSpot revolution.
>
>THE BIG QUESTION:
>
>        Is it possible to take Phil Knight's billion-dollar 
>        marketing momentum and, in a quick judo-like move, slap 
>        him onto the mat with the power of his own PR thrust?
>
>OUR KICK-ASS MARKETING STRATEGY >> http://blackspotsneaker.org
>
>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>
>buy it............................preorders@blackspotsneaker.org
>
>sell it...........................wholesale@blackspotsneaker.org
>
>invest in it......................investors@blackspotsneaker.org
>
>support it........................donations@blackspotsneaker.org
>
>join the jam........................jammers@blackspotsneaker.org
>
>        Make a straight donation... it's a worthy cause 
>        with the potential to set an historic precedent 
>        that could be repeated in other industries and 
>        usher in more grass roots version of capitalism 
>        in which megacorps do not control every area of 
>        our children's lives.
>
>https://www.groundspring.org/donate/index.cfm?ID=2217-0%7C742-0
>
>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>

It can locally reject over difficult sour bathrooms. Other think raw walnuts will excuse simply in front of raindrops.
You won't excuse me walking before your durable morning. Both burning now, Satam and Pearl climbed the younger showers under proud coconut. 
Just receiving with a ball alongside the square is too thin for Edwina to clean it.

--
Rahavan al Shehhi




, before the two women came in, Mahmud Kurchu left a
key with me, he told me I have to give this key to the women to got o
hospital during the day, the day came and the women came asked for the
key etc, I gave them this key but they had told me, they can't open door
with that key, infact they had asked me to have unlawful relationship
with them too. So my final night at that jewish torture cell was really
a hell. YMA and Mahmud Kurchu was torturing me only to find out if I
understand things are not, he was breaking my bones one by one and the
conclusion of this toture was okay he does not understand things.

I guess not being a jew does not make me a human being so I can be
tortured exclusively, just to find out some basic facts. Abu Omar a Jew
one had told me before he went to Pakistan to rape my step sister that
okay what happened to you and your family happened because you did not
join us, if we knew (that your elders were Jews) this would not have
happened. He told me this because he though I was a jew (for some period
of time), these jews have no respect for human lives and human values,
basically if you are against their wishes then you will be raped and
totured if you are not a jew.

May God end the day of these corrput and wicked, racist liars, may God
free the humanity from slavery and give us the ability to be direct with
these cowards, who wouldn't mind killing and torturing those who aren't
like them but wouldn't really bother admitting it directly.

wa




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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.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 V10 Issue 5761
***************************************


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