[9828] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3421 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 11 19:07:22 1998

Date: Tue, 11 Aug 98 16:00:26 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 11 Aug 1998     Volume: 8 Number: 3421

Today's topics:
        checking if files exist (Steve .)
    Re: checking if files exist (brian d foy)
    Re: dates in excess of 2037 (A Problem???) (Mike)
    Re: dates in excess of 2037 (A Problem???) (Craig Berry)
    Re: dates in excess of 2037 (A Problem???) (Larry Rosler)
    Re: DB files, flock, pack, tie question (Kelly Hirano)
        Does anyone have a Win32 icon for Perl files? <karlfors@algonet.se>
    Re: Does anyone have a Win32 icon for Perl files? (Nathan V. Patwardhan)
        Gimp under Solaris <elf@halcyon.com>
    Re: Help using CGI_lite <rootbeer@teleport.com>
        Help with HTML::Parser dzuy@my-dejanews.com
    Re: Help with HTML::Parser (Maurice Aubrey)
    Re: Help with Perl script <rootbeer@teleport.com>
    Re: html arborescence in iso9660 (Mark-Jason Dominus)
    Re: html arborescence in iso9660 <Noggs@dial.pipex.com>
        line of text. <peter@richmd.demon.co.uk>
    Re: line of text. (Nem W Schlecht)
    Re: line of text. (Craig Berry)
    Re: line of text. <upsetter@ziplink.net>
    Re: method=GET without CGI.pm ?? (brian d foy)
    Re: method=GET without CGI.pm ?? <rootbeer@teleport.com>
        Pattern matching (text all uppercase) <none@this.time>
    Re: Pattern matching (text all uppercase) (Matt Knecht)
    Re: Pattern matching (text all uppercase) (Craig Berry)
    Re: PERL and HTACCESS <mattrope@mdhost.cse.tek.com>
        Perl Debugger Problem? <raf@fc.hp.com>
    Re: reading formatted mainframe data in perl PAntoniades@OpenSolutions.com
    Re: reading formatted mainframe data in perl <gtod@netscape.net.au>
    Re: Reading/parsing my mail spool file with Perl <rootbeer@teleport.com>
    Re: regex lookbehind (Kelly Hirano)
    Re: rounding script? <tchrist@mox.perl.com>
    Re: rounding script? <matthies@fsinfo.cs.uni-sb.de>
        search text in specific columns stevenba@carr.org
    Re: search text in specific columns (Larry Rosler)
    Re: search text in specific columns <rootbeer@teleport.com>
    Re: Self-printing code (Patrick Timmins)
    Re: Self-printing code (brian d foy)
        TIMING outgoing mails, use Perl and UNIX' CronJobs ?, S (Andreas F.)
    Re: TIMING outgoing mails, use Perl and UNIX' CronJobs  <rootbeer@teleport.com>
        warning messages from Perl <ajaym@hooked.net>
    Re: What is the purpose of Perl (Michael J Gebis)
    Re: What is the purpose of Perl <merlyn@stonehenge.com>
        What's the most efficient regex to force NOT matching a <mmoreno@cas.org>
    Re: Win32::ODBC <JKRY3025@comenius.ms.mff.cuni.cz>
    Re: X-file (?=...), case postponed. (Abigail)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Tue, 11 Aug 1998 22:32:09 GMT
From: syarbrou@ais.net (Steve .)
Subject: checking if files exist
Message-Id: <35d0c62c.6728527@news.ais.net>

I need to check if a directory is empty.  If there are files in there,
I need to perform tasks on them and then move them to the new
location, and delete the old files.

How do I go about checking if files exist in a directory?  Thanks.

Steve


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

Date: Tue, 11 Aug 1998 19:02:30 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: checking if files exist
Message-Id: <comdog-ya02408000R1108981902300001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35d0c62c.6728527@news.ais.net>, syarbrou@ais.net (Steve .) posted:

>I need to check if a directory is empty.  If there are files in there,
>I need to perform tasks on them and then move them to the new
>location, and delete the old files.
>
>How do I go about checking if files exist in a directory?  Thanks.

opendir()  seems like a good first step :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>


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

Date: 11 Aug 1998 20:28:26 GMT
From: schutzmd@SPAMFREEjmu.edu (Mike)
Subject: Re: dates in excess of 2037 (A Problem???)
Message-Id: <6qq9ha$btd$3@lark.jmu.edu>

Dominic Tootell (tootedom@mlch.ml.com) wrote:

> An ideal solution to the problem would be:-
>  
> Get the number of seconds from 1970 until an end date in 2037, then
> specify that end date as the start of the next calculation, so that you
> can get the number of seconds since that date

One thing I've always hated about calculating dates is that it always
seems to involve counting second.  IMHO, I think this is an extreme pain
in the butt, and I will personally avoid it at all costs.  So, to propose
a solution for your problem:  I would find an algorithm for calculating
the number of days since the year 0, and do a simple subtraction.  I don't
have anything on hand, but if you search for algorithms on the Gregorian
calendar, you should be able to find something appropriate.  (E-mail me if
you can't find it, and I will try to locate the one that I have at home.)

- mike -


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

Date: 11 Aug 1998 21:21:27 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: dates in excess of 2037 (A Problem???)
Message-Id: <6qqckn$8bk$1@marina.cinenet.net>

Mark Rafn (dagon@halcyon.com) wrote:
: cberry@cinenet.net (Craig Berry) arranged electrons in a pattern like this:
: >calculations.  I presume that we'll see a move to a 64-bit time_t sometime
: >in the next decade, though it's going to be a painful conversion given the
: >amount of software out their using 32 bits to hold time_t.
: 
: Most programmers use a system-dependent definition of time_t, rather than
: defining it for their program.  It takes simply a recompile on a system with
: a different time_t to change.  The majority of software will automatically
: upgrade to 64-bit time_t when ported to an OS that uses it.  

You're forgetting the problem of externally-stored time_t values.  With
these, you have the same kinds of massive conversion or multi-version
support problems that Y2K causes.

In other words, if I have (in C)

  struct log_entry {
    time_t    stamp;
    char      data[BUFSZ];
  };

which I'm reading and writing from/to external storage, or other apps, or
whatever, then a silent change in the size of time_t will break everything
quite thoroughly.  I can't read my external stores, writing to them
trashes them, other apps that haven't recompiled won't talk to mine, and
so forth.  It requires a huge, tightly-coordinated cutover to put all this
right.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Tue, 11 Aug 1998 15:13:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: dates in excess of 2037 (A Problem???)
Message-Id: <MPG.103a61c856c3ff95989764@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <6qq6ib$2v6$1@marina.cinenet.net> on 11 Aug 1998 19:37:47 GMT, 
Craig Berry <cberry@cinenet.net> says...
 ...
> : Y2146.  But who's counting?  :-)
> 
> 2^31 seconds = about  68 years (2038 - 1970)
> 2^32 seconds = about 136 years
> 1970 + 136 = 2106
> 
> Looks like it's time for *both* of us to put in for an integer processing
> unit upgrade. :)

I see I didn't cancel and resubmit it fast enough for you! :-)

> : The signedness of time_t isn't the problem.  One could (in application 
> : coding, for example) simply deal with it as unsigned, allowing one to 
> : count only forward from the Unix Epoch.  The problem is that most date 
> : computations involve *intervals* (the difference between two times), and 
> : the difference is inherently signed.
> 
> The point is that localtime() et all treat their 32-bit argument as a
> signed value, so that (e.g.) localtime(2**32) is the second preceeding
> Jan. 1, 1970.  Were that not so, we'd have 68 years of additional headroom
> in time_t.

Two things wrong with your example:  it is (2**32 - 1) that you are 
thinking of, and the result applies only in the timezone around the Prime 
Meridian.  One thing is wrong with your conclusion.  As I demonstrated in 
a different post, one might have 68 years of addition headroom in time_t 
before rollover, but *not* in time intervals, which are signed, hence 
roll over at ~68 years.

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


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

Date: 11 Aug 1998 13:56:45 -0700
From: hirano@Xenon.Stanford.EDU (Kelly Hirano)
Subject: Re: DB files, flock, pack, tie question
Message-Id: <6qqb6d$6q2@Xenon.Stanford.EDU>

In article <35d1af74.26832182@news2.newscene.com>,
 <tfinney@XXXXbbn.com> wrote:
>ah-ha!   it appears that it was working correctly all along, and my
>debugging error messages were the problem.   undef and sync both
>apparently return undefined values, and using them in the context that
>
>I did  ( sync | print error ) caused it to spit out an error message
>even when it was working correctly.

shouldn't that be:

	sync || print error
-- 
Kelly William Hirano	                    Stanford Athletics:
hirano@cs.stanford.edu	                 http://www.gostanford.com/
hirano@alumni.stanford.org      (WE) BEAT CAL (AGAIN)! 100th BIG GAME: 21-20


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

Date: Tue, 11 Aug 1998 22:52:13 +0200
From: "Karl Forsberg" <karlfors@algonet.se>
Subject: Does anyone have a Win32 icon for Perl files?
Message-Id: <6qqb85$9vl$1@cubacola.tninet.se>

Question as above. Active State Perl did not come with any specific icon.




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

Date: 11 Aug 1998 22:35:46 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Does anyone have a Win32 icon for Perl files?
Message-Id: <6qqh02$aq3@fridge.shore.net>

Karl Forsberg (karlfors@algonet.se) wrote:
: Question as above. Active State Perl did not come with any specific icon.

I'm sorry.  :-)

But I'm sure that you can find something Camel-related *and* licensing
allowed that you can use for said icon.  But I'm still boggling about
why you'd need one in the first place.  Aren't you running Perl
programs from a DOS shell?

Good luck!

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: Tue, 11 Aug 1998 14:58:58 -0700
From: Elf Sternberg <elf@halcyon.com>
Subject: Gimp under Solaris
Message-Id: <Pine.GUL.4.02.9808111455250.25588-100000@coho.halcyon.com>


	I've built Gimp (1.001) / Gtk (1.005) under solaris (2.5.1) and
perl (5.004).  None of the examples work; Gimp-Fu complains:

unable to create socketpair for gimp communications: Protocol not
supported at /usr/local/lib/perl5/site_perl/sun4-solaris/Gimp/Fu.pm line
606

	Anyone know what's going on?  Line 606 doesn't look like it has
much to do with the error, either...

		Elf


Elf M. Sternberg - www.halcyon.com/elf
A Decade of Usenet: On-line since August 18, 1988

   I have looked into the abyss, and the abyss has looked into me.
   Neither liked what we saw.
                  --- Brother Theodore




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

Date: Tue, 11 Aug 1998 21:23:31 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Help using CGI_lite
Message-Id: <Pine.GSO.4.02.9808111419180.10161-100000@user2.teleport.com>

On Tue, 11 Aug 1998 hstack@att.com wrote:

> I have a form that posts a hidden field that includes a text string
> like the following

> <INPUT TYPE="hidden" NAME="argument_string" value=-user
> foofoo -src_master -dst_design 187 ->

Maybe you'd have better success if you followed the HTML standards more
accurately - of if your browser followed them _less_ accurately! :-)

The docs, FAQs, and newsgroups about HTML should be able to get you back
on track. Good luck!

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



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

Date: Tue, 11 Aug 1998 20:51:22 GMT
From: dzuy@my-dejanews.com
Subject: Help with HTML::Parser
Message-Id: <6qqasa$8k8$1@nnrp1.dejanews.com>

Suppose I have the following chunk in my html file:
 ...
<select>
<option value=option1> This is option 1
<option value=option2> This is option 2
<option value=option3> This is option 3
</select>
 ...

which displays an option menu with option 1, option 2, and option 3.
How can I use HTML::Parser or other module to parse the label "This is option
<n>" after the option tag?  Or how can I associate the label with each option
tag?  What I'm trying to do is to verify proper label to proper tag without
using the browser.

I've looked at HTML::Parser's start, end and text methods.  I can get all
attr within the <> of the start and end tag.  I examine the value passed into
the text method and it seems to be a chunk of mixed text and tags which I
can't use.

Thanks for all your help.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 11 Aug 1998 22:46:26 GMT
From: maurice@hevanet.com (Maurice Aubrey)
Subject: Re: Help with HTML::Parser
Message-Id: <slrn6t1ie3.mdl.maurice@we-24-130-48-83.we.mediaone.net>

On Tue, 11 Aug 1998 20:51:22 GMT, dzuy@my-dejanews.com <dzuy@my-dejanews.com> 
wrote:
>Suppose I have the following chunk in my html file:
>...
><select>
><option value=option1> This is option 1
><option value=option2> This is option 2
><option value=option3> This is option 3
></select>
>...
>
>which displays an option menu with option 1, option 2, and option 3.
>How can I use HTML::Parser or other module to parse the label "This is option
><n>" after the option tag?  Or how can I associate the label with each option
>tag?  What I'm trying to do is to verify proper label to proper tag without
>using the browser.
>
>I've looked at HTML::Parser's start, end and text methods.  I can get all
>attr within the <> of the start and end tag.  I examine the value passed into
>the text method and it seems to be a chunk of mixed text and tags which I
>can't use.

The string passed to text() should not contain any tags.  Have you tried
it with just the snippet of HTML you provided above?  

You should be able to just create a subclass, and do something like this:

sub start {
  my $self = shift;
  my($tag, $attr, $attrseq, $origtext) = @_; 

  $self->{is_option} = ($tag eq 'option' ? 1 : 0);
}

sub text {
  my $self = shift;
  my $text = shift;

  if ($self->{is_option}) {
    ... do something with the text
  }
}
     
If there's the possibility of tags within the option strings, then you'll
need to modify all of the methods to keep track of the current state,
and build up the entire string.
 
-- 
Maurice Aubrey <maurice@hevanet.com>

You think you know when you learn, are more sure when you can write,
even more when you can teach, but certain when you can program. 
  - Alan Perlis 


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

Date: Tue, 11 Aug 1998 21:03:28 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Help with Perl script
Message-Id: <Pine.GSO.4.02.9808111401470.10161-100000@user2.teleport.com>

On Tue, 11 Aug 1998 rao_radha@my-dejanews.com wrote:

> Subject: Help with Perl script

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

    http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

>          (open STDIN, $ARGV[0]);
>          (open STDOUT, ">$ARGV[1]");

Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.

Hope this helps!

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



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

Date: 11 Aug 1998 17:58:16 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: html arborescence in iso9660
Message-Id: <6qqepo$3a2$1@monet.op.net>

In article <6qq8i1$bib$1@news.imaginet.fr>,
Jacques Guellec <jguellec@imaginet.fr> wrote:
>If you find too bad english in the english version, please send me
>correction.

No way, dude.  English becomes rich and robust through the constant
assimilation of new coinages, and I deem `arborescence' to be
eminently worthy of such assimilation.



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

Date: Tue, 11 Aug 1998 23:16:37 +0100
From: Bob Newman <Noggs@dial.pipex.com>
Subject: Re: html arborescence in iso9660
Message-Id: <35D0C2C5.1C0DD835@dial.pipex.com>

Mark-Jason Dominus wrote:

> In article <6qq8i1$bib$1@news.imaginet.fr>,
> Jacques Guellec <jguellec@imaginet.fr> wrote:
> >If you find too bad english in the english version, please send me
> >correction.
>
> No way, dude.  English becomes rich and robust through the constant
> assimilation of new coinages, and I deem `arborescence' to be
> eminently worthy of such assimilation.

I deem it to be already standard English.

Bob Newman




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

Date: Tue, 11 Aug 1998 22:01:11 +0100
From: Peter Richmond <peter@richmd.demon.co.uk>
Subject: line of text.
Message-Id: <35D0B117.9493468E@richmd.demon.co.uk>

Hi,

$line = a line out of a text file.

Does $line include the \n or not?
-- 
Peter Richmond.
--
Home : Sunderland, United Kingdom
Web  : www.richmd.demon.co.uk
Pager: 01426 281 367


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

Date: 11 Aug 1998 16:06:40 -0500
From: nem@abattoir.cc.ndsu.nodak.edu (Nem W Schlecht)
Subject: Re: line of text.
Message-Id: <6qqbp0$8ab@abattoir.cc.ndsu.nodak.edu>

[courtesy copy e-mailed to author(s)]

In comp.lang.perl.misc, Peter Richmond  <peter@richmd.demon.co.uk> wrote:
>Hi,
>
>$line = a line out of a text file.
>
>Does $line include the \n or not?

If you are reading $line like this:

open(FH, "file") || die "Couldn't open file!";
while (<FH>) {
	push(@file_lines, $_);
}
$line = $file_lines[0];

Then, yes, $line should contain the newline.  chomp() it if you don't want
the newline:

chomp($line);

Better yet, if you don't want any newlines, put: 'chomp()' at the beginning
of your while() block to remove the newlines off of all the lines while you
read them in.

-- 
Nem W Schlecht                  nem@plains.nodak.edu
NDUS UNIX SysAdmin        http://www.nodak.edu/~nem/
"Perl did the magic.  I just waved the wand."


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

Date: 11 Aug 1998 21:26:58 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: line of text.
Message-Id: <6qqcv2$8bk$2@marina.cinenet.net>

Peter Richmond (peter@richmd.demon.co.uk) wrote:
: $line = a line out of a text file.

That's not valid syntax.  Do you mean

(a) $line = <TEXTFILE>;
(b) $line = 'a line out of a text file.';
(c) Something else?

: Does $line include the \n or not?

(a) Yes, unless you do something unusual to $/.
(b) No, unless you put it there manually.
(c) Depends.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: 11 Aug 1998 21:33:13 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: line of text.
Message-Id: <6qqdap$8lg@fridge.shore.net>

Peter Richmond <peter@richmd.demon.co.uk> wrote:
: Hi,

: $line = a line out of a text file.

: Does $line include the \n or not?

Well, that depends on how $line was populated. But generally speaking,
yes.

--Art

PS: There are ways you could have tested this yourself, you know!

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


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

Date: Tue, 11 Aug 1998 17:11:09 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: method=GET without CGI.pm ??
Message-Id: <comdog-ya02408000R1108981711090001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6qq59i$bps$2@lark.jmu.edu>, schutzmd@SPAMFREEjmu.edu (Mike) posted:

>On a web site I am working on, we are trying to submit data through links
>such as:
>   <A HREF="/cgi-bin/search?id=3411"> Search Link </A>
>
>The problem is that on the server, CGI.pm is not enabled, and the only

if you have a recent version of Perl, you have CGI.pm.  the server
does not need to be configured to allow you to use it.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>


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

Date: Tue, 11 Aug 1998 21:10:04 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: method=GET without CGI.pm ??
Message-Id: <Pine.GSO.4.02.9808111406380.10161-100000@user2.teleport.com>

On 11 Aug 1998, Mike wrote:

> The problem is that on the server, CGI.pm is not enabled, 

Have your sysadmin install it. (An admin who can't install software is
useless.) Or, if you want, you may install this or another module
yourself; see perlfaq8 for details. Hope this helps!

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



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

Date: Tue, 11 Aug 1998 17:13:17 -0400
From: Pgh Fan <none@this.time>
Subject: Pattern matching (text all uppercase)
Message-Id: <35D0B3EC.D46A4BA3@this.time>

I'm trying to stop people from inputting all uppercase posts to my
wwwboard but I'm not sure exactly how to test all words to see if
they're uppercase.  I went to several sites which discuss pattern
matching but can't quite figure it out.  The code will look something
like this:

sub allcaps {
    $all_caps_found=0;
    if ($body =~ /w[A-Z]) {
         $all_caps_found = 1;
    }

    if ($all_caps_found == 1) {
      &error(allcaps);
   }

I know the \w[A-Z] part is wrong and I do want it to see if every word
is uppercase.  If anyone could help me out with matching all uppercase
text words, I would really appreciate it.




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

Date: Tue, 11 Aug 1998 22:11:35 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Pattern matching (text all uppercase)
Message-Id: <rk3A1.29$5P.250249@news2.voicenet.com>

Pgh Fan <none@this.time> wrote:
>sub allcaps {
>    $all_caps_found=0;
>    if ($body =~ /w[A-Z]) {
>         $all_caps_found = 1;
>    }
>
>    if ($all_caps_found == 1) {
>      &error(allcaps);
>   }

This ignores locale (But all the world is a vt100, and everyone speaks
English! :) ), but seems too simple to let it rot:

$_ = $body;

error('allcaps') unless /[a-z]/;

-- 
Matt Knecht - <hex@voicenet.com>


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

Date: 11 Aug 1998 22:15:35 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Pattern matching (text all uppercase)
Message-Id: <6qqfq7$8bk$4@marina.cinenet.net>

Pgh Fan (none@this.time) wrote:
: I'm trying to stop people from inputting all uppercase posts to my
: wwwboard but I'm not sure exactly how to test all words to see if
: they're uppercase.  I went to several sites which discuss pattern
: matching but can't quite figure it out.  The code will look something
: like this:
: 
: sub allcaps {
:     $all_caps_found=0;

You might want to get into the habit of making most variables lexical
(my).  It'll avoid all kinds of hairy errors down the road.  Similarly,
passing the text to be tested in as an argument is usually a much better
idea than using a global like $body.

:     if ($body =~ /w[A-Z]) {

That's a syntax error.  It's usually best to cut and paste actual running
code, to avoid silliness like this.  Also, you refer to a \w below, but
all I see is a literal 'w' here (followed by the char. class).

:          $all_caps_found = 1;
:     }
: 
:     if ($all_caps_found == 1) {
:       &error(allcaps);

What's that argument to error?  Should it have quotes?

:    }

Why go to all the trouble of conditionally setting a flag, then
conditionally calling a function based on the flag?

: I know the \w[A-Z] part is wrong and I do want it to see if every word
: is uppercase.  If anyone could help me out with matching all uppercase
: text words, I would really appreciate it.

One of my favorite programming metahints is to try inverting your logic to
see if that simplifies things.  What's the inverse-(fuzzy)-logic form of
the informal specification "Text containing all uppercase"?  Why, "Text
containing no lowercase".  Thus:

  sub allcaps     # Might rename reject_allcaps or the like...
  {
    my $text = shift;
    &error('allcaps') unless $text =~ /[a-z]/;
  }

Note that this version also requires that the message contain at least one
lowercase letter (that is, empty posts, or those containing only
nonletters, are rejected along with those containing only uppercase
letters).  That could well be a good thing, given the application. 
However, I'd tend to write a general message validator, that tests
specifically for various possible reasons to reject this message: 

  sub validate_msg
  {
    my $text = shift;
    &error('empty')   if     $text eq '';
    &error('blank')   if     $text =~ /^\s+$/;
    &error('notext')  unless $text =~ /\w/;
    &error('allcaps') unless $text =~ /[a-z]/;
  }

HTH...

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Tue, 11 Aug 1998 15:03:16 -0700
From: Matt Roper <mattrope@mdhost.cse.tek.com>
To: Stewart Eastham <sme@planetpod.com>
Subject: Re: PERL and HTACCESS
Message-Id: <Pine.SUN.3.95q.980811150222.11607S-100000@tekgp2.cse.tek.com>

> > >The other thing I am wondering, along the same lines, is it possible for
> > >PERL to retrieve the name and password that a user has entered into a
> > >.htaccess pop-up box?  Then, based on their login, I could output a
> > >page, through a PERL script, with conditional outputs.
> >
> > with mod_perl you can get both.
> 
> I downloaded the mod_perl module, but couldn't quite figure out how to use it
> to serve my purposes.  I also downloaded the HTTPD module, which seemed to
> have something related to authenticating .htaccess user through PERL, as
> well.  Again, though, I couldn't figure out which code is directly applicable
> to what I need to do.
> 
> Any sample code would be greatly appreciated.  Thanks
> 
> stewart eastham
> sme@planetpod.com
> 

I don't know about the password, but I think the name gets stored in
$ENV{REMOTE_USER}.


============================
Matt Roper
Tektronix, Inc.
(503) 627-2023
mattrope@mdhost.cse.tek.com



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

Date: Tue, 11 Aug 1998 15:16:56 -0600
From: Richard Ferreri <raf@fc.hp.com>
Subject: Perl Debugger Problem?
Message-Id: <35D0B4C8.572745AE@fc.hp.com>

Hi,

When debugging my perl scripts (that use SWIG-generated perl modules and
wrapper code) using the perl debugger, I will eventually get the
following message:

  "99 levels deep in subroutine calls!"

At this point, I'm pretty dead in the water.  This is strange only
because I'm not really that many levels deep at all.  If I do a stack
trace, I'm usually 0 to 3 levels deep.

Another problem we're seeing when using the Perl debugger is that we
eventually hit a point where we can no longer use "n" to step over
subroutine calls.  Using "n" works fine for a while, but then
eventually, just does the equivalent of a continue.

In looking into this a bit, I believe the two problems are related.  I
looked at the "perl5db.pl" file and found that I could set "$deep" to 0
as a workaround to the first problem.  But, this does not help me with
the second problem.  It appears that perl5db.pl keeps an array called
"@stack" to keep track of the subroutine call depth at any point.  I
think that there are occasions where things aren't getting properly
popped off of this stack, which then slowly creeps.

But, I'm surprised that nobody else has run into this problem, so I'm
guessing that there is something unique to the way in which we are using
perl.

As background, I've inherited some code that uses SWIG (using shadow
classes) to generate a number of perl modules that interface to a lot of
C++ objects.  I can reproduce the problem by using just a couple of
these modules which make about 25 different perl packages visible.  One
module in particular has about 20 of these object classes.  About 16 of
these all inherit from a common ancestor.  The common ancestor provides
storage for, and common methods to, data such as object names, the
object type, and a list of properties attached to that object.  These
objects represent a lot of hierarchical information, so is it very
common for the perl applications to make lots of calls to different
object methods to do traversals.

Does this ring any bells with anyone?  Are there any known fixes or
workarounds I might try?

I'd appreciate any help or pointers you might have.

Thanks a bunch,

Rick Ferreri
raf@fc.hp.com


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

Date: Tue, 11 Aug 1998 20:46:30 GMT
From: PAntoniades@OpenSolutions.com
Subject: Re: reading formatted mainframe data in perl
Message-Id: <6qqaj6$86m$1@nnrp1.dejanews.com>

In article <Pine.GSO.4.02.9808110940410.10161-100000@user2.teleport.com>,
  Tom Phoenix <rootbeer@teleport.com> wrote:
> On Tue, 11 Aug 1998 philippos@my-dejanews.com wrote:
>
> > we are faced with the daunting task of having to unpack, reformat, and
> > otherwise convert various types of mainframe data (e.g. cobol formats,
> > EBCDIC fields, etc.) from a variety of sources.  The particular
> > problem right now is determining the format of a COBOL file without
> > any layout information, and with reflexive fields in the format.
>
> Maybe the docs, FAQs, and newsgroups about COBOL could be of help to you
> here. Once you know the format, it's generally easy to convert it with
> Perl. Good luck!
>
> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/
No, actually, it doesnt appear to be.  perhaps there is a module or function
that we havent found, but unpack() does not appear to be able to handle COMP-3
packed data, or read by nybbles to decypher REDEFINED structures.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 11 Aug 1998 22:59:39 GMT
From: Gregory Tod <gtod@netscape.net.au>
Subject: Re: reading formatted mainframe data in perl
Message-Id: <6qqicr$knn$1@otis.netspace.net.au>

PAntoniades@OpenSolutions.com wrote:
> No, actually, it doesnt appear to be.  perhaps there is a module or function
> that we havent found, but unpack() does not appear to be able to handle COMP-3
> packed data, or read by nybbles to decypher REDEFINED structures.

Perl or not, the last time I did this (not in Perl) I had to break
down and work a byte at a time.  Those COMP-3s are fun -- I'd be
very suprised if there weren't COBOL docs on how to work with them.

In any case, Perl and specifically unpack _will_ be able to translate
your data, you just may have to get into some math and/or bit twiddling.
Check out all those specifiers.

Regarding a module, I'd be very interestd to hear how you go.  If there
is _not_ one I just might write one -- this might be a growth industry :)

Comments from others on using Perl to breakdown mainframe stuff? 

-- 
Gregory Tod   gtod@netspace.net.au


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

Date: Tue, 11 Aug 1998 21:06:18 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Reading/parsing my mail spool file with Perl
Message-Id: <Pine.GSO.4.02.9808111404350.10161-100000@user2.teleport.com>

On Tue, 11 Aug 1998, quinn coldiron wrote:

> Does anybody know of a perl script that will read a spool file from
> sendmail, and parse out the individual messages.  I wrote my own and can
> parse out the header into individual cpmonents, but get all screwed up
> with the message.  Any ideas?

It sounds as if you may need to know the format of the file. The docs,
FAQs, and newsgroups about sendmail should be able to help here. Good
luck!

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



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

Date: 11 Aug 1998 13:55:33 -0700
From: hirano@Xenon.Stanford.EDU (Kelly Hirano)
Subject: Re: regex lookbehind
Message-Id: <6qqb45$6jt@Xenon.Stanford.EDU>

In article <35D0ADEE.3D81@datahost.com>,
Michael Stearns  <michael@datahost.com> wrote:
>How can I form a regex that will match this:
>
><A
>
> NAME="Xacy96092"></A>
>
>But not this:
>
><H3><A
>
> NAME="Xacy96092"></A>
>
>
>In other words, it will only matched if the string is not preceded by
><H3>.

from perldoc perlre (i quoted the entire zero-width negative lookahead part
for completeness -- the important part is in the second paragraph):

       (?!pattern)
                 A zero-width negative lookahead assertion.  For
                 example /foo(?!bar)/ matches any occurrence of
                 "foo" that isn't followed by "bar".  Note
                 however that lookahead and lookbehind are NOT
                 the same thing.  You cannot use this for
                 lookbehind.

                 If you are looking for a "bar" that isn't
                 preceded by a "foo", /(?!foo)bar/ will not do
                 what you want.  That's because the (?!foo) is
                 just saying that the next thing cannot be
                 "foo"--and it's not, it's a "bar", so "foobar"
                 will match.  You would have to do something like
                 /(?!foo)...bar/ for that.   We say "like"
                 because there's the case of your "bar" not
                 having three characters before it.  You could
                 cover that this way:
                 /(?:(?!foo)...|^.{0,2})bar/.  Sometimes it's
                 still easier just to say:

                     if (/bar/ && $` !~ /foo$/)

                 For lookbehind see below.

-- 
Kelly William Hirano	                    Stanford Athletics:
hirano@cs.stanford.edu	                 http://www.gostanford.com/
hirano@alumni.stanford.org      (WE) BEAT CAL (AGAIN)! 100th BIG GAME: 21-20


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

Date: 11 Aug 1998 21:46:20 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: rounding script?
Message-Id: <6qqe3c$3v9$1@csnews.cs.colorado.edu>

In comp.lang.perl.misc, Brian Meehan <meehan1@mail.idt.net> writes:
:Could anyone point me to a place to find a script that will round
:numbers to a to certain digit place.  This is for a a script that is
:parsing financial data.

I have a nifty idea: some kind soul should mail this poor fellow the
perl manual he forgot to look at.  In fact, maybe one should send him
the *whole* manual. :-)

--tom
-- 
    echo "I can't find the O_* constant definitions!  You got problems."
            --The Configure script from the perl distribution


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

Date: 11 Aug 1998 22:05:37 GMT
From: Niklas Matthies <matthies@fsinfo.cs.uni-sb.de>
Subject: Re: rounding script?
Message-Id: <6qqf7h$53a$1@hades.rz.uni-sb.de>

In comp.lang.perl.misc, Tom Christiansen <tchrist@mox.perl.com> writes:
> In comp.lang.perl.misc, Brian Meehan <meehan1@mail.idt.net> writes:
> :Could anyone point me to a place to find a script that will round
> :numbers to a to certain digit place.  This is for a a script that is
> :parsing financial data.
> 
> I have a nifty idea: some kind soul should mail this poor fellow the
> perl manual he forgot to look at.  In fact, maybe one should send him
> the *whole* manual. :-)

In PDF format? <g>

-- Niklas


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

Date: Tue, 11 Aug 1998 21:55:57 GMT
From: stevenba@carr.org
Subject: search text in specific columns
Message-Id: <6qqele$e2u$1@nnrp1.dejanews.com>

Hi.  I'm very new to Perl, so please excuse me if this is not the correct
forum or the answer is obvious.

Can anyone tell me if (and if so, how & where) to search a text file in
specific columns? or search beginning in column X? Are there any existing
tools to do this? Are there any such 'window'-like facilities?	(like samples
I saw in 'widgets') after I installed Perl?

Thanks in advance.

Steve Barbash

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 11 Aug 1998 15:29:47 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: search text in specific columns
Message-Id: <MPG.103a65b710a3790d989765@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <6qqele$e2u$1@nnrp1.dejanews.com> on Tue, 11 Aug 1998 21:55:57 
GMT, stevenba@carr.org <stevenba@carr.org> says...
 ...
> Can anyone tell me if (and if so, how & where) to search a text file in
> specific columns? or search beginning in column X?

You cannot search a text file using Perl.  You have to read the file into 
memory, typically line by line.  Then you can use the substr function to 
look at each line as it is read; or you can read the whole file into an 
array of lines and then examine them.

perldoc -f substr

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


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

Date: Tue, 11 Aug 1998 22:56:23 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: search text in specific columns
Message-Id: <Pine.GSO.4.02.9808111543310.10161-100000@user2.teleport.com>

On Tue, 11 Aug 1998 stevenba@carr.org wrote:

> Can anyone tell me if (and if so, how & where) to search a text file
> in specific columns?

There are several steps to doing this. Maybe you want to use split? Hope
this helps!

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



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

Date: Tue, 11 Aug 1998 21:54:48 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: Self-printing code
Message-Id: <6qqej7$dp5$1@nnrp1.dejanews.com>

In article <6qn9un$d0t$1@nnrp1.dejanews.com>,
  Robin Houston <robin.houston@guardian.co.uk> wrote:
> Last week there was a thread about perl programs which print their
> own source (without reading it in). Someone perceptively pointed
> out that the shortest such program was the null script - a
> zero-length file.
>
> Aside from this trivial case, what's the shortest such program?
[snip]

Although cheating and not portable to boot, on Gurusamy Sarathy
Perl 5.004_02 for Win32, a file named 'print$0' with the one liner:

print$0

works. Note the lack of a semicolon on the end. Doesn't even throw a
warning with -w ! (why not?)

Patrick Timmins
U. Nebraska Medical Center

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 11 Aug 1998 18:42:40 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Self-printing code
Message-Id: <comdog-ya02408000R1108981842400001@news.panix.com>
Keywords: from just another new york perl hacker

In article <r8n29cazb5.fsf@asc.sps.mot.com>, Martin Gregory <mgregory@asc.sps.mot.com> posted:

>comdog@computerdog.com (brian d foy) writes:

kay, let's see if i can trigger Randal's Cat Detector(tm)
>> 
>>    #!/usr/bin/perl
>> 
>>    system '/bin/cat', $0;
>> 
>>    __END__
>> 
>
>Who made the rules here?  How come this isn't cheating as well? - It
>reads it source (in through ``, out through STDOUT)..

but the script doesn't read in the source!  the cat output is just
sent to STDOUT.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>


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

Date: Tue, 11 Aug 1998 21:57:01 GMT
From: newsletter-account@gmx.de (Andreas F.)
Subject: TIMING outgoing mails, use Perl and UNIX' CronJobs ?, Scripts available ?
Message-Id: <35d0b8c3.33190859@news.fh-friedberg.de>

Hello,

I posted this to comp.lang.perl.modules
about two weeks ago with no results and
hope, there is anyone in this group, who
can give advice.

My problem is:

I send out a weekly newsletter and now have
a  larger archive of older ones. I want to offer
my site visitors the opportunity to receive the
archived newsletters via  eMail. They should
choose with a HTML drop-down-form the
intervals "Receive one newsletter per day",
"Receive one newsletter per week" and so on ...

The visitor leaves his mail-adress, submits the
form  - and will receive the mails in the  predefined
intervals. The old newsletters are stored on my server
as a .txt file. 

To make this happen I think UNIX's CronJob/ crontab
together with a script in Perl should be used ... ?????

Has anybody worked on a similar problem ? Are there
any scripts available yet, matching my "wish-list" ?
I searched the net and didn't find any solution.

Any input is appreciated. You can send to NG or
<mailto:andreas.frenko@gmx.de>

Thanks a lot !
Andreas Frenko



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

Date: Tue, 11 Aug 1998 22:58:28 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: TIMING outgoing mails, use Perl and UNIX' CronJobs ?, Scripts available ?
Message-Id: <Pine.GSO.4.02.9808111557380.10161-100000@user2.teleport.com>

On Tue, 11 Aug 1998, Andreas F. wrote:

> To make this happen I think UNIX's CronJob/ crontab
> together with a script in Perl should be used ... ?????

Sounds like the way to do it. Good luck with it!

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




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

Date: Tue, 11 Aug 1998 14:20:08 -0700
From: Ajay Mittal <ajaym@hooked.net>
Subject: warning messages from Perl
Message-Id: <35D0B587.753240EE@hooked.net>

Hello!

One of our AIX 4.2 machine gives the following warning messages when
Perl
executable (hence every Perl script) is run

warning: setlocale_(LC_CTYPE,"") failed
warning: LC_ALL = "(null)", LC_TYPE= "(null)", LANG="English"...
warning:falling back to "C" locale


anybody seen this before or any clue?

thanks
-ajay



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

Date: 11 Aug 1998 21:02:38 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: What is the purpose of Perl
Message-Id: <6qqbhe$t11@mozo.cc.purdue.edu>

cberry@cinenet.net (Craig Berry) writes:

}Andre Merzky (am@am.westblaak.spirit.nl) wrote:
}: A final questin remains: Is the universe open or closed?

}Not only is it open, it's also free-in-the-Gnu-sense. :)

Nope, it's proprietary.  But I know some physicists who would
kill to see the source code.  I just wish that the part in the license
agreement about "heat can never pass spontaneously from a colder to a
hotter body" would be removed.
 

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: Tue, 11 Aug 1998 22:27:41 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: What is the purpose of Perl
Message-Id: <8cn29bm9wu.fsf@gadget.cscaper.com>

>>>>> "Michael" == Michael J Gebis <gebis@fee.ecn.purdue.edu> writes:

Michael> Nope, it's proprietary.  But I know some physicists who would
Michael> kill to see the source code.

Well, I have a source license for my *vehicle*.  That's a start.

Yeah, seriously, my plates are custom plates ("Oregon Trail!") with
"SOURCE".  I used to have "BINARY", but the last time I bought a car,
I upgraded.  :-) Now my brother has those.

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Tue, 11 Aug 1998 17:12:34 -0400
From: Marco Moreno <mmoreno@cas.org>
Subject: What's the most efficient regex to force NOT matching any char? (repost)
Message-Id: <35D0B3C2.CF354404@cas.org>

(This is a repost as my previous posting had no bites ;)

I would like to iterate thru a string and skip over as many chars as
possible that don't need anything done to them, but stop and perform
some conversion on each char that does not match a regex.  The regex
may vary depending on the data format and would be defined by a
variable at runtime.

My question is:  If I want to force the conversion of every char, what
is the most efficient regex I should use to force an unsuccessful
match of the pass-thru regex?

I've thought of "[^\x00-\xFF]" and "(?!.)", but is there something
better?

Here is a blurb of what I'm trying to do:

$passthru_regex = get_regex();  # What should I assign here?

while ($orig_string =~ m{\G

        # Match as many characters as possible
        # that can be passed thru as-is
        ($passthru_regex+)

        # Otherwise, get the next 2-byte char
        | (..)

        }gosx)
{
    my $passthru_string = $1;
    my $char = $2;

    if (defined $passthru_string) {
        print $passthru_string;
    } else {
        print do_something($char);
    }
}

Incidently, using "(?!.)" on 5.004_01 spewed something like:

/((?!.)+)|(.)/: regexp *+ operand could be empty at (eval 20) line 2.

though it no longer does on 5.005.  Should this construct be avoided
or was that a bug?

Thanks!

Marco Moreno
mmoreno@cas.org


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

Date: Tue, 11 Aug 1998 22:59:14 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
To: Seth David Johnson <sjohns17@uic.edu>
Subject: Re: Win32::ODBC
Message-Id: <35D12F32.154B@comenius.ms.mff.cuni.cz>

Seth David Johnson wrote:
> 
> I recently installed the ODBC module for Win32. I have been using release
> 316 (I think) of ActiveState's port. Since I was getting "parse exception"
> errors when I tried to use the module, I decided to downgrade to release
> 307 of Win32, on which, according to Dave Roth's FAQ, the module should
> work fine. It didn't. I then tried release 304. I still get the parse
> exception error. Any suggestions?
> 
> -Seth Johnson

You are using incorrect version of ODBC.pll.
If I remember right, there was a directory named "beta"
in the archive. Extract the ODBC.pll from this directory and save 
it in c:\perl\lib\Auto\Win32\ODBC\ directory (instead of
the one that is already there).

I use Win32::ODBC with 316 with no problems.

HTH, Jenda


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

Date: 11 Aug 1998 21:14:01 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: X-file (?=...), case postponed.
Message-Id: <6qqc6p$d0c$2@client3.news.psi.net>

Patrick Timmins (ptimmins@netserv.unmc.edu) wrote on MDCCCVI September
MCMXCIII in <URL: news:6qprfb$hoj$1@nnrp1.dejanews.com>:
++ 
++ Do I finally get it?

No. Not really. And yes, it's documented:

A pattern matching the null string (not to be confused with
a null pattern C<//>, which is just one member of the set of patterns
matching a null string) will split the value of EXPR into separate
characters at each point it matches that way.

 ....

If the PATTERN contains parentheses, additional array elements are
created from each matching substring in the delimiter.

(From 'perldoc -f split')



Abigail
-- 
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")\n-> define ("foldoc", "perl")) [0] -> print'


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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 V8 Issue 3421
**************************************

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