[13087] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 497 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 13 03:07:16 1999

Date: Fri, 13 Aug 1999 00: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)

Perl-Users Digest           Fri, 13 Aug 1999     Volume: 9 Number: 497

Today's topics:
    Re: A CGI/Perl Question <JFedor@datacom-css.com>
    Re: Announcing a casino card shoe module (Abigail)
    Re: Announcing a casino card shoe module <cassell@mail.cor.epa.gov>
    Re: Bits and Bytes ... (Abigail)
    Re: chop? Split? help? <cassell@mail.cor.epa.gov>
        ftp changed files in a directory tree? <cwhii@iname.com>
    Re: Help Needed - Perl & SQL (Abigail)
    Re: Help with -X (Abigail)
        HTML editing xbruno8778@my-deja.com
        HTML editing xbruno8778@my-deja.com
    Re: Info about Visitors (Abigail)
    Re: info on CGI client (Abigail)
        insert a file content inside another file xbruno8778@my-deja.com
        Installing dynamic Perl binary distribution <kristian@netscape.com>
    Re: Japanese Girl Needs Help. (Abigail)
    Re: ldap hang (Abigail)
    Re: Loading a web page (Abigail)
    Re: Looking for a solution to the problem localtime and (Abigail)
    Re: LWP <cassell@mail.cor.epa.gov>
    Re: Making a new web page out of an existing page (Abigail)
    Re: Need help - Will pay. <cassell@mail.cor.epa.gov>
    Re: New Book on Perl Tool Development <cassell@mail.cor.epa.gov>
        send attach in email, PERL <melero@ctv.es>
    Re: Yet Another Newbie Question - Or Did I Find a Bug? <cassell@mail.cor.epa.gov>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Fri, 13 Aug 1999 03:30:20 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: A CGI/Perl Question
Message-Id: <7p0fgi$71$1@plonk.apk.net>


Patrick wrote in message <7p07ps$3li$1@imsp009a.netvigator.com>...
>What command should I use to get the variable , which store the URL from
>which I came from?  (from where,th URL , to the CGI script)

  $referring_url = $ENV{‘HTTP_REFERER’};


And your Perl question is??

Jody




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

Date: 13 Aug 1999 01:07:06 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Announcing a casino card shoe module
Message-Id: <slrn7r7dfg.e7v.abigail@alexandra.delanet.com>

Lynn (lynn@swcp.com) wrote on MMCLXXIII September MCMXCIII in
<URL:news:7p03n3$lem$1@sloth.swcp.com>:
:: I have searched throughout CPAN and was unable to find a module that modeled
:: a deck of cards so I ended up writing my own.  You can read the pod
:: documentation and download an evaluation copy of the module by visiting
:: http://www.swcp.com/~lynn/
:: 
:: I am uncertain whether to name the module 'Shoe' or 'CardShoe'.  Suggestions
:: are welcomed.  When I get some feedback I will submit the updated module to
:: CPAN.


I think toplevel package names for CPAN modules should only be done
in exceptional cases. "package Games::Card::Shoe;" is what I would use.

Isn't there a mailinglist to discuss this?



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 13 Aug 1999 00:03:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Announcing a casino card shoe module
Message-Id: <37B3C358.2F2ECE9@mail.cor.epa.gov>

Lynn wrote:
> 
> I have searched throughout CPAN and was unable to find a module that modeled
> a deck of cards so I ended up writing my own.  You can read the pod
> documentation and download an evaluation copy of the module by visiting
> http://www.swcp.com/~lynn/
> 
> I am uncertain whether to name the module 'Shoe' or 'CardShoe'.  Suggestions
> are welcomed.  When I get some feedback I will submit the updated module to
> CPAN.

Question: what did you use for a randomization routine?

Comment: IMHO you ought to think about a name more like
Xxxx::CardShoe , perhaps Games::CardShoe .

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


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

Date: 13 Aug 1999 01:08:35 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Bits and Bytes ...
Message-Id: <slrn7r7dig.e7v.abigail@alexandra.delanet.com>

Victor Alekhin (hedin@wizcom.ru) wrote on MMCLXXIII September MCMXCIII in
<URL:news:Pine.LNX.4.10.9908131305370.880-100000@unix.telco.ru>:
?? Is it possible to write a perl script that 
?? will make something like:
?? 
??                mov al,ByteData
??                xor al,255
??                mov cx,8
??          @1:   rcl al,1
??                rcr ah,1
??                loop @1
??                mov ByteData,ah


Sure.

#!/opt/perl/bin/perl -w

use strict;

print <<'END';
           mov al,ByteData
           xor al,255
           mov cx,8
     @1:   rcl al,1
           rcr ah,1
           loop @1
           mov ByteData,ah
END

__END__



HTH. HAND.



Abigail
-- 
perl -e 'for (s??4a75737420616e6f74686572205065726c204861636b65720as?;??;??) 
             {s?(..)s\??qq \?print chr 0x$1 and q ss\??excess}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 12 Aug 1999 23:37:39 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: chop? Split? help?
Message-Id: <37B3BD33.D95EA827@mail.cor.epa.gov>

revjack wrote:
> 
> Previously, I wrote:
> 
> :Our new friend QuesEx had proven to be very responsive to several
> :yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda
> 
> Just shoot me.

Hey Jack, there's nothing wrong with giving someone new the
benefit of the doubt and trying to help them.  And it's not
your fault if they deceive you in the process.. at least not 
the first time it happens.  Why, I've done it myself.

Oh wait, that's right.  I ended up with egg on *my* face
too.  :-)

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


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

Date: Fri, 13 Aug 1999 23:13:59 -0700
From: C.W.Holeman II <cwhii@iname.com>
Subject: ftp changed files in a directory tree?
Message-Id: <934611416.1440316499@news.earthlink.net>

I am looking for some perl that will transfer a file tree from my hard drive
to a web server using ftp. I would like it to only send the files that
are new or changed. 

--
C.W.Holeman II
cwhii@iname.com
http://home.earthlink.net/~cwhii






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

Date: 13 Aug 1999 01:15:49 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Help Needed - Perl & SQL
Message-Id: <slrn7r7e03.e7v.abigail@alexandra.delanet.com>

Intraport Inc (intrport@pacbell.net) wrote on MMCLXXIII September
MCMXCIII in <URL:news:yjKs3.1092$Sg.64009@typhoon-sf.snfc21.pbi.net>:
__ I am looking for someone who understands both PERL , SQL, and SQL Server 6.5
__ really well to give me a call.  I am having problems displaying text pages
__ as the SQL wants to cut the data off at 256 bytes or characters of data.

While SQL is an acronyme, PERL is not, and hence is spelled Perl.
Your question has zlich to do with Perl, but all with SQL. Looks like
a typing problem to me. (var)char vs text.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 13 Aug 1999 01:17:23 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Help with -X
Message-Id: <slrn7r7e2u.e7v.abigail@alexandra.delanet.com>

Jason W. Storer (jstorer@okapi.uvm.edu) wrote on MMCLXXI September
MCMXCIII in <URL:news:7ost37$1efgt$1@swen.emba.uvm.edu>:
%% 
%% 	if -e $file {
%% 
%% It doesn't like the -e.  What am I doing wrong and how can I fix it?

It does like the -e. But look up the syntax of if.


Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 13 Aug 1999 05:56:31 GMT
From: xbruno8778@my-deja.com
Subject: HTML editing
Message-Id: <7p0c2d$bpf$1@nnrp1.deja.com>

Hy, my name is Bruno Lucas and I work with
electronic publishing.
I am working in a program in PERL to search for
determined tags in a HTML file and insert a block
of text bellow the line where the tag is placed.
this block is in another html file.
I have done an program that find and insert or
find and pull out tags from a line, but I am
having a hard time to find a tag and insert a
whole file bellow it. If you need to take a look
on my old programs, send me an e-mail and I will
send it to you.


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


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

Date: Fri, 13 Aug 1999 05:56:32 GMT
From: xbruno8778@my-deja.com
Subject: HTML editing
Message-Id: <7p0c2e$bpg$1@nnrp1.deja.com>

Hy, my name is Bruno Lucas and I work with
electronic publishing.
I am working in a program in PERL to search for
determined tags in a HTML file and insert a block
of text bellow the line where the tag is placed.
this block is in another html file.
I have done an program that find and insert or
find and pull out tags from a line, but I am
having a hard time to find a tag and insert a
whole file bellow it. If you need to take a look
on my old programs, send me an e-mail and I will
send it to you.


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


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

Date: 13 Aug 1999 01:29:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Info about Visitors
Message-Id: <slrn7r7epd.e7v.abigail@alexandra.delanet.com>

Christian Wirth (christian.wirth@eunet.at) wrote on MMCLXXI September
MCMXCIII in <URL:news:37B1A25F.629230FE@eunet.at>:
--
-- I would need a script that finds out some facts about the visitors, most
-- important is where they live (country or more detailed). I've heared
-- there exists an Enviroment-Variable for that.


Yeah. It's the $ENV {WHERE_DO_YOU_LIVE} environment variable. Not that
not all browser support this feature yet. It's best to put a sign
on your welcome page like:


    <BLINK HZ = 10>
    <FONT SIZE = "Big fucking huge" COLOR = "Yellow"
          BACKGROUND = "Bright green">
     This site is best viewed with an WHERE_DO_YOU_LIVE aware-browser.
    </BLINK></FONT>


Make sure your CGI program starts with:

#!/opt/perl/bin/perl -w

use strict;

unless (exists $ENV {WHERE_DO_YOU_LIVE}) {
    print <<EOT
Content-type: text/html

<BLINK><FONT SIZE = BIG COLOR = Nasty><H1><BLOCKQUOTE><I><B>
Lamer! Your browser does not support WHERE_DO_YOU_LIVE. Go get a
better browser, you moronic cave man!
</BLINK></FONT></H3></BLCOKQUOTE></I></B>
EOT
}

# Code that uses $ENV {WHERE_DO_YOU_LIVE}.


__END__

Alternatively, you could put a rude message when they're running
a stoneage browser.


HTH. HAND.


Abigail
-- 
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 13 Aug 1999 01:30:06 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: info on CGI client
Message-Id: <slrn7r7eqr.e7v.abigail@alexandra.delanet.com>

Gabriele Gallacci (info@gallacci.com) wrote on MMCLXXI September MCMXCIII
in <URL:news:8E1FB0E3Amailbygallaccicom@news.tin.it>:
$$ 
$$  do you know how to grab the ip of a client from the cgi runned?


You want to grab a protocol?



Abigail
-- 
               split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_)  {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 13 Aug 1999 06:49:49 GMT
From: xbruno8778@my-deja.com
Subject: insert a file content inside another file
Message-Id: <7p0f6b$dim$1@nnrp1.deja.com>

I wnat to open an HTML file with many titles and subtitles
and search for these structures, and insert the text from another file
right bellow the subtitle.
I have this routine:
if (/<H!>section/)[
  print "section level $sec\n";
  /<H1>\.([0-9]...etc

after find the <h1>whatever structure in the HTML main file, I want to
grab another html file and insert the content right bellow it.

Thanks for the help!


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


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

Date: Thu, 12 Aug 1999 23:15:08 -0700
From: John Kristian <kristian@netscape.com>
Subject: Installing dynamic Perl binary distribution
Message-Id: <37B3B7EA.C8817CD@netscape.com>

Is there an easy-to-install package that creates a copy of Perl with dynamic
loading, anywhere you like in your filesystem?  Something like this:

     % mkdir yourNewPerl
     % cd    yourNewPerl
     % tar -xvof /cdrom/myPackage.tar
     % ./perlinstall
     % ./perl -e 'print "Say, that was really simple!\n";'

I want this to work if you have no compiler or `make` on your system.  I
want the resulting Perl to support embedding (into a C++ program I'm
developing) and extensions; that is, one can install CPAN modules in it, in
the usual way (of course, many of them will require a compiler and `make`).
And I want it for both Solaris and NT.

I found some packages, but they either require compilation from C source, or
aren't dynamic (no libperl.so, not embeddable) or must be installed in a
certain place in your filesystem.  Where could I get something better?

Can I create such a package?  I hacked up something that works on Solaris
(details below), but it isn't pretty.  Is there a better way?  Any idea how
to do it on NT?  (I haven't attempted that, yet.)  I'd rather not use
ActiveState, but I'd rather not spend a lot of time on this, either. :-)

My Solaris hack goes like this: myPackage.tar contains mostly files I
generated by building and installing Perl in the usual way, from a public
source code distribution, with the dynamic loading option.  In addition, it
contains that `perlinstall` script:

     #!/bin/sh
     yourNewPerl=`pwd`

     # Replace `perl` with a script that behaves like it:
     echo '#!/bin/sh' > perl
     echo  LD_LIBRARY_PATH=$yourNewPerl/5.00503/sun4-solaris/CORE:'$LD_LIBRARY_PATH' >> perl
     echo  export LD_LIBRARY_PATH >> perl
     echo  exec $yourNewPerl/perl5.00503 \
             -I $yourNewPerl/5.00503 \
             -I $yourNewPerl/site_perl/5.005 '"$@"' >> perl
     # ./perl5.00503 is a copy of the `perl` binary executable.
     chmod ugo+x perl

     # Modify Config.pm, perldoc and other scripts, to contain $yourNewPerl
     # instead of the pathname where this copy of Perl was previously installed.
     ./perl perlinstall.pl "$yourNewPerl" # This work is done by a Perl program.

This works fairly well; the resulting `perl` script works nearly like the
`perl` binary.  But not quite: there's some extra junk at the end of the
default @INC (the pathnames where I installed the binaries, originally), and
it won't install CPAN modules, unless you pass some extra parameters to
MakeMaker:

     % yourNewPerl/perl Makefile.PL PERL=yourNewPerl/perl FULLPERL=yourNewPerl/perl

I imagine I could fix those problems by hacking the Perl source code,
slightly.  But I haven't tried it.  I hope you gurus will tell me the
elegant way, instead.



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

Date: 13 Aug 1999 01:35:51 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Japanese Girl Needs Help.
Message-Id: <slrn7r7f5k.e7v.abigail@alexandra.delanet.com>

Kaori (kaori@japanesegirl.com) wrote on MMCLXXI September MCMXCIII in
<URL:news:o%hs3.10$0K.808@iad-read.news.verio.net>:
!! 
!! Subject: Re: Japanese Girl Needs Help.

Since we have a lunch appointment, why don't we discuss this
over sushi tomorrow? Oh, wait, you are the other Japanese Girl.

!! I am trying to make a PERL script that will

That's spelled Perl.

!! allow me to access individual images by the user
!! making one event (push button) and then have the
!! PERL script roam the database and select the correct
!! images.
!! 
!! Can this be done? Yes? No?

Yes. But your description is way to vague to say anything more
specific than 'Yes'.

!! Please tell me.

Don't get pushy.



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 13 Aug 1999 01:37:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: ldap hang
Message-Id: <slrn7r7f7r.e7v.abigail@alexandra.delanet.com>

Dean Gayhart (dgayhart@walcoff.com) wrote on MMCLXX September MCMXCIII in
<URL:news:37B01F33.8C650E97@walcoff.com>:
$$ hi.  anyone know why an ldap script may be hanging even after it does
$$ its task?
$$ it completes its task from the command line but not when called from a
$$ web page.


Yeah. It's those Bright Red Siamese Fighting Fish.



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 13 Aug 1999 01:39:54 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Loading a web page
Message-Id: <slrn7r7fd8.e7v.abigail@alexandra.delanet.com>

Phil Goetz (goetz@cse.buffalo.edu) wrote on MMCLXX September MCMXCIII in
<URL:news:7oodoo$gef$1@prometheus.acsu.buffalo.edu>:
== 
== I know how to make an HTML file run a Perl script (using <FORM action=...>).
== I know how to print out HTML from within a Perl CGI script.
== But how do I get a Perl program to load a web page which
== already exists as an HTML file, without requiring the user
== to click on anything?  (So printing out a <FORM action="myurl">
== and waiting for the user to click on "submit" is not acceptable.)


Oh boy, I suppose you are anxious waiting for the day the television
networks start switching *your* tv to a different channel without
you touching the remote too?



Abigail
-- 
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
          for (s;s;s;s;s;s;s;s;s;s;s;s)
              {s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 13 Aug 1999 01:43:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Looking for a solution to the problem localtime and the century mark.
Message-Id: <slrn7r7fjq.e7v.abigail@alexandra.delanet.com>

Jack Alexander (Jack.Alexander@digital.com) wrote on MMCLXXII September
MCMXCIII in <URL:news:7ouof5$51u$1@nntpd.lkg.dec.com>:
`` Hi all,
``     I use Perl 5.0 42 on Windows NT and UNIX. I'm looking for a solution to
`` the problem of localtime only returning a year value (99) and not a century
`` value (19 -or- 20).


Yeah. Bummer. localtime is so broken. It doesn't return centuries, so
it will fail after Jan 1, and its months have been off by 1 as well.

I use:

     my $century = $year > 50 ? 19 : 20;


And I made a crontab entry that mails me each century on Dec 31, xx49,
just before midnight, that I have to upgrade my programs.


Abigail
-- 
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 12 Aug 1999 23:35:30 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: LWP
Message-Id: <37B3BCB2.C36E58EB@mail.cor.epa.gov>

Rob Sedgwick wrote:
[snip]
> I am not looking where to download the libraries from. My understanding is
> that the libraries have to be compiled on the machine on which they are
> present, i.e. I can't just stick them in mt CGI-BIN directory and they will
> work. Is this correct? There are several web hosts that I know of who allow
> you to use perl CGI scripts.

You can find the info you seek in the Perl FAQ.  They are three
of the last four questions in perlfaq8.  And a number of Perl
modules are merely text files, requiring little more than a
careful copying.

But first check with your ISP and find out what he/she/it
already has installed.  Perhaps LWP is already waiting for
you.  It can't hurt to ask...

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


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

Date: 13 Aug 1999 01:45:29 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Making a new web page out of an existing page
Message-Id: <slrn7r7fnk.e7v.abigail@alexandra.delanet.com>

Eddie () wrote on MMCLXXI September MCMXCIII in
<URL:news:37b1eddb.102089770@news.cadvision.com>:
;; Is it possible to create a web page by "stealing" certain text
;; passages from an existing web page on your web server?  I've never
;; used perl before but if it can do this i'd like to start learning it.
;; The script would have to search for certain text in a filename and
;; then generate a new web page using an existing template.


Perl can. And that's the end of the thread in this newsgroup.
Find some l33+ h4X0rz to help you do stealing.


Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 12 Aug 1999 23:13:59 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: BigDoggy <bigdoggy@makersmall.com>
Subject: Re: Need help - Will pay.
Message-Id: <37B3B7A7.4FD4C512@mail.cor.epa.gov>

[courtesy cc sent to poster despite ridiculous fear of canned meat]

BigDoggy wrote:
> 
> I know this isn't directly related, but I'm getting mildly desperate.
> 
> I've been trying for two weeks to get a shopping cart system installed and
> running and am having no luck.  My hope is to find an expert to get things
> working and show me enough that I can take it from there.
> 
> The program I'm trying to get configured and installed is Perlshop.cgi,
> available as shareware, but having more of the features I need than most of
> the commercial products I've investigated.

Brian, I am not interested in being your expert, but I can
point you toward some experts.  There is a mailing list
for PerlShop where you can get help.  Send e-mail to
    perlshop-subscribe@topica.com
and a nice lady who does nails will put you on the mailing
list.  People have reputedly gotten useful help within
hours of posting their questions there.

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


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

Date: Thu, 12 Aug 1999 23:44:55 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: New Book on Perl Tool Development
Message-Id: <37B3BEE7.F1D91A7C@mail.cor.epa.gov>

Randal L. Schwartz wrote:
> 
> >>>>> "Eric" == Eric Bohlman <ebohlman@netcom.com> writes:
> 
> Eric>   Streaks Drop Zippers With Cox Out
> 
> Apparently, a game between USC and Oregon State was headlined as:
> 
>         Trojans invade Beavers
> 
> I wonder if anyone got fired over that. :)

Nah.  As someone writing within a Mark-McGwire-homer's length
of the Oregon State campus [assume less than two miles :-],
I can attest that sports headlines like that are the *norm*
in the Pac-10.

Still, it's tough to top one I actually saw in person.
In the words of Dave Barry, I am not making this up.  When
I was a teenager growing up in Nashville TN, one year the
NCAA first-round games were at Vanderbilt.  Kentucky,
Marquette, Indiana, and Austin Peay [pronounced 'pea' of
course].  Austin Peay got there by virtue of their star,
Fly Williams [NYC street basketball star, who led the NCAA
in scoring per game that year].  Austin Peay is also in
Nashville, so the first-round game of them vs Kentucky
was chock full of Austin Peay fans, many of whom had signs
the cameras had to avoid.  Signs like:
           "Fly is open let's go Peay!"
           "Peay over Cats"
You can make up your own slogans.  They all ran about
the same.

I saw a much worse banner at a U.Tennessee-Vanderbilt
(nationally televised) bball game, but this is a family
newsgroup...

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


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

Date: Tue, 10 Aug 1999 12:30:09 +0200
From: "MELERO" <melero@ctv.es>
Subject: send attach in email, PERL
Message-Id: <7or8p9$i4r$1@diana.bcn.ttd.net>

Hi.

I would like know, how I can send a attach (file binary) in a form via web.

I know send e-mail via web. I realice a program in Perl


Thanks!!!!!!!!!!!!!!!!!!!




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

Date: Thu, 12 Aug 1999 23:31:58 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Yet Another Newbie Question - Or Did I Find a Bug?
Message-Id: <37B3BBDE.5A2DB28C@mail.cor.epa.gov>

churchylfem@my-deja.com wrote:
> 
> Hello, all!
> 
> I'm new to perl, but not a new programmer.  I recently needed to do
> some stuff in DOS that was beyond the capability of batch (what
> isn't?), and the client's environment did not have access to anything I
> could use to develop with, so I downloaded active perl:
[snip]
> I'm running it on Win95 (french version, I can't read french).

But aren't the Perl docs all en Anglaise ?  You should be able
to get help there too.  Well perhaps you already did.  Let's 
see...

[snip]
> Both loops appear to function normally, and to exit under the correct
> conditions, with the exception that the inner loop is reading every
> OTHER line in the file it opens, beginning with the second line.  I
> could not find a cause.  By putting the readline outside the loop, I
> could read every line with ease.  Even inside of a single while loop
> worked great.  But inside of a nested while loop caused it to skip
> every other line in every file it opened and read.

Well, if you read the docs for readline() [it is in perlfunc with
other functions], you'll see that it is the equiv of the
<> operator.  Here's what it says:

    This is the internal function implementing the <EXPR> operator,
    but you can use it directly. The <EXPR> operator is discussed
    in more detail in perlop. 

        $line = <STDIN>;
        $line = readline(*STDIN);           # same thing

So, when you read in a line using <FILE> and then read in the
next line using readline(*FILE) you get every other line
showing up in the places where you're doing the processing.
 
> I finally solved the problem by hacking a very ugly solution - a for
> loop nested inside the outer while loop, with a fake counter (1 to
> 2500), which is higher than any conditions it would meet, and forced
> setting of the counter to 2501 when the line length equalled zero.  I
> know, I know, strictly amateur night, but hey, it was at night, and I
> had a deadline.
> 
> But now that it's done, and it worked in hack mode, I'm wondering what
> the heck I did wrong (or could there be a bug here).  I'm betting it's
> me.

Good bet.  You *must* be a real programmer.  Newbies always
insist it must be the software, despite all info to the
contrary.
 
> Here's a code fragment of what I ended up doing:
> 
> opendir (DIRECTORY, "$INPUT_DRIVE")
>                 || warn "Could not open directory!\n";
> 
>         @dirlist = grep /FLD/, readdir DIRECTORY;
> 
>         closedir (DIRECTORY)
>                 || warn "Could not close directory!\n";

Okay, I'm giving you bonus points for checking the returns
on your open() and close(), and handling the grep-readdir
combo correctly [for someone who actually wants to slurp
in the whole list instead of doing file-by-file processing].
But you clearly aren't employing 'use strict;' and you
ought to add the -w flag onto your first line of your
program [the 'shebang' line which win95 ignores but Perl
checks].

Still, the program is awkward.  And you don't *need* to
do all this work.  Check out the modules File::Find and
File::Copy to find out [1] how to let Perl walk through
directories for you; and [2] how to copy files without
using system() .  I also think there's a much easier way
of doing the parsing of your files, but I can't tell because
[A] I can't see the data since the PSI::ESP module isn't
working for me at the moment; and [B] it's late and I would
need some coffee.


[gigantic snip of way too many lines to read in a newsgroup]

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


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

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

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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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


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