[13676] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1086 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 15 17:10:47 1999

Date: Fri, 15 Oct 1999 14:10:34 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <940021834-v9-i1086@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 15 Oct 1999     Volume: 9 Number: 1086

Today's topics:
    Re: Help weird html with CGI.pm and Ispell.pm <scott_beck@my-deja.com>
    Re: Help with extracting a portion of a string <ltl@rgsun5.viasystems.com>
    Re: Help with extracting a portion of a string (Tad McClellan)
    Re: Help with extracting a portion of a string (Craig Berry)
    Re: Help with extracting a portion of a string (Abigail)
    Re: Help with extracting a portion of a string (Larry Rosler)
        help, im a perl dummy (Max)
    Re: help, im a perl dummy <AgitatorsBand@yahoo.com>
    Re: help, im a perl dummy (Craig Berry)
    Re: help, im a perl dummy <sumengen@hotelspectra.com>
    Re: help, im a perl dummy (Craig Berry)
    Re: how does her butt taste? <grrr@grrr.net>
    Re: How to resize a web browser <jeff@vpservices.com>
    Re: How to resize a web browser <aaron@aaronpropst.com>
    Re: How to resize a web browser <aaron@aaronpropst.com>
        ied/fep in perl? kommu@hotmail.com
    Re: maybe FAQ: web link consistency checker in perl wan <rootbeer@redcat.com>
        Memory and modules <dwb1@home.com>
    Re: Memory and modules <uri@sysarch.com>
    Re: Memory and modules <david@gigawatt.com>
    Re: Memory and modules <uri@sysarch.com>
    Re: Memory and modules (Abigail)
    Re: Memory and modules (Abigail)
    Re: Memory and modules <uri@sysarch.com>
        Need Help with Regular ExpressionS!!!!!!!!! krun@my-deja.com
    Re: Need Help with Regular ExpressionS!!!!!!!!! <sumengen@hotelspectra.com>
    Re: Need Help with Regular ExpressionS!!!!!!!!! (Craig Berry)
    Re: Need Help with Regular ExpressionS!!!!!!!!! <msalter@bestweb.net>
    Re: Newbie question about time (Larry Rosler)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 15 Oct 1999 17:43:53 GMT
From: Scott Beck <scott_beck@my-deja.com>
Subject: Re: Help weird html with CGI.pm and Ispell.pm
Message-Id: <7u7p4l$sn2$1@nnrp1.deja.com>

In article <3805e92c.769715632@news.ford.com>,
  cpierce1@ford.com (Clinton Pierce) wrote:
> [poster cc'd in e-mail]
>
> On Thu, 14 Oct 1999 11:28:07 GMT, Scott Beck <scott_beck@my-deja.com>
> wrote:
> >I can't seem to figure this out.
> >My complete header on my script is
> >being printed twice.
> >REALLY WEIRD!
>
> Heh.  Nah, not really.
>
> >When I call Text::Ispell::spellcheck.
>
> Does Text::Ispell use the external program "spell" or "ispell"? I
don't
> have that one installed, so I couldn't tell ya.  From the name, I'd
guess
> so.
>

Yes it uses ispell. Do you know of a more portable altenative to this?
<CLIP>
>
> $|=1;    # Insert one of these right here.

<CLIP>

>
> I think what's biting you is buffering.  Your headers, and the
start_html
> stuff are still sitting in a buffer waiting to go out when
Text::Ispell
> does a fork() in order to run "ispell".  When that fork() happens,
both
> your program, and the fork()'d program have a copy of the headers in a
> buffer waiting to go out.[1]
>
> When ispell writes enough, or exits, that buffer flushes and you get
to
> copies of the header.
>
> Putting $|=1 causes an auto-flush to happen after every print in your
> program.  That way, when the fork() happens, the buffer is empty.
>
> [1] It's not really a bug, it's expected behaviour.  However, I think
the
> upcoming 5.6 release of Perl is supposed to flush waiting buffers
before
> the fork() automagically so it doesn't trap unsuspecting programmers
like
> yourself.  :)
>

I should have realized all this and probably would have if I had slept
in the last 3 days when I made this post.

When I looked at it again today I realized my mistake after having some
sleep. ahh sleep what a great thing.
Thanks for your answer though.
Do you happen to know of a more portable way to spell check?
I know Ispell is not install on every computer.
Maybe there is somthing I can install locally that would do it?

> --
> Clinton A. Pierce       "If you rush a Miracle Man, you get rotten
> clintp@geeksalad.org        Miracles."  -- Miracle Max, The Princess
Bride
> http://www.geeksalad.org
>

--
Thanks
Scott Beck


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


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

Date: 15 Oct 1999 18:30:48 GMT
From: lt lindley <ltl@rgsun5.viasystems.com>
Subject: Re: Help with extracting a portion of a string
Message-Id: <7u7rso$nqi$1@rguxd.viasystems.com>

Eric The Read <emschwar@rmi.net> wrote:

:>Well, to be fair, Perl's regexes aren't "regular expressions" in the
:>formal sense of the word.  ISTR Ilya saying that, with some of the new
:>features in the regex engine, it *might* be possible to parse HTML with
:>them.

He went further than that.  He said that a "parser" would just
construct a re that you would then apply as if you knew what it was
doing.  It was followed by a smiley face, but I think he was serious.


-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Fri, 15 Oct 1999 10:45:57 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with extracting a portion of a string
Message-Id: <5ne7u7.4v5.ln@magna.metronet.com>

Brandon (pooka@cygnus.ucdavis.edu) wrote:

: but HTML does _not_ need to be parsed to get the comments.


   Yes it does.


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


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

Date: Fri, 15 Oct 1999 20:10:24 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Help with extracting a portion of a string
Message-Id: <s0f2hgokr0178@corp.supernews.com>

Tad McClellan (tadmc@metronet.com) wrote:
: Brandon (pooka@cygnus.ucdavis.edu) wrote:
: 
: : but HTML does _not_ need to be parsed to get the comments.
: 
:    Yes it does.

Attempt to clarify:

Doing just about anything to arbitrary hunks of HTML (pulling comments,
removing tags, finding links, whatever) requires parsing in the general
case.  A pure regex in the CS sense of the term definitely can't handle
this job; if Perl's extended "regexes" can, that just means they've turned
into a programming language sufficiently rich that a parser may be
implemented in it. 

On the other hand, for non-arbitrary hunks of HTML -- cases where you
control the details of what's found in the files, or can with high
confidence predict what subset of potential syntax will be used, and are
willing to accept the possibility of occasional failures -- you can use
regexes to process HTML.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: 15 Oct 1999 15:39:11 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Help with extracting a portion of a string
Message-Id: <slrn80f46t.q8s.abigail@alexandra.delanet.com>

Samuel Kilchenmann (skilchen@swissonline.ch) wrote on MMCCXXXVI September
MCMXCIII in <URL:news:9mFN3.24505$m4.89682581@news.magma.ca>:
** Abigail <abigail@delanet.com> wrote in:
** news:slrn80dspo.q8s.abigail@alexandra.delanet.com...
** >
** > That description isn't complete. This is from the SGML production
** > rules:
** >
** Thanks a lot for the very interesting followup. But how do you know that
** the cited description is incomplete? Isn't this more restrictive
** definition of the allowed HTML comment syntax intended, because "nobody"
** cared to implement the full SGML comments definition in the past?

How can HTML be an SGML application, if it doesn't confirm to SGML?
And if HTML is no longer an SGML application, the HTML definition would
need a clearly defined syntax; but all there is is the DTD, implying
HTML is an SGML application.

And besides, why would HTML 4.0 not want to be backwards compatible
with earlier versions when it comes to a commonly used construct
like comments?

** An even more restrictive syntax for comments was defined (proposed?) for
** XML, see http://www.w3.org/TR/REC-xml:
**   2.5 Comments
**   Comments may appear anywhere in a document outside other markup; in
**   addition, they may appear within the document type declaration at
**   places allowed by the grammar. They are not part of the document's
**   character data; an XML processor may, but need not, make it possible
**   for an application to retrieve the text of comments. For
**   compatibility, the string "--" (double-hyphen) must not occur
**   within comments.
** 
**   Comments
**   [15]  Comment ::=  '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
** 
** What would you say about an XML processoe implementing this definition
** instead of the full SGML comments definition? Luser?

And not being allowed to put comments in your DTD, except for a comment
declaration? Not a good thing, I would say.



Abigail
-- 
sub J::FETCH{Just   }$_.='print+"@{[map';sub J::TIESCALAR{bless\my$J,J}
sub A::FETCH{Another}$_.='{tie my($x),$';sub A::TIESCALAR{bless\my$A,A}
sub P::FETCH{Perl   }$_.='_;$x}qw/J A P';sub P::TIESCALAR{bless\my$P,P}
sub H::FETCH{Hacker }$_.=' H/]}\n"';eval;sub H::TIESCALAR{bless\my$H,H}


  -----------== 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, 15 Oct 1999 13:55:04 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Help with extracting a portion of a string
Message-Id: <MPG.1271348452915f5a98a09a@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <slrn80dlkm.ir2.sholden@pgrad.cs.usyd.edu.au> on 15 Oct 1999 
07:24:06 GMT, Sam Holden <sholden@pgrad.cs.usyd.edu.au> says...
> On Fri, 15 Oct 1999 07:15:07 GMT, sumengen@my-deja.com wrote:
> >Hi,
> >Yours doesn't work if there are more than one comments in the html file.
> >Will this work?
> >$html =~ m/(<!--[^(-->)]*-->)/g;
> 
> That does not do what you think it does. [^(-->)] matches any character except
> for (,-,> and ). Comments are allowed to contain those characters...

Wrong!  It matches any character except these:  ( ) * + , - >

Think about it...  :-)

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


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

Date: Fri, 15 Oct 1999 19:52:19 GMT
From: nihilist@kenobiz.com (Max)
Subject: help, im a perl dummy
Message-Id: <3807857b.242485853@news.acronet.net>

ok, how do i make perl round a number the tenths decimal place?


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

Date: Fri, 15 Oct 1999 20:11:45 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: help, im a perl dummy
Message-Id: <5ULN3.85$LR3.14264@news.shore.net>

Max <nihilist@kenobiz.com> wrote:
: ok, how do i make perl round a number the tenths decimal place?

Use printf or sprintf.

--Art

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


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

Date: Fri, 15 Oct 1999 20:20:03 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: help, im a perl dummy
Message-Id: <s0f33jncr0181@corp.supernews.com>

Max (nihilist@kenobiz.com) wrote:
: ok, how do i make perl round a number the tenths decimal place?

perldoc -f sprintf.  There's also a faq entry on this.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Fri, 15 Oct 1999 13:26:48 -0700
From: "Baris Sumengen" <sumengen@hotelspectra.com>
Subject: Re: help, im a perl dummy
Message-Id: <7u82ng$6q9$1@bgtnsc01.worldnet.att.net>

Does printf round?
baris.




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

Date: Fri, 15 Oct 1999 20:58:34 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: help, im a perl dummy
Message-Id: <s0f5bqq9r0173@corp.supernews.com>

Baris Sumengen (sumengen@hotelspectra.com) wrote:
: Does printf round?

Yes.  Observe:

  $_ = 3.141592654;

  foreach $prec (0..9) {
    printf "%.${prec}f\n", $_;
  }

Output:

3
3.1
3.14
3.142
3.1416
3.14159
3.141593
3.1415927
3.14159265
3.141592654

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Fri, 15 Oct 1999 12:50:42 -0700
From: Grrr <grrr@grrr.net>
Subject: Re: how does her butt taste?
Message-Id: <38078591.E5ED85CB@grrr.net>

George Jempty wrote:

> If I'm in their killfile I probably didn't want to hear any of their BS
> anyway but thanks anyway

and, earlier,

> Sure, I've violated all sorts of protocol with this thread, but I sometimes
do that just to get a reaction.


Don't expect any knowledgable person to help you in the least.

--
www.grrr.net



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

Date: 15 Oct 1999 17:36:58 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: How to resize a web browser
Message-Id: <380765EE.C8E47F9C@vpservices.com>

Paul D wrote:
> 
> Seems to be a lot of inconsiderate twits in this group who refuse
> to help anyone unless the question is only, absolutely, nothing BUT
> Perl related. 

Well since this is a group where people who know perl but not
necessarily anything else hang out, it is both dangerous and rude to ask
questions about other things, see below for some examples.

> Someone here suggested you use javascript. ...
> I haven't done anything really with JS.. but it certainly doesn't look 
> much at all different from Perl. ...

Ok, here's the real reason we don't encourage javascript questions in
the Perl newsgroup:  you gave a javascript answer admitting you don't
really know anything about javascript, so there is a possibility you are
wrong in your suggestion.  If you made that suggestion in a javascript
newsgroup, someone who knows javascript could correct you and all three
of you would learn something.  But here in the Perl newsgroup, there may
or may not be anyone that knows or cares about javascript so your
potentially wrong answer may or may not get scrutinized, much less
corrected.  This is a ready-made blind-leading-the-blind way to go about
things.  Do you want to ask your doctor about why your car isn't
working, or your mechanic about why you have migraines?

So that is why it is *dangerous* to ask questions about one language or
protocol in a newsgroup about something else.

I usually browse through about 2-300 newsgroup messages a day.  If I
wanted to read about javascript I would go to a javascript newsgroup.  I
don't, so why should I be forced to read about it in a Perl newsgroup? 
That is why it is *rude* to post questions about one language or
protocol in a newsgroup about something else.

-- 
Jeff


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

Date: Fri, 15 Oct 1999 12:55:09 -0600
From: "Aaron Propst" <aaron@aaronpropst.com>
Subject: Re: How to resize a web browser
Message-Id: <7u7t93$11dk@yuma.ACNS.ColoState.EDU>

we're not going in depth on how to do it in javascript.... we're only
pointing Mu Shan in the right direction... perl is the wrong language to go
trying to resize a browser.. javascript is the right one.  that's all there
is to it.  I think i do know a bit about javascript.. and i've created some
rather powerful apps by combining languages.

aaron



Jeff Zucker <jeff@vpservices.com> wrote in message
news:380765EE.C8E47F9C@vpservices.com...
> Paul D wrote:
> >
> > Seems to be a lot of inconsiderate twits in this group who refuse
> > to help anyone unless the question is only, absolutely, nothing BUT
> > Perl related.
>
> Well since this is a group where people who know perl but not
> necessarily anything else hang out, it is both dangerous and rude to ask
> questions about other things, see below for some examples.
>
> > Someone here suggested you use javascript. ...
> > I haven't done anything really with JS.. but it certainly doesn't look
> > much at all different from Perl. ...
>
> Ok, here's the real reason we don't encourage javascript questions in
> the Perl newsgroup:  you gave a javascript answer admitting you don't
> really know anything about javascript, so there is a possibility you are
> wrong in your suggestion.  If you made that suggestion in a javascript
> newsgroup, someone who knows javascript could correct you and all three
> of you would learn something.  But here in the Perl newsgroup, there may
> or may not be anyone that knows or cares about javascript so your
> potentially wrong answer may or may not get scrutinized, much less
> corrected.  This is a ready-made blind-leading-the-blind way to go about
> things.  Do you want to ask your doctor about why your car isn't
> working, or your mechanic about why you have migraines?
>
> So that is why it is *dangerous* to ask questions about one language or
> protocol in a newsgroup about something else.
>
> I usually browse through about 2-300 newsgroup messages a day.  If I
> wanted to read about javascript I would go to a javascript newsgroup.  I
> don't, so why should I be forced to read about it in a Perl newsgroup?
> That is why it is *rude* to post questions about one language or
> protocol in a newsgroup about something else.
>
> --
> Jeff




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

Date: Fri, 15 Oct 1999 13:02:36 -0600
From: "Aaron Propst" <aaron@aaronpropst.com>
Subject: Re: How to resize a web browser
Message-Id: <7u7tn2$3se2@yuma.ACNS.ColoState.EDU>

paul,
i have done this kind of web application, and the combination of client side
and server side programming makes for a pretty smart app.  I would highly
recommend combining both languages.   In my case, i used Javascript to
create a help application for a perl app,  I used perl to do form handling,
and used the javascript to direct users in it's use.  it's really handy when
you've written a web app that can do everything.. but your technophobic
users don't know how to use it.
aaron

> Someone here suggested you use javascript. That will work. BUT.. what
> also should have been said (if it ain't obvious) is that you can
> drive that javascript out of Perl. Use your perl program to write
> the javascript to the client side as you need it to be. I haven't done
> anything really with JS.. but it certainly doesn't look much at all
> different from Perl. So you will have significant power here.. you
> can write your script to be selective to the very browser type and
> to the size of the window you want with just a few if's and elses's





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

Date: Fri, 15 Oct 1999 18:08:01 GMT
From: kommu@hotmail.com
Subject: ied/fep in perl?
Message-Id: <7u7qhm$tnp$1@nnrp1.deja.com>

Hi,

Do we have the ied tool (which is available on HP-UX) in perl? THere
is a free version of it called fep, but the source code is not at all
portable.

I'm looking for a way to control interactive programs like bc, ftp or
crash. I want to add history and such features to these programs.
That's what exactly ied does. Is there a way I can implement this in
perl? Are there any pseudo tty modules?

thanks!
kommu


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


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

Date: Fri, 15 Oct 1999 13:55:12 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: maybe FAQ: web link consistency checker in perl wanted
Message-Id: <Pine.GSO.4.10.9910151354110.25558-100000@user2.teleport.com>

On 14 Oct 1999, Peter Galbavy wrote:

> Subject: maybe FAQ: web link consistency checker in perl wanted

> Can someone point me in a direction or refer me to some code that
> would help ?

    http://www.stonehenge.com/merlyn/WebTechniques/

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 15 Oct 1999 17:48:15 GMT
From: "Daniel W. Burke" <dwb1@home.com>
Subject: Memory and modules
Message-Id: <Pine.LNX.4.10.9910151235120.3246-100000@cc569157-a.warn1.mi.home.com>



How are modules compiled into memory?  Meaning, is perl able to determine
that a module has already been compiled once, and not do it again?

I.e.:  Module1 uses Module2.  The main script uses Module1 and Module2.
Will Module2 get compiled twice, or just once?

I could come up with a lot more complicated examples, but I think this
is enough to get the idea o fmy question.

Dan.




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

Date: 15 Oct 1999 14:06:02 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Memory and modules
Message-Id: <x74sfsijn9.fsf@home.sysarch.com>

>>>>> "DWB" == Daniel W Burke <dwb1@home.com> writes:

  DWB> How are modules compiled into memory?  Meaning, is perl able to
  DWB> determine that a module has already been compiled once, and not
  DWB> do it again?

  DWB> I.e.: Module1 uses Module2.  The main script uses Module1 and
  DWB> Module2.  Will Module2 get compiled twice, or just once?

read perlvar. look for @INC and %INC.
read perlfunc. look for require and use.

uri

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


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

Date: Fri, 15 Oct 1999 14:21:37 -0400
From: "Dave Kaufman" <david@gigawatt.com>
Subject: Re: Memory and modules
Message-Id: <TgKN3.759$25.32106@nntp1>

Daniel W. Burke ...
 ...is perl able to determine
> that a module has already been compiled once, and not do it again?

yes, if you "use" the module, rather than "require" -ing it

-dave




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

Date: 15 Oct 1999 14:38:15 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Memory and modules
Message-Id: <x7wvsoh3l4.fsf@home.sysarch.com>

>>>>> "DK" == Dave Kaufman <david@gigawatt.com> writes:

  DK> Daniel W. Burke ...
  DK> ...is perl able to determine
  >> that a module has already been compiled once, and not do it again?

  DK> yes, if you "use" the module, rather than "require" -ing it

wrong. perldoc -f require.

uri

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


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

Date: 15 Oct 1999 15:43:56 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Memory and modules
Message-Id: <slrn80f4fq.q8s.abigail@alexandra.delanet.com>

Daniel W. Burke (dwb1@home.com) wrote on MMCCXXXVI September MCMXCIII in
<URL:news:Pine.LNX.4.10.9910151235120.3246-100000@cc569157-a.warn1.mi.home.com>:
!! 
!! How are modules compiled into memory?  Meaning, is perl able to determine
!! that a module has already been compiled once, and not do it again?

Yes. See the description of %INC.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== 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: 15 Oct 1999 15:44:30 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Memory and modules
Message-Id: <slrn80f4gs.q8s.abigail@alexandra.delanet.com>

Dave Kaufman (david@gigawatt.com) wrote on MMCCXXXVI September MCMXCIII
in <URL:news:TgKN3.759$25.32106@nntp1>:
-- Daniel W. Burke ...
-- ...is perl able to determine
-- > that a module has already been compiled once, and not do it again?
--
-- yes, if you "use" the module, rather than "require" -ing it


No. The same is true for requiring it.



Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


  -----------== 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: 15 Oct 1999 16:55:09 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Memory and modules
Message-Id: <x7oge0gx8y.fsf@home.sysarch.com>

>>>>> "A" == Abigail  <abigail@delanet.com> writes:

  A> !! How are modules compiled into memory?  Meaning, is perl able to
  A> determine !! that a module has already been compiled once, and not
  A> do it again?

  A> Yes. See the description of %INC.

  A> -- ...is perl able to determine -- > that a module has already been
  A> compiled once, and not do it again?  --

  A> -- yes, if you "use" the module, rather than "require" -ing it

  A> No. The same is true for requiring it.

just to point out to abigail's fan club, she posted two polite, correct,
and to the point followups. in both cases the original problem was not
answered in the FAQ and not easily found in the docs without a
pointer. no simple RTFM was sent.

so to her fans, get off your holier than thou attitudes and answer some
stupid questions yourselves instead of blowing electrons up this group's
butt. you rarely see a perl reply (especially a correct one) from anyone
who comments on abigail.

as for those who are afraid to post here because of her, get a
backbone. learn to read the docs before posting. ask clear and concise
questions. more likely than not, abigail and the other regulars will
help you out.

uri

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


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

Date: Fri, 15 Oct 1999 20:03:09 GMT
From: krun@my-deja.com
Subject: Need Help with Regular ExpressionS!!!!!!!!!
Message-Id: <7u819j$36m$1@nnrp1.deja.com>

How can I parse out everything but the last dir. from a path? For
example I have the following in an array:

 .\alpha\prod\debug\exe\extsw\MedCom_src
 .\alpha\prod\debug\exe\extsw\MedCom_src\AT
 .\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain
 .\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain\src
 .\alpha\prod\debug\exe\extsw\MedCom_src\AT\gmaincompmfc

How would I get:

 .\alpha\prod\debug\exe\extsw
 .\alpha\prod\debug\exe\extsw\MedCom_src
 .\alpha\prod\debug\exe\extsw\MedCom_src\AT
 .\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain
 .\alpha\prod\debug\exe\extsw\MedCom_src\AT


into a different array? Thank you

Krun


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


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

Date: Fri, 15 Oct 1999 13:21:14 -0700
From: "Baris Sumengen" <sumengen@hotelspectra.com>
Subject: Re: Need Help with Regular ExpressionS!!!!!!!!!
Message-Id: <7u82df$5o9$1@bgtnsc01.worldnet.att.net>

foreach $dir (@dirs){
    $dir =~ s/\\[^\\]*$//;
    push(@outdirs, $dir);
}

Baris Sumengen.

<krun@my-deja.com> wrote in message news:7u819j$36m$1@nnrp1.deja.com...
> How can I parse out everything but the last dir. from a path? For
> example I have the following in an array:
>
> .\alpha\prod\debug\exe\extsw\MedCom_src
> .\alpha\prod\debug\exe\extsw\MedCom_src\AT
> .\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain
> .\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain\src
> .\alpha\prod\debug\exe\extsw\MedCom_src\AT\gmaincompmfc
>
> How would I get:
>
> .\alpha\prod\debug\exe\extsw
> .\alpha\prod\debug\exe\extsw\MedCom_src
> .\alpha\prod\debug\exe\extsw\MedCom_src\AT
> .\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain
> .\alpha\prod\debug\exe\extsw\MedCom_src\AT
>
>
> into a different array? Thank you
>
> Krun
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.




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

Date: Fri, 15 Oct 1999 20:40:40 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Need Help with Regular ExpressionS!!!!!!!!!
Message-Id: <s0f4a8bhr0149@corp.supernews.com>

krun@my-deja.com wrote:
: How can I parse out everything but the last dir. from a path? For
: example I have the following in an array:
: 
: .\alpha\prod\debug\exe\extsw\MedCom_src
[snip]
: 
: How would I get:
: 
: .\alpha\prod\debug\exe\extsw
[snip]

One way:

  foreach (@trunc = @dirs) { s/(.*)\\.*/$1/; }

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Fri, 15 Oct 1999 20:58:58 GMT
From: Mike Salter <msalter@bestweb.net>
Subject: Re: Need Help with Regular ExpressionS!!!!!!!!!
Message-Id: <Pine.BSF.4.05.9910151655070.7293-100000@monet.bestweb.net>


On Fri, 15 Oct 1999 krun@my-deja.com wrote:

>How can I parse out everything but the last dir. from a path? For
>example I have the following in an array:
>
>.\alpha\prod\debug\exe\extsw\MedCom_src
>.\alpha\prod\debug\exe\extsw\MedCom_src\AT
>.\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain
>.\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain\src
>.\alpha\prod\debug\exe\extsw\MedCom_src\AT\gmaincompmfc
>
>How would I get:
>
>.\alpha\prod\debug\exe\extsw
>.\alpha\prod\debug\exe\extsw\MedCom_src
>.\alpha\prod\debug\exe\extsw\MedCom_src\AT
>.\alpha\prod\debug\exe\extsw\MedCom_src\AT\genericmain
>.\alpha\prod\debug\exe\extsw\MedCom_src\AT

Is this a homework assignment - it looks familiar.

Ok, try this:

 @result = map {$1 if (/(.+)\\/)}  @list;

mike@deja.vu



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

Date: Fri, 15 Oct 1999 12:22:41 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Newbie question about time
Message-Id: <MPG.12711eddf74d868098a098@nntp.hpl.hp.com>

In article <slrn80eeij.qim.mgjv@wobbie.heliotrope.home> on 15 Oct 1999 
14:28:50 GMT, Martien Verbruggen <mgjv@wobbie.heliotrope.home> says...
> On Fri, 15 Oct 1999 16:14:19 +0200,
> 	Gizzzmo <Gizzzmo@pandora.be> wrote:
> > Can anyone tell me how to write a script that controls if a given date for
> > example 15/10/1999 (day/month/year)
> > is older (for example 4 months) than the current time?
> 
> You get the module Date::Manip or Date::Calc from CPAN:

Unless you insist on an accurate specification of '4 months', this is 
significant overkill.  You can use a module that is part of the standard 
perl distribution, Time::Local.


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

$_ = '15/10/1999';

my ($day, $month, $year) = split m#/#;

my $time = timelocal(0, 0, 0, $day, $month - 1, $year - 1900);

$time -= 5 * 30 * 24 * 60 * 60;  # '5 months' ago (or so :-).

print "Older\n" if time - $time > 4 * 30 * 24 * 60 * 60;

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


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

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


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


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