[12851] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 261 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 26 14:07:20 1999

Date: Mon, 26 Jul 1999 11:05:10 -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           Mon, 26 Jul 1999     Volume: 9 Number: 261

Today's topics:
    Re: Can anyone explain concepts of Perl Objects? <uri@sysarch.com>
        Extracting plain text from email (Anno Siegel)
    Re: Extracting plain text from email <uri@sysarch.com>
    Re: Extracting plain text from email <uri@sysarch.com>
    Re: Extracting plain text from email <dgris@moiraine.dimensional.com>
    Re: FAQ 8.45: How do I install a module from CPAN? (Tramm Hudson)
    Re: Geekspeak Programming Contest <keithmur@mindspring.com>
    Re: Geekspeak Programming Contest <keithmur@mindspring.com>
    Re: Geekspeak Programming Contest <tchrist@mox.perl.com>
        Getting Height and Width of GIF/JPEG in PERL? (Wayne Venables)
    Re: Getting Height and Width of GIF/JPEG in PERL? <jbc@shell2.la.best.com>
    Re: Getting Height and Width of GIF/JPEG in PERL? (Larry Rosler)
    Re: Getting page title (Abigail)
    Re: Getting page title <NOSPAMebin111@yahoo.com>
    Re: Guru question: Regular Expression <jacklam@math.uio.no>
        how to pass variables(hidden) to a form <jaganna@shell.one.net>
    Re: how to pass variables(hidden) to a form (Michel Dalle)
    Re: HTML::Parser sample (Abigail)
        Install MSQL Module into Perl (Layout/Design)
    Re: Perl in webpages <cassell@mail.cor.epa.gov>
        Perl, FTP, and Win32 with IIS (ouch) sherifhanna@my-deja.com
        problem size limit of perl <cfang@nwu.edu>
    Re: REAL: help with flock() portability <ehpoole@ingress.com>
    Re: reg expression (Tad McClellan)
    Re: Regex-ing  <no mail please were anti spammers>
    Re: Removing a file using activePERL on NT <toby@venice.cas.utk.edu>
    Re: SSI command in Perl script problem (I R A Darth Aggie)
    Re: SSI command in Perl script problem <steven@*REMOVE*filipowicz.com>
    Re: Text File Busy (errno = 26) <gellyfish@gellyfish.com>
    Re: Text File Busy (errno = 26) <sohrabSPAMSUX@d2c2.com>
        Why use /s in Cookbook recipe 20.6?  <jbc@shell2.la.best.com>
        win32 FormMail.pl and DevMail 405 error <newsgrp@agnetworks.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: 26 Jul 1999 12:15:29 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Can anyone explain concepts of Perl Objects?
Message-Id: <x7k8rnv13y.fsf@home.sysarch.com>

>>>>> "PG" == Paul Glidden <paul.glidden@unisys.com> writes:

  PG> The best way to learn about perl objects is just to learn object
  PG> oriented programming in general.  Then perl is just semantics from
  PG> that point on.

that isn't really true. i claim i have been doing object programming for
almost 20 years starting in assembler and continuing in c and perl (no
c++ or java for me, thanx. i don't like straightjackets). it is a state
of mind and programming philosophy and not a methodology (much to the
chagrin of the OO police). but each language has its tricks and ways
(some forced, others not) to work with objects. perl's bag o'tricks is
different than most and not intuitively obvious even for those with lots
of object experience in other languages. even damian learned about
closure objects from tom c (IIRC).

  PG> People write books on object oriented programming, and there is an
  PG> entire chapter dedicated to perl packages in the camel book.
  PG> Realistically one can't explain that sort of thing to someone over
  PG> a newsgroup.  To try would just make one dumber.

damian's book is more than that. it covers general object ideas and perl
in a couple of overview chapters and then gets into some very meaty
stuff that is not well known in the perl community. his new modules that
support member access and protection and method dispatching solve all
the common complaints about perl objects. in an appendix he also
compares perl object features and syntax to 4 of the most common OO
languages so you can learn to translate your OO techniques. it is well
written with many code examples and complete working objects. it appears
to be relatively bug free (after my fixes :-) and well produced. it is
one of the very few non-o'reilly perl books out there that has good
production values (fonting, layout, editing, etc.).

this is a outsider plug, as i tech edited a proof of the book. it is due
out in august hopefully before the conference. damian is also scheduled
to give a couple of papers there on his new modules. <GUSH> he is a
bright light in the dark tunnel of perl objects </GUSH>. i am getting no
money or anything from this but i heartily recommend anyone with an
interest in perl objects to devour (and slowly digest) this as soon as
it gets out. it will warp your perlish brain.

uri


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: 26 Jul 1999 16:29:38 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Extracting plain text from email
Message-Id: <7ni2di$7nc$1@lublin.zrz.tu-berlin.de>

Uri Guttman  <uri@sysarch.com> wrote in comp.lang.perl.misc:
>>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
>
>  TC>      [courtesy cc of this posting mailed to cited author]
>  TC> In comp.lang.perl.misc, 
>  TC>     lr@hpl.hp.com (Larry Rosler) writes:
>  TC> :form, and getting them to do anything about it would be a Sysiphean 
>
>  TC> "Sysiphean" =~ y/iy/yi/
>
>??? there is no 'iy' in that string.

There is no s before the slash either.

Anno



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

Date: 26 Jul 1999 12:22:43 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Extracting plain text from email
Message-Id: <x7hfmrv0rw.fsf@home.sysarch.com>

>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:

  TC>      [courtesy cc of this posting mailed to cited author]
  TC> In comp.lang.perl.misc, 
  TC>     lr@hpl.hp.com (Larry Rosler) writes:
  TC> :form, and getting them to do anything about it would be a Sysiphean 

  TC> "Sysiphean" =~ y/iy/yi/

??? there is no 'iy' in that string.

i recently used that name and had to look it up. it is difficult to look
up a greek name when you don't know the spelling. i went to a greek
mythology site!

:-)

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: 26 Jul 1999 12:59:35 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Extracting plain text from email
Message-Id: <x79083uz2g.fsf@home.sysarch.com>

>>>>> "AS" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:

  AS> Uri Guttman  <uri@sysarch.com> wrote in comp.lang.perl.misc:
  >>>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
  >> 
  TC> [courtesy cc of this posting mailed to cited author]
  TC> In comp.lang.perl.misc, 
  TC> lr@hpl.hp.com (Larry Rosler) writes:
  TC> :form, and getting them to do anything about it would be a Sysiphean 
  >> 
  TC> "Sysiphean" =~ y/iy/yi/
  >> 
  >> ??? there is no 'iy' in that string.

  AS> There is no s before the slash either.

got me. :-(

just had a very exhausting weekend. i won't wake up for another couple
of days.

and that is also why i like tr/// over y///. just a little more obvious
what is going on. i didn't see the y (which i suspect tom chose for its
matching one of the letters being translated (not transliterated)

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: 26 Jul 1999 11:08:46 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Extracting plain text from email
Message-Id: <m3g12b72zl.fsf@moiraine.dimensional.com>

Uri Guttman <uri@sysarch.com> writes:

> >>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
> 
>   TC>      [courtesy cc of this posting mailed to cited author]
>   TC> In comp.lang.perl.misc, 
>   TC>     lr@hpl.hp.com (Larry Rosler) writes:
>   TC> :form, and getting them to do anything about it would be a Sysiphean 
> 
>   TC> "Sysiphean" =~ y/iy/yi/
> 
> ??? there is no 'iy' in that string.

Hmmmm.... I think you need some more coffee this morning.  :-)

y/// isn't looking for a regular expression.

dgris
-- 
A hacker is a machine that turns caffeine into code.


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

Date: 26 Jul 1999 10:54:21 -0600
From: hudson@swcp.com (Tramm Hudson)
Subject: Re: FAQ 8.45: How do I install a module from CPAN?
Message-Id: <7ni3rt$c87@llama.swcp.com>
Keywords: troll troll troll

Abigail <abigail@delanet.com> wrote:
$*!@#
$*!@# I've a user 'camel' that owns everything in /opt/perl. No need to have
$*!@# 'root' own anything Perl related.
$*!@#

Who owns suidperl then?

Tramm
-- 
  o   hudson@swcp.com                 tbhudso@cs.sandia.gov   O___|   
 /|\  http://www.swcp.com/~hudson/          H 505.323.38.81   /\  \_  
 <<   KC5RNF @ N5YYF.NM.AMPR.ORG            W 505.284.24.32   \ \/\_\  
  0                                                            U \_  | 


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

Date: Mon, 26 Jul 1999 11:14:51 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Geekspeak Programming Contest
Message-Id: <379C897B.F3AA020A@mindspring.com>

Anno Siegel wrote:
> 
[cut]
> Conceptually, I'd say a programming mistake is an error in
> algorithm, i.e. applying an algorithm that doesn't solve the
> problem at hand.
> 
> A bug is an error in implementation, i.e. using an algorithm
> that would solve the problem, but failing to implement it
> correctly.
> 
> Of course, this distinction is of little empirical value, because
> it depends on the programmers state of mind, absent additional
> evidence.  Seeing the line
> 
> $sum_of_squares = $n*( $n - 1);
> 
> we don't know if the programmer misremembered his math (programming
> error) or if he forgot to type in /2 (bug).
> 
> Anno
So the continuum runs like this?

programming mistake ---->  bug  ------>  typo
                           AKA 
                       "brain fart"

Then very few of the Y2K "bugs" actually qualify: they're either
programming mistakes, or there by (shortsighted) design.


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

Date: Mon, 26 Jul 1999 11:34:26 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Geekspeak Programming Contest
Message-Id: <379C8E12.B2BA4913@mindspring.com>

Hakan Hjelmstrom wrote:
> 
> On 22 Jul 1999 13:13:01 -0700, Tom Christiansen:
> > Your mission, should you choose to accept it, is to write a translator
> > program than converts from one lingo to the other, or vice versa.
> > The program should work for translating between other domains as
> > well, such as East Coast vs West Coast jargon, programmer vs
> > manager, etc.
> 
> You mean something like http://www.rinkworks.com/dialect/
> 
Quite neat, but the redneck translator needs a lot of work.  It mixes up
a sort of Deep South dialect (dropped r's, for example) with hillbilly
("whut in tarnation", "yer" for "your", etc.).  Believe me, I *know*. 
:-)

And who but the Irish say "sarver" for "server"?  (OK, there probably
are some backwoods Appalachian folks who do).

Tired of folks who attribute *every* kind of idiosyncratic pronunciation
to *every* region of the South.  And think we use "y'all" as a
singular.  Only on TV.


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

Date: 26 Jul 1999 10:47:33 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Geekspeak Programming Contest
Message-Id: <379c9125@cs.colorado.edu>

This contest is now on the Web:

    http://language.perl.com/misc/geekspeak.html

I'd like to announce winners at TPC, but I don't mean to 
limit it to attendees of the that conference.

--tom
-- 
 "The difference between art and science is that science is what we
  understand well enough to explain to a computer.  Art is everything
  else." --D. E. Knuth


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

Date: Mon, 26 Jul 1999 16:08:06 GMT
From: wvenable_net@iname.com (Wayne Venables)
Subject: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <379c8750.769263@news.sprint.ca>

Hello everyone,

    Does anyone have any code to retrieve the height and width of GIF
and JPEG files?  If no code exists (seems unlikely) does anyone know
how it could be done in Perl?

Thanks!


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

Date: 26 Jul 1999 16:30:46 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <379c8d36$0$214@nntp1.ba.best.com>

Wayne Venables <wvenable_net@iname.com> wrote:

>     Does anyone have any code to retrieve the height and width of GIF
> and JPEG files?  If no code exists (seems unlikely) does anyone know
> how it could be done in Perl?

You should check out the Image::Size module on CPAN.

-- 
John Callender
jbc@west.net
http://www.west.net/~jbc/


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

Date: Mon, 26 Jul 1999 09:50:59 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <MPG.120631cd25a341ae989d4a@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <379c8750.769263@news.sprint.ca> on Mon, 26 Jul 1999 16:08:06 
GMT, Wayne Venables <wvenable_net@iname.com> says...
>     Does anyone have any code to retrieve the height and width of GIF
> and JPEG files?  If no code exists (seems unlikely) does anyone know
> how it could be done in Perl?

Get Image::Size from CPAN.

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


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

Date: 26 Jul 1999 11:29:10 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Getting page title
Message-Id: <slrn7pp35d.l5o.abigail@alexandra.delanet.com>

Julio Carrio (jcarrio@imagelink.com.br) wrote on MMCLV September MCMXCIII
in <URL:news:379C80E9.943E4C7F@imagelink.com.br>:
{} Abigail wrote:
{} 
{} > If you mean the title of HTML pages, then, the answer is, yes, of course.
{} > The title will always be relatively in the beginning, and you can always
{} > close the socket as soon as you've got the title.
{} >
{} > Abigail
{} 
{} Ok. How  I do this? I'm a beginner ...


Start reading on how to do sockets.  (But why not just download the entire
page?)



Abigail
-- 
tie $" => A; $, = " "; $\ = "\n"; @a = ("") x 2; print map {"@a"} 1 .. 4;
sub A::TIESCALAR {bless \my $A => A} #  Yet Another silly JAPH by Abigail
sub A::FETCH     {@q = qw /Just Another Perl Hacker/ unless @q; shift @q}


  -----------== 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: Mon, 26 Jul 1999 10:40:27 -0700
From: "e-bin" <NOSPAMebin111@yahoo.com>
Subject: Re: Getting page title
Message-Id: <Y81n3.55$OT.4379@typhoon-sf.snfc21.pbi.net>

Try picking up a book and learning it, or read one of the many many
resources available on the internet.
Julio Carrio <jcarrio@imagelink.com.br> wrote in message
news:379C80E9.943E4C7F@imagelink.com.br...
> Abigail wrote:
>
> > If you mean the title of HTML pages, then, the answer is, yes, of
course.
> > The title will always be relatively in the beginning, and you can always
> > close the socket as soon as you've got the title.
> >
> > Abigail
>
> Ok. How  I do this? I'm a beginner ...
>
> Julio
>
>




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

Date: Mon, 26 Jul 1999 18:09:17 +0200
From: "Peter J. Acklam" <jacklam@math.uio.no>
Subject: Re: Guru question: Regular Expression
Message-Id: <379C882C.B3130FB0@math.uio.no>

Kin Lum wrote:
> 
> using HTML::Parser is fine.  but for such a simple task, using it
> would be an overkill.  can it be done in 2, 3 lines in Perl?

If you want to do it "properly", then 2-3 lines of Perl is not enough.

This is a "rough" method that does most of the job.  It also shows
a way to "substitute everything except...".

   #!/local/bin/perl5 -wp0777

    s{
        ( < (?: [^>'"]* | "[^"]*" | '[^']*' )+ > )  # match a tag
    }{
        do {
            $tag = $1;                              # save the tag
            $tag =~ m{ < /? (?:b|i|font|a) \b }ix   # should we keep it?
              ? $tag                                #   then do so
              : "";                                 #   or replace with nothing
        }
    }gex;

Peter

-- 
Peter J. Acklam - jacklam@math.uio.no - http://www.math.uio.no/~jacklam



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

Date: 26 Jul 1999 13:23:34 -0400
From: Tanvada Jagannadha <jaganna@shell.one.net>
Subject: how to pass variables(hidden) to a form
Message-Id: <379c9996@news1.one.net>

Hi,
  I am stuck with the problem of passing variables to a form. My program
consists of multiple forms where the next form is decided by the choice of
the elements in the current form. When the current form is submitted, the
perl script should access the next form keeping the variables in hte
current form as hidden. And finally all the forms data has to be written
to a file after completing the last form. So, my problem is retaining the
data in the previous forms as we move from one form to another. Please
help me in this regard. Thanks in advance.

Regards,
Jagannadha Tamvada.

-- 






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

Date: Mon, 26 Jul 1999 17:55:16 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: how to pass variables(hidden) to a form
Message-Id: <7ni7gr$43e$2@news.mch.sbs.de>

In article <379c9996@news1.one.net>, Tanvada Jagannadha <jaganna@shell.one.net> wrote:
>Hi,
>  I am stuck with the problem of passing variables to a form. My program
>consists of multiple forms where the next form is decided by the choice of
>the elements in the current form. When the current form is submitted, the
>perl script should access the next form keeping the variables in hte
>current form as hidden. And finally all the forms data has to be written
>to a file after completing the last form. So, my problem is retaining the
>data in the previous forms as we move from one form to another. Please
>help me in this regard. Thanks in advance.

1) keep the current variables as hidden in the next form :
 ..
print "<INPUT TYPE=hidden NAME=$foo VALUE=$bar>";
 ..
This could become a huge form if you have many variables to
keep.

2) keep the current variables in some persistent storage (like
a database), and only include a session ID (or cookie, bah)
in the current form. Build your own, or use some web application
platform to do it for you...

If this is not enough, please tell us in more detail what you'd need...

Michel.


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

Date: 26 Jul 1999 11:30:15 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: HTML::Parser sample
Message-Id: <slrn7pp37d.l5o.abigail@alexandra.delanet.com>

Kin Lum (kin@0011.com) wrote on MMCLV September MCMXCIII in
<URL:news:379C8535.A44F6BD6@0011.com>:
$$ to use HTML::Parser, shouldn't the following code work?
$$ it seems that the method cannot be overridden...
$$ 
$$ 
$$ #!/usr/local/bin/perl
$$ 
$$ require HTML::Parser;
$$ $p = HTML::Parser->new;  
$$ 
$$ $p->parse("<b>hi</b><i><bbb>");
$$ $p->eof;                 
$$ 
$$ sub start {
$$     print join(" ", @_), "\n";
$$ }


You have to subclass HTML::Parser. Please study perlobj.


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: Mon, 26 Jul 1999 18:39:37 +0100
From: "Paul Foran (Layout/Design)" <Paul.Foran@analog.com>
Subject: Install MSQL Module into Perl
Message-Id: <379C9D59.B3A80814@analog.com>

How do i do it with Activestate as the PPM does not work.




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

Date: Mon, 26 Jul 1999 10:56:55 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl in webpages
Message-Id: <379CA167.D82FCB57@mail.cor.epa.gov>

Anno Siegel wrote:
> 
> Kevin Pickens  <webmaster@source.findhere.com> wrote in comp.lang.perl.misc:
 [snip]
> >Is there any way to get it to work properly (i.e. refresh or load in the
> >frame without the download message)?
> 
> Just because the html is created by a Perl script doesn't mean it's
> a Perl problem.  Ask a newsgroup with perl or cgi in it's name.
                                        ^^^^
                                        html

A Freudian slip, although the naive reader may leap to an
unwarranted conclusion.  [At least TomC didn't chide you for
using it's when you meant its.  :-]

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


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

Date: Mon, 26 Jul 1999 17:52:32 GMT
From: sherifhanna@my-deja.com
Subject: Perl, FTP, and Win32 with IIS (ouch)
Message-Id: <7ni78s$o5d$1@nnrp1.deja.com>

I want to write a cgi perl script, which interfaces with IIS, that will
ftp to a remote computer, download a text file into a local directory,
and then generate an html file with a link to the downloaded file. How
do I do it?

I'm using IIS 4 on NTSP4. I'm guessing I need the Net:FTP module, but I
can't find a Win32 version (all distributions that I found require
make...that won't fly in NT; or will it?)

Sherif


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


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

Date: Mon, 26 Jul 1999 11:13:34 -0500
From: "Chao Fang" <cfang@nwu.edu>
Subject: problem size limit of perl
Message-Id: <7ni1f4$lb1@news.acns.nwu.edu>

I am trying to use a Perl script to process a text database. The main data
structure of my program is a 4-dimension associative array, which will
require about 200M of memory while running.

I am running it on a Ultra5 with Solaris. The program works extremely slow
after it processes some data and will finally hang up when data size is
larger than 100M.

Could somebody give me a point. Is the problem in the 4-dimension
associative array or Perl can not handle too many datum.

Thanks





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

Date: Mon, 26 Jul 1999 13:36:17 -0400
From: "Ethan H. Poole" <ehpoole@ingress.com>
Subject: Re: REAL: help with flock() portability
Message-Id: <379C9C91.2E2CD5B6@ingress.com>

[posted and emailed]

Stefano Ghirlanda wrote:
> 
> Hi,
> apologies for the preceeding empty message, my terminal somehow froze when
> I was posting and I didn't know what happened after.
> Here is the message:
> 
> A program that I developed under linux doesn't seem to work on Solaris.
> the offendingn code is related to file locking and reads:
> 
> sysopen PIPE, $pipe, O_RDONLY  or croak "can't open $pipe: $!";
> flock PIPE, LOCK_EX or croak "can't lock $pipe: $!";
> 
> On solaris a user gets the error:
> 
> can't lock /home/ron/.lyxpipe.out: Bad file number at
> /usr/local/lib/perl5/site_perl/5.005/LyX/Client.pm line 238

I'm just taking a wild stab here, but is it possible that an exclusive
flock() is failing because you have already opened the file in read-only
mode?

-- 
Ethan H. Poole           ****   BUSINESS   ****
ehpoole@ingress.com      ==Interact2Day, Inc.==
(personal)               http://www.interact2day.com/


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

Date: Mon, 26 Jul 1999 07:18:36 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: reg expression
Message-Id: <c6ghn7.i6i.ln@magna.metronet.com>

r j huntington (wolph@merlin.albany.net) wrote:
: Abigail (abigail@delanet.com) wrote:
: : 
: : The problem you describe is asked in variants about 37 times a day.
: : It's also a FAQ. 

: Up to there, Abigail has a useful (to the querant) thing to say...

: : Go to school, and learn to read. Then read.

: But there she degrades into gratuitous insults.

: One wonders why she does this. 


   Someone who has seen the same questions *hundreds* (that is
   meant to be literal) of times is likely to have a different
   reaction than someone who has seen the question merely a few
   times.

   Check the ~200 articles a day here for a few months, answer that
   same question a bunch of times. Maybe you cannot understand
   Abigail's position because you do not share the common experience.

   Then come back and tell us what you think.


: Can she show cause? 


   Abigail is under no obligation to spend yet more time on
   questions that have been already answered.

   Just reading the question is a waste of time.

   No sense throwing good time after bad.


: Or is she just mean?


   I suggest making a killfile entry for those whose posts you
   would rather not see.


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


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

Date: Mon, 26 Jul 1999 18:40:34 +0100
From: "Banos" <no mail please were anti spammers>
Subject: Re: Regex-ing 
Message-Id: <933010735.20052.0.nnrp-04.c2deffda@news.demon.co.uk>

This thread has reaffirmed my reluctance to embrace perl. Perl is just
cryptic 'crap'. This should surely be a simple request with a simple tried
and tested unambiguous answer by now.

There must be some alternatives!

B.

Ben Meghreblian <ben@NOSPAMcognitech.co.uk> wrote in message
news:37987D50.2939D6A9@NOSPAMcognitech.co.uk...
> I am using cgi.pm to get the values from a form, including a multi-line
> text-box.
>
> I want to replace all carriage-returns with my own delimiter.
>
> i have tried the following:-
>
> $news = s/\n/delimiter/g;
>
> but this doesn't work
>
> for testing purposes, I changed the methos of the form to GET, and
> observed that the carriage returns were encoded as follows:-
>
> ?news=This+is+the+first+line%0D%0AThis+is+the+second+line
>
> Hope you can help
>
> Cheers
>
> Ben
>




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

Date: Mon, 26 Jul 1999 13:56:14 -0400
From: toby <toby@venice.cas.utk.edu>
Subject: Re: Removing a file using activePERL on NT
Message-Id: <379CA13E.952B579B@venice.cas.utk.edu>



>
> unlink ("temp/filename.p");
>

Probably best to give the whole file path, including the drive letter.

$path_to_file =('c:\temp\filename');

#die will give you some indication why you couldn't unlink

unlink($path_to_file) or die 'No unlink: $!\n';



Toby



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

Date: 26 Jul 1999 16:14:56 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: SSI command in Perl script problem
Message-Id: <slrn7pp2g4.318.fl_aggie@thepentagon.com>

On Mon, 26 Jul 1999 16:56:28 +0200, Steven Filipowicz
<steven@*REMOVE*filipowicz.com>, in <7nhslt$gu4$1@news.worldonline.nl>
wrote:

+ I have this SSI command : 

Should I assume that you have SSI turned on? so that the following does
actually work:

+    <!--#exec cgi="/cgi-bin/countit/countit.pl/"-->

+ I want to put it into a Perl script I thought I would do it like this :
+     print "<!--#exec cgi="/cgi-bin/countit/countit.pl/"--> visits.\n";

Interesting...Illegal division by zero at - line 1. Ok, makes sense...

+ But offcourse this doesn't work so I tried : 
+     print "<!--#exec cgi=\"/cgi-bin/countit/countit.pl/\"--> visits.\n";

I got:

<!--#exec cgi="/cgi-bin/countit/countit.pl/"--> visits.

ObQuotingTip: learn and use the q||,qq||,qw|| and qx|| alternate quoting
mechanisms. Your print statement can become much cleaner looking:

  print qq|<!--#exec cgi="/cgi-bin/countit/countit.pl/"--> visits.\n|;

+ This also doesn't work.

Specify, please. "doesn't work" isn't particularly enlightening.

Ah, I see what's happening. Your program is run via the CGI interface,
yes? its output probably isn't being passed thru the parsing that will
make SSI work.

You may want to be your own parser:

@results=system '/the/real/path/to/cgi-bin/countit/countit.pl';
print "@results visits.\n";

The first runs the program just like SSI would. Do note that the
path will be different and that you have to add in the parts that
SSI automagically adds.

James


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

Date: Mon, 26 Jul 1999 19:02:00 +0200
From: Steven Filipowicz <steven@*REMOVE*filipowicz.com>
To: fl_aggie@thepentagon.com
Subject: Re: SSI command in Perl script problem
Message-Id: <933008269.10019.0.pluto.c30bf8a6@news.demon.nl>


> Ah, I see what's happening. Your program is run via the CGI interface,
> yes? 
That's correct.

>its output probably isn't being passed thru the parsing that will
> make SSI work.
> 
> You may want to be your own parser:
> 
> @results=system '/the/real/path/to/cgi-bin/countit/countit.pl';
> print "@results visits.\n";
> 
> The first runs the program just like SSI would. Do note that the
> path will be different and that you have to add in the parts that
> SSI automagically adds.


I'm not sure what you mean with 'add in the parts that SSI automatically
adds.'

I've tried this :

   @results=system
'/opt/guide/www.gebruikte-auto.com/cgi-bin/countit/countit.pl';
   print "@results visits.\n";

But doesn't work.

Any ideas?


Thanks!


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

Date: 26 Jul 1999 17:16:36 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Text File Busy (errno = 26)
Message-Id: <379c89e4@newsread3.dircon.co.uk>

Sohrab <sohrabSPAMSUX@d2c2.com> wrote:
> Hi all,
> 
> I know that there was a thread floating around in here about a user getting
> "Text File Busy" messages, but I only see a snippet of what the problem /
> solution was in deja.com.
> 
> I've got a problem that may be similar, so please excuse any repetition...
> 
> I'm running a set of perl scripts on RedHat Linux 5.1 that are locally
> accessing a Postgres database and returning info to a web page.  Pretty
> basic stuff in the scripts, nothing fancy, some CGI.pm and DBI/DBD for the
> database work.
> 
> The problem I'm having, is that every once in a while, when I try to execute
> a script from my browser (via direct URL) I get a Internal server error 500
> from the web server (apache) and the error log says:
> <begin quote>
> exec of /web/argus/www/cgi-bin/login.pl failed, reason: Text file busy
> (errno = 26)
> <end quote>
> 

intro(2) says:

     26 ETXTBSY Text file busy. The new process was a pure procedure (shared
             text) file which was open for writing by another process, or
             while the pure procedure file was being executed an open(2) call
             requested write access.

/J\
-- 
"You're blowing me off for a monkey?" - Joey, Friends


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

Date: Mon, 26 Jul 1999 12:53:16 -0400
From: "Sohrab" <sohrabSPAMSUX@d2c2.com>
Subject: Re: Text File Busy (errno = 26)
Message-Id: <5p0n3.2733$CK6.2823@client>

Hmmm,

Thanks for the pointer to the intro page, quite informative.

Unfortunately, I'm not (well, not explicitly) doing any file I/O (no open()
calls in my code).  All I do are opening database connections, executing
some SQL, writing the results to www page and closing the connection.

Is there something that is doing file I/O behind my back (in CGI/DBI/DBD) ?

Jonathan Stowe wrote in message <379c89e4@newsread3.dircon.co.uk>...

>intro(2) says:
>
>     26 ETXTBSY Text file busy. The new process was a pure procedure
(shared
>             text) file which was open for writing by another process, or
>             while the pure procedure file was being executed an open(2)
call
>             requested write access.
>
>/J\
>--
>"You're blowing me off for a monkey?" - Joey, Friends




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

Date: 26 Jul 1999 16:25:37 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Why use /s in Cookbook recipe 20.6? 
Message-Id: <379c8c01$0$214@nntp1.ba.best.com>

I was reading the Perl Cookbook's recipe 20.6, which discusses
extraction and removal of HTML tags, and was confused about something.
In the not-quite-completely-naive example (that is, the one that's one
step up from

% perl -pe 's/<[^>]*>//g' file

), it gives this:

{
    local $/;       # temporary whole-file input mode
    $html = <FILE>;
    $html =~ s/<[^>]*>//gs;
}

My question is, why is the /s modifier there? My understanding is that
that only affects the behavior of . (making it match a newline).
Doesn't the negated character class [^>] match \n without the /s
modifier? It seems to in the following example I just tried:

#!/usr/bin/perl

$string =<<EndOfText;
This is my string
<IMG SRC="something.gif"
ALT="something">
This is the end of my string
EndOfText

$string =~ s/<img\s[^>]+>//gi;

print "string is '$string'\n";

which prints out:

string is 'This is my string

This is the end of my string
'

Am I missing something obvious here? Is it maybe just a stylistic
thing, a clue for the reader of the code that the expression is
expected to match across multiple lines, rather than something that's
strictly necessary from perl's point of view?

-- 
John Callender
jbc@west.net
http://www.west.net/~jbc/


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

Date: Mon, 26 Jul 1999 10:43:21 -0700
From: "Drew Gainor" <newsgrp@agnetworks.com>
Subject: win32 FormMail.pl and DevMail 405 error
Message-Id: <7ni6t7$s46$1@remarQ.com>

I installed FormMail.pl in a cgi-bin directory on a virtual website on and
NT server. I copied and registered DevMail in the system32 directory.
Everything worked fine. I moved the FormMail.pl to another cgi-bin directory
in another virtual website and now I get 404 Method Not Supported. Anyone
have any ideas?




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

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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 261
*************************************


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