[13554] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 964 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 1 13:07:09 1999

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

Perl-Users Digest           Fri, 1 Oct 1999     Volume: 9 Number: 964

Today's topics:
        ANNOUNCEMENT: first meeting of Boulder.pm (Walter Pienciak)
    Re: Bug in Perl 5.0? or something to do with RegExp <gellyfish@gellyfish.com>
    Re: Bye Tom? (WAS: Re: injecting "my" varibales into ca <aqumsieh@matrox.com>
    Re: Calling Gunzip (Gzip) from Perl (Eisen Chao)
    Re: Can perl create an excel file (Scott McMahan)
    Re: CGI call CGI? <sariq@texas.net>
    Re: cgi output to browser - store info in variable firs (Michel Dalle)
        cgi output to browser - store info in variable first? <diane@dmswebsupport.com>
    Re: counting problem <dwozmak@rational.com>
        CPAN support programs for PC? <walsh@averstar.com>
    Re: CPAN support programs for PC? <gellyfish@gellyfish.com>
        GDBM and PERL gammo@my-deja.com
    Re: Hashes w/multiple values per key (Perl Cookbook) <R kandeb@my-deja.com
    Re: Help with this Crazy script! <aqumsieh@matrox.com>
    Re: Help with this Crazy script! <ltl@rgsun5.viasystems.com>
    Re: Help with this Crazy script! <spowell@usurf.com>
    Re: HELP! Is the "seek" command Win32 Only? (Bill Moseley)
        How can I add an additional search path via perl <donsimon@home.com>
    Re: How can I add an additional search path via perl <gellyfish@gellyfish.com>
    Re: How can I add an additional search path via perl <donsimon@home.com>
    Re: How to list values of all variables during program  <elaine@chaos.wustl.edu>
    Re: Install CPAN module in ActiveState Windows version  (Bill Moseley)
    Re: Line-wrap <dwozmak@rational.com>
    Re: Line-wrap <dwozmak@rational.com>
    Re: multi dimensional array's <ask_for_my_address_if_you_need_it@earthlink.net>
    Re: Perl Debugger <sushant@ntwrks.com>
    Re: Perl Debugger <vrii@tpo.fi>
    Re: ping script to page mobile... <elaine@chaos.wustl.edu>
    Re: Proble with chopped filenames from script <picaza@chsi.com>
    Re: Problem with list! <ask_for_my_address_if_you_need_it@earthlink.net>
    Re: RegEx for html->plain text <sushant@ntwrks.com>
    Re: RegEx for html->plain text <gellyfish@gellyfish.com>
    Re: Ton NOT Tom? was(Re: Bye Tom? (WAS: Re: injecting " <jll@enterprise.newedgeconcept>
    Re: Web Site duplicator <elaine@chaos.wustl.edu>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 01 Oct 1999 16:38:21 GMT
From: walter@io.frii.com (Walter Pienciak)
Subject: ANNOUNCEMENT: first meeting of Boulder.pm
Message-Id: <1s5J3.399$ffd.188572160@news.frii.net>

The first meeting of Boulder.pm will be held at Casa Alvarez 
(30th and Walnut), Wednesday 6 October, from 6:00 PM to whenever.

All are welcome.  Tell your friends, neighbors . . . If you're
planning on coming, it would be nice to send a quick e-mail
to walter@frii.com, so we know how many tables to reserve.
(It's not required, though -- just helpful.)

If you want to find out more about Perl, or just hang out with
like-minded individuals (programmers, sysadmins, technically
inclined webmasters, and the like), put it on your calendar and
come on down!

Our website is at http://boulder.pm.org/

Walter



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

Date: 1 Oct 1999 17:15:00 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Bug in Perl 5.0? or something to do with RegExp
Message-Id: <37f4de04_1@newsread3.dircon.co.uk>

Larry Rosler <lr@hpl.hp.com> wrote:
> In article <7t0qvp$qmu$1@nnrp1.deja.com> on Thu, 30 Sep 1999 23:16:19 
> GMT, alex_rayan@my-deja.com <alex_rayan@my-deja.com> says...
> ...
>> if ($mode =~ /c|a/gi and $c_over==0){
> ...
>> if ($mode =~/d|a/gi and $d_over ==0){
> ...
>> Anything else I'm missing in this script ? or perl cant handle matching
>> like this????
> 
> You are very impatient indeed.  You posted essentially the same question 
> twice within an hour.  Had you waited just a bit, you would have seen 
> the three cogent answers that have already appeared.
> 
> Usenet isn't an instant-response help desk.  That usually costs lots of 
> money.
> 

He also posted a 'bug report' to p5p of course ...

/J\
-- 
"Pat was wondering if he could put his massive tool in my box" - Mrs
Doyle, Father Ted


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

Date: Fri, 1 Oct 1999 10:47:57 -0400 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Bye Tom? (WAS: Re: injecting "my" varibales into callers scope)
Message-Id: <x3yyadnt9wi.fsf@tigre.matrox.com>


Scratchie <AgitatorsBand@yahoo.com> writes:
> Ala Qumsieh <aqumsieh@matrox.com> wrote:
> : Then perhaps you shouldn't be consulting perldoc or any of the on-line
> : perl docs and FAQs. You shouldn't be reading the Llama either, or the
> : Camel, and certainly not the Ram. You shouldn't be reading the
> : FMTEYEWTK series and shouldn't download the PPT.
> 
> : Actually, you shouldn't be using Perl at all.
> 
> What are you implying? That because Tom has contributed a lot of work to
> the perl community that we should pretend that he isn't a condescending
> jerk when he posts?

Do your homework. Tom is only a "condescending jerk" to those who
don't appreciate the long hours he put in making Perl more accessible
to everyone. Those people seem to be saying "your time is not
important to us. Our time is valuable. Now tell us what the FAQs say
because we are too damn lazy to read it ourselves."

People that know better deserve better. And Tom has posted many a good
reply in this newsgroup. Why is everybody forgetting the positive
sides of Tom, and concentrating on his negative side?

No one is perfect, you know. Except, maybe, the ignorant.

--Ala



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

Date: Fri, 01 Oct 1999 16:34:41 GMT
From: echao@interaccess.com (Eisen Chao)
Subject: Re: Calling Gunzip (Gzip) from Perl
Message-Id: <rv9ol13k3i539@corp.supernews.com>

brad@quicomm.com wrote:
: Has anyone successfully been able to use gzip in a Perl script called
: from a browser?  If so, details are much appreciated.
: 

  As always the "Perl Cookbook" has 'an' answer
  (versus THE answer):

  @ARGV = map { /\.(gz|Z)$/ ? "gzip -dc $_ |" : $_ } @ARGV;
  while (<>) {
      # ......
  }


  I continue to be amazed at how succinct, yet elegent,
  this Perl language-thingie is....


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

Date: Fri, 01 Oct 1999 17:04:43 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: Can perl create an excel file
Message-Id: <LQ5J3.664$QE1.41029@newshog.newsread.com>

Seth David Johnson (sjohns17@uic.edu) wrote:
> On Fri, 1 Oct 1999, AcCeSsDeNiEd wrote:

> > Go check out the Win32::ODBC or DBD::ODBC modules
> > 
> > You need to make use of the ODBC (Open Database Conectivity) in Win32.

> 1. What does this have to do with creating an excel file?
> 2. Could be wrong as I don't use MSOffice, but doesn't Excel deal strictly
> with "static" files, and not open databases?

The easiest way to create an Excel file is through ODBC, using the
Excel driver. It is non-relational, but you can still create a DSN
and throw rows into it. The harder way is with Win32::OLE Automation,
which requires knowledge of Excel's object model. Another hard way is
to create a CSV file, which is easy, and use Automation to import it.

It is impossible (or so hard as not to make any difference) to create an
Excel file directly, using open and print, because they're COM storages,
not real files. You must use the COM subsystem to write them. You'd have
to reverse engineer COM's storage format, which could change at whim.

Scott

http://autoperl.skwc.com Automating Windows With Perl


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

Date: Fri, 01 Oct 1999 09:48:32 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: CGI call CGI?
Message-Id: <37F4C9C0.C16CC157@texas.net>

David Amann wrote:
> 
> Hi Alan,
> 
> "Alan J. Flavell" wrote:
> 
> > Another approach that can be recommended is to work your way through
> > Merlyn's Web Techniques columns attentively.
> 
> Where are Merlyn's Web Techniques articles? (Who is Merlyn? Randall

That's Randal.

> Schwartz?)
> 

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

- Tom


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

Date: Fri, 01 Oct 1999 16:56:20 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: cgi output to browser - store info in variable first? - off-topic
Message-Id: <7t2pat$71l$1@news.mch.sbs.de>

In article <by5J3.1675$Tg3.245407@news.sgi.net>, "Diane Strahl" <diane@dmswebsupport.com> wrote:
>When using a cgi to grab info from a database based on user input, is it
>better, and why, to write the info to a variable and add to this variable
>with ".=" until all info is gathered, then print the variable, or to print
>the info as it is gathered; ie
[snip]
>The response could be several pages long.
>

Better for who(m) or what ? If you have a lengthy process, where output is
generated during the whole process, it might be better (for the guy in front
of the browser) to print the output as you go.

If you correctly set STDOUT to unbuffered, and the webserver does send
back data (somewhat) unbuffered, and your browser does not wait until the
end of a table to display what it receives, etc., you may see your data arrive
in the browser as it is generated.

There may be several reasons for wanting to store the results in a variable
first, e.g. you want to keep them, or change them all before sending them
to the browser, ... 

Check comp.infosystems.www.authoring.cgi for more information,

Michel.


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

Date: Fri, 1 Oct 1999 12:50:43 -0400
From: "Diane Strahl" <diane@dmswebsupport.com>
Subject: cgi output to browser - store info in variable first?
Message-Id: <by5J3.1675$Tg3.245407@news.sgi.net>

When using a cgi to grab info from a database based on user input, is it
better, and why, to write the info to a variable and add to this variable
with ".=" until all info is gathered, then print the variable, or to print
the info as it is gathered; ie

foreach $line (@database){
    if ($criteria eq $met) {
        $output .= "$line<br>";
    }
}

print "Content-type: text/html\n\n";
print "<html><head><title>title></title></head><body>\n";
print $output;
print "</body></html>";

OR

print "Content-type: text/html\n\n";
print "<html><head><title>title></title></head><body>\n";
foreach $line (@database){
    if ($criteria eq $met) {
        print $line<br>;
    }
}
print "</body></html>";

The response could be several pages long.

Thanks!

Diane





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

Date: Thu, 30 Sep 1999 18:51:07 -0400
From: David Wozmak <dwozmak@rational.com>
Subject: Re: counting problem
Message-Id: <37F3E95B.FA7A4E5E@rational.com>



Fulko van Westrenen wrote:
>   foreach $tmp (@sortrec){
>     $sum++;
>     @tr = split (/;/, $tmp);
>     $pntr = $tr[0];
>     @tr = split(/;/,$dataset{$pntr});
>     $_ = $tr[17];
>     /w/ && $wijzig++;
>     /n/ && $nieuw++;
>     /o/ && $onbekend++;
>     /a/ && $actief++;
>     /i/ && $inactief++;
>     /b/ && $blokkeer++;
>     /v/ && $verwijder++;


perhaps $_ doesn't still contain the contents of $tr[17] when it gets to
the bottom.

change it to this:

>   foreach $tmp (@sortrec){
>     $sum++;
>     @tr = split (/;/, $tmp);
>     $pntr = $tr[0];
>     @tr = split(/;/,$dataset{$pntr});

     $testval = $tr[17];

     $wijzig++ if($testval =~ /w/);
     $nieuw++ if($testval =~ /n/);
     $onbekend++ if($testval =~ /o/);
     $actief++ if($testval =~ /a/);
     $inactief++ if($testval =~ /i/);
     $blokkeer++ if($testval =~ /b/);
     $verwijder++ if($testval =~ /v/);


dwoz


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

Date: Fri, 1 Oct 1999 15:11:23 GMT
From: John P Walsh <walsh@averstar.com>
Subject: CPAN support programs for PC?
Message-Id: <37F4CF1B.B04D470F@averstar.com>

Installation and use of CPAN on a Windows PC requires a set of support
programs.
What programs do you recommend for PC usage by CPAN? (gzip, tar, unzip,
ftp, etc.)

Thanks in advance,
- John Walsh
  walsh@averstar.com




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

Date: 1 Oct 1999 16:33:40 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: CPAN support programs for PC?
Message-Id: <37f4d454_2@newsread3.dircon.co.uk>

John P Walsh <walsh@averstar.com> wrote:
> Installation and use of CPAN on a Windows PC requires a set of support
> programs.
> What programs do you recommend for PC usage by CPAN? (gzip, tar, unzip,
> ftp, etc.)
> 

Yes you do need those ...

<http://www.delorie.com>

Except of course this should be asked in another group really ...

/J\
-- 
"He is marvelous at beating men and achieving real penetration" -
Alex Ferguson


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

Date: Fri, 01 Oct 1999 16:34:55 GMT
From: gammo@my-deja.com
Subject: GDBM and PERL
Message-Id: <7t2nre$5p7$1@nnrp1.deja.com>

Help!  Well first hello. I have been asked to create a GDBM file
that contains a few email addresses and dates.  Then a cron job will
call the gdbm file and extract the email addresses and then send the
appropriate info.

Q1:  What is a gdbm file?  Is it just a plain Ascii text file?

Thanks - Michael.


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


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

Date: Fri, 01 Oct 1999 15:26:50 GMT
From: kandeb@my-deja.com
Subject: Re: Hashes w/multiple values per key (Perl Cookbook) <REPOST>
Message-Id: <7t2jr9$2kp$1@nnrp1.deja.com>

David Cassell wrote:

> Have you considered using a zero-width assertion as your pattern
> here?  Instead of using /^-*C/ you could use something like /^(?=-*C)/
> so it wouldn't gobble up the first part of your line.

No, that hadn't occurred to me... kinda new to this, still.  I'll
try it out.

> Although there doesn't seem to be anything else in your example
> data which starts with a '-'.  So you could split on /^--/ and
> just lose two unneeded hyphens...

Oops.  Sorry, I left out extraneous lines for brevity.  Mayhaps
that was in error.  There are, in fact, some separator lines
which are generated with nothing but ---'s.

Thanks,

deb (who is now using dejanews to cut the spam going to my
     account.)


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


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

Date: Fri, 1 Oct 1999 10:53:38 -0400 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Help with this Crazy script!
Message-Id: <x3ywvt7t9n2.fsf@tigre.matrox.com>


Steve Powell <spowell@usurf.com> writes:

> But I am just a total amateur. There is probably a better way.

Yeah. Like, for example, reading perlre. Both of your suggestions are
useless. Did you care to try them before posting?

--Ala



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

Date: 1 Oct 1999 16:13:14 GMT
From: lt lindley <ltl@rgsun5.viasystems.com>
Subject: Re: Help with this Crazy script!
Message-Id: <7t2miq$5q3$1@rguxd.viasystems.com>

Ala Qumsieh <aqumsieh@matrox.com> wrote:

:>Steve Powell <spowell@usurf.com> writes:

:>> But I am just a total amateur. There is probably a better way.

:>Yeah. Like, for example, reading perlre. Both of your suggestions are
:>useless. Did you care to try them before posting?

Actually, that may be a little harsh.  Both of Steve's suggestions
did work.  One removed the /g modifier from one of the matches,
thus making the current value of pos() unimportant.  The other
did another assignment to the target scalar, which, along with
assigning 0 to pos(), is another way to make the re engine start
at the beginning of the string.

Now do we have to add another posting rule to c.l.p.m?  Always
try the solution before pouncing on somebody for not trying
their solution?  :-)

Welcome to the "been burned like that before" club.


-- 
// 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, 01 Oct 1999 10:21:35 -0500
From: Steve Powell <spowell@usurf.com>
Subject: Re: Help with this Crazy script!
Message-Id: <37F4D17F.79531D94@usurf.com>

Ala Qumsieh wrote:
> 
> Steve Powell <spowell@usurf.com> writes:
> 
> > But I am just a total amateur. There is probably a better way.
> 
> Yeah. Like, for example, reading perlre. Both of your suggestions are
> useless. Did you care to try them before posting?
> 
> --Ala


Yes, I did.

-- 
Steve Powell
Systems Administrator
Network Operations Center
CyberHighway/USURF America


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

Date: Fri, 1 Oct 1999 08:37:18 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: HELP! Is the "seek" command Win32 Only?
Message-Id: <MPG.125e7507bdf5580c9897ae@206.184.139.132>

Shadow Reaper (shadow-reaper@mindless.com) seems to say...
> When I however upload it to Virtual Avenue, I get a "Server Processing
> Error"...

This is a CGI problem, not a perl problem.  See my .sig below for a few 
links.

-- 
Bill Moseley mailto:moseley@best.com

http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html
http://www.perl.com/pub/qa/How_can_I_learn_to_write_CGI_scripts?
http://www.perl.com/reference/query.cgi?tutorials
http://www.htmlhelp.org/faq/cgifaq.html
http://www.apexhosting.com/faqcgiscripts.htm#7
http://www.apache.org/docs/misc/FAQ-F.html#premature-script-headers
http://hoohoo.ncsa.uiuc.edu/cgi/interface.html
http://www.w3.org/pub/WWW/Protocols/HTTP/
http://www.w3.org/pub/WWW/MarkUp/
                       


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

Date: Fri, 01 Oct 1999 15:15:22 GMT
From: "Donny Simonton" <donsimon@home.com>
Subject: How can I add an additional search path via perl
Message-Id: <ee4J3.211$F_6.8292@news.rdc1.tx.home.com>

I just installed the latest version of perl.  And I need to add another
search path to another directory.  How can I do this.

Thanks!
Donny




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

Date: 1 Oct 1999 16:42:43 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How can I add an additional search path via perl
Message-Id: <37f4d673_2@newsread3.dircon.co.uk>

Donny Simonton <donsimon@home.com> wrote:
> I just installed the latest version of perl.  And I need to add another
> search path to another directory.  How can I do this.
> 

You dont say what system you are on  so I'll assume Novell

MAP INSERT S12=C:\PERL\BIN


/J\
-- 
"Tony Blair. Make it so" - Patrick Stewart


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

Date: Fri, 01 Oct 1999 15:51:30 GMT
From: "Donny Simonton" <donsimon@home.com>
Subject: Re: How can I add an additional search path via perl
Message-Id: <6M4J3.214$F_6.8325@news.rdc1.tx.home.com>

Sorry, I'm on a linux box.  It had perl 5.004, and I just upgraded it to
perl 5.005.  And when I installed it.  I lost the path to some of the system
based perl files I need.

They are located in the /usr/lib/perl5/site_perl     directory.


And the install changed the path to /usr/lib/perl5/site_perl/5.005

Is there anyway that I can add /usr/lib/perl5/site_perl    path on startup?


Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:37f4d673_2@newsread3.dircon.co.uk...
> Donny Simonton <donsimon@home.com> wrote:
> > I just installed the latest version of perl.  And I need to add another
> > search path to another directory.  How can I do this.
> >
>
> You dont say what system you are on  so I'll assume Novell
>
> MAP INSERT S12=C:\PERL\BIN
>
>
> /J\
> --
> "Tony Blair. Make it so" - Patrick Stewart




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

Date: Fri, 01 Oct 1999 11:08:23 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: How to list values of all variables during program execution?
Message-Id: <37F4CE22.CA7DE55F@chaos.wustl.edu>

TGarner5 wrote:
> How do you "suspend" a script and see the value of all memory variables or a
> specific variable during script execution?

You might try the Perl debugger and step through your script. 

e.


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

Date: Fri, 1 Oct 1999 08:34:26 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Install CPAN module in ActiveState Windows version of Perl?
Message-Id: <MPG.125e7461e742433f9897ad@206.184.139.132>

John P Walsh (walsh@averstar.com) seems to say...
> If possible, I would like to be able to use a simple process to install CPAN
> modules into the ActiveState-Windows directory structure, and maintain the
> latest versions of these modules. From what I see posted on the net, I need
> to maintain both the ActiveState ppm software, and the set of
> CPAN-installation modules normally used with non-ActiveState Perl.  Is this
> correct?

You don't need ppm if you are using CPAN.  Well, you don't need either, 
but CPAN.pm makes it really easy.


> Jonathan Stowe <jns@gellyfish.com> says:
> > If a module has no XS components then you might be able to install it
> > if you obtain 'nmake' (microsofts make utility) which is available from
> > microsofts ftp server.

Or get one of the free win32 ported make utilities that are around the 
net (Cygnwin and Ming32 are two).

-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Thu, 30 Sep 1999 20:38:36 -0400
From: David Wozmak <dwozmak@rational.com>
Subject: Re: Line-wrap
Message-Id: <37F4028C.E450CCAD@rational.com>



A Zielke wrote:
> 
> Hi,
> 
> Iīve read a Ascii-file into a scalar and want to split the text into
> lines that are $n characters long. I would like to keep existing \n
> and donīt want to split words. (Words, that are longer than $n chars
> should sit on a single line - I donīt expect that to happen very often.)
> $n will be something in the range of 70-80.
> 
> I tried to fit it all into a single s///g but failed miserably.
> (My best try was s/(.{40,$n})[ \r\t\f]/$1\n/g , but that obviously
> splits
>  up lines that are longer than 40 but shorter than $n chars followed by
> a  \n...)
> 
> Thanks for all hints.
> 
> A.


#match all non-newline characters up to the first wordbreak at or before
nth character, until none left
	$text =~ s/[^\n]{1,$n}(?=\b)/$&\n/g); 
#since every line shorter than n will result in doubled carriage
returns...
	$text =~ s/\n{2}/\n/g;

dwoz


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

Date: Fri, 01 Oct 1999 12:24:34 -0400
From: David Wozmak <dwozmak@rational.com>
Subject: Re: Line-wrap
Message-Id: <37F4E042.9E806CF6@rational.com>



A Zielke wrote:
> 
> Hi,
> 
> Iīve read a Ascii-file into a scalar and want to split the text into
> lines that are $n characters long. I would like to keep existing \n
> and donīt want to split words. (Words, that are longer than $n chars
> should sit on a single line - I donīt expect that to happen very often.)
> $n will be something in the range of 70-80.
> 
> I tried to fit it all into a single s///g but failed miserably.
> (My best try was s/(.{40,$n})[ \r\t\f]/$1\n/g , but that obviously
> splits
>  up lines that are longer than 40 but shorter than $n chars followed by
> a  \n...)
> 
> Thanks for all hints.
> 
> A.


#match at least one, and as many as 'n' non-newline characters up to the
last wordbreak before 'n' characters:

	$n = 80;

#my regex is going to end up doubling the carriage returns, 
#which I'll have to fix later.  
#So if there are any double carriage returns in the text, 
#I have to pre-treat them now:

	$text =~ s/(\n{2})/'$&' x 2/eg;

	$text =~ s/([^\n\r]{1,$n}(?=\b))/$1\n/g;

#since this will end up doubling all the existing single carriage
returns, 
#let's then take the doubles out:

	$text =~ s/\n{2}/\n/g;

hope this helps.  There is probably a better way to go around the
doubled newline kludge here...

dwoz


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

Date: Fri, 01 Oct 1999 08:14:40 -0700
From: Phil Doe <ask_for_my_address_if_you_need_it@earthlink.net>
Subject: Re: multi dimensional array's
Message-Id: <37F4CFE0.82092D93@earthlink.net>

Yes, it is possible to have an arbitrary number of dimensions granted
space and time to process them.  However, the representation you gave
isn't quite the right syntax.  Consider looking into the perldata and/or
perllol manpages for details.

P



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

Date: Fri, 01 Oct 1999 10:55:10 -0400
From: Sushant Gargya <sushant@ntwrks.com>
Subject: Re: Perl Debugger
Message-Id: <37F4CB4E.A715A4D7@ntwrks.com>

There is also the Active State debugger: www.activestate.com
The only thing is that it is not free...I use it quite frequently and
find it very useful. Hope that helps.
-sushant

Martin zur Heiden wrote:

> Is there any Perl-Debugger, where a breakpoint can be set before
> execution of the script?



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

Date: Fri, 01 Oct 1999 19:02:01 +0300
From: Veli-Pekka Riihikoski <vrii@tpo.fi>
Subject: Re: Perl Debugger
Message-Id: <37F4DAF9.B9B3090A@tpo.fi>

Martin zur Heiden wrote:

> Is there any Perl-Debugger, where a breakpoint can be set before
> execution of the script?

Hi

You should try ptkdb. It's perl debugger built with a
perlTk user interface compatible
with Unix, Linux, and Win95/98/NT.

It can be found  http://world.std.com/~aep/ptkdb/

Good luck
-----------
Veli-Pekka Riihikoski
vrii@tpo.fi



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

Date: Fri, 01 Oct 1999 11:07:02 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: ping script to page mobile...
Message-Id: <37F4CDD1.F3B5FED4@chaos.wustl.edu>

jakal wrote:
> Has anyone written a Perl script that will ping a server, any page a
> mobile if the server is down?

Well, you might consider MON which is a very configurable monitoring
package that is extensible with Perl at
http://www.kernel.org/software/mon/ or BigBrother at http://maclawran.ca/bb-dnld/

Enjoy.

e.


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

Date: Fri, 1 Oct 1999 11:09:35 -0400
From: "Peter Icaza" <picaza@chsi.com>
Subject: Re: Proble with chopped filenames from script
Message-Id: <7t2iqh$1apc$1@pike.uhc.com>


> '_' is a 'word' character.

oh, that's what the underscore in the book is. :)
thanks or the correction guys.

peter




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

Date: Fri, 01 Oct 1999 08:27:12 -0700
From: Phil Doe <ask_for_my_address_if_you_need_it@earthlink.net>
Subject: Re: Problem with list!
Message-Id: <37F4D2D0.ACC3B2A6@earthlink.net>

Yes it is possible.  Assuming comma delimited line read from FILE:

print map { "<INPUT TYPE=CHECKBOX VALUE='$_'>$_" } (split /,/, <FILE>);



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

Date: Fri, 01 Oct 1999 11:08:40 -0400
From: Sushant Gargya <sushant@ntwrks.com>
Subject: Re: RegEx for html->plain text
Message-Id: <37F4CE78.D9116891@ntwrks.com>

I understand that the problem is trivial and that is why I was only looking for a
regular expression that
would stree out "<kdjfkdfjkdjf>" (html tags). I have attempted to do that but have
been unsuccessful.
Here's one of the things I tried:
        $_ =~ s/\<?+\>//g;
This doesn't work.

Abigail wrote:

> Sushant Gargya (sushant@ntwrks.com) wrote on MMCCXXI September MCMXCIII
> in <URL:news:37F3CFBA.34BDE75D@ntwrks.com>:
> -- Looking for "parser" that would take an html input file and
> -- output the file without the html tags encountered. In other words,
> -- need a converter that converts html file to plain text file.
>
> Well, what you want is rather trivial. However, the subject implies
> something else, which makes the exercise a lot more complicated.
>
> Why do you want a regex?
>
> Abigail
> --
> echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
>  |perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
>  |perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
>  |perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
>
>   -----------== 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: 1 Oct 1999 16:09:27 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: RegEx for html->plain text
Message-Id: <37f4cea7_1@newsread3.dircon.co.uk>

Sushant Gargya <sushant@ntwrks.com> wrote:
> I understand that the problem is trivial and that is why I was only looking for a
> regular expression that
> would stree out "<kdjfkdfjkdjf>" (html tags). I have attempted to do that but have
> been unsuccessful.
> Here's one of the things I tried:
>         $_ =~ s/\<?+\>//g;
> This doesn't work.
> 

Have you read what it says in perlfaq9 on this very subject ?  

<Jeopardized quote snipped>

/J\
-- 
"I must call a man in - I want to get felt laid down in the loft" -
Graham Norton


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

Date: 01 Oct 1999 18:49:17 +0200
From: Jean-Louis Leroy <jll@enterprise.newedgeconcept>
Subject: Re: Ton NOT Tom? was(Re: Bye Tom? (WAS: Re: injecting "my" varibales into callers scope))
Message-Id: <m3n1u3auwi.fsf@enterprise.newedgeconcept>

> Or are you implying he has a split personality? :) (no offence to anyone)

Heehee...perhaps it's "Dr Zakharevitch & Mr Christiansen" <g>

Jean-Louis


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

Date: Fri, 01 Oct 1999 11:14:46 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: Web Site duplicator
Message-Id: <37F4CFA1.3DD5CF3A@chaos.wustl.edu>

Marc Pawlowsky wrote:
> Before reinventing the wheel, is there a perl library/module that
> copies a web site to a local hard drive, and modifies the links
> so the info can be viewed off-line?

You might check out rsync or scp.

e.


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

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


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