[32145] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3410 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 12 00:09:24 2011

Date: Sat, 11 Jun 2011 21:09:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 11 Jun 2011     Volume: 11 Number: 3410

Today's topics:
    Re: [RegEx] Optional parameter <rweikusat@mssgmbh.com>
    Re: [RegEx] Optional parameter <rweikusat@mssgmbh.com>
    Re: [RegEx] Optional parameter <uri@StemSystems.com>
    Re: [RegEx] Optional parameter <cwilbur@chromatico.net>
    Re: [RegEx] Optional parameter <uri@StemSystems.com>
    Re: [RegEx] Optional parameter <hjp-usenet2@hjp.at>
    Re: Module for parsing .authinfo? <brad.clawsie@gmail.com>
        Please code review and... <scottie383@gmail.com>
    Re: Please code review and... <tadmc@seesig.invalid>
        Regex Matching <dnlchen@gmail.com>
    Re: Regex Matching <rweikusat@mssgmbh.com>
    Re: Regex Matching <dnlchen@gmail.com>
    Re: Regex Matching <jimsgibson@gmail.com>
    Re: Regex Matching <praveenzx@gmail.com>
    Re: Regex Matching sln@netherlands.com
    Re: Regex Matching <dnlchen@gmail.com>
    Re: test <sherm.pendley@gmail.com>
    Re: Unicode labels with Chart::Composite (David Combs)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 10 Jun 2011 22:35:27 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: [RegEx] Optional parameter
Message-Id: <87r571cqu8.fsf@sapphire.mobileactivedefense.com>

"Uri Guttman" <uri@StemSystems.com> writes:
>>>>>> "RW" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>
>   RW> Technically, this is a libellous statement you have made about me
>   RW> despite knowing that it is wrong because you happen to disagree with
>   RW> an opinion in favor of which I argued.
>
> that is a very insane comment.

This is a perfectly accurate comment. In a completely different
posting than the one you were replying to, I wrote that I don't see
any compelling benefit in adding 'use warnings' to every Perl file
written when compared to doing 'compiler-style' automatic checking by
running perl -cw -Mstrict on changed files. To this, you (contextually
completely misplaced) reacted with

	if you coded that way regularly, i would never hire you or
	place you in a perl job. there are special cases where that
	warning can be turned off but to do in generally means you are
	not caring about your code and data.

IOW, instead of trying to find a convincing argument in favor of

	# The magic incantation! The Gods will eat all those
        # sinners who don't and all those sceptics who dare
        # to doubt !!1
        #
	use abracadabra;
        use zebrakadaver;

you assert that I "wouldn't care about my code or data". This is at
least a grave insult and given that I do use warnings, it is
essentially a lie you published about me. And knowingly making false
statements about others in public in order to damage their reputation
(as much as possible) is ... well ... libel.

I didn't request that you publish your baseless assumptions about me.



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

Date: Fri, 10 Jun 2011 22:46:36 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: [RegEx] Optional parameter
Message-Id: <87hb7xcqbn.fsf@sapphire.mobileactivedefense.com>

Rainer Weikusat <rweikusat@mssgmbh.com> writes:

[...]

> IOW, instead of trying to find a convincing argument in favor of
>
> 	# The magic incantation! The Gods will eat all those
>         # sinners who don't and all those sceptics who dare
>         # to doubt !!1
>         #
> 	  use abracadabra;
>         use zebrakadaver;

Something I'd like to add: I would be very happy to actually see such
an argument instead of the usual two reactions, namely,

	a) Everyone [whom I consider to be relevant] says so.
        b) You are just trying to get away with your sloopy code !!!

        


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

Date: Fri, 10 Jun 2011 17:48:18 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: [RegEx] Optional parameter
Message-Id: <87ei31uzml.fsf@quad.sysarch.com>

>>>>> "RW" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:

  RW> "Uri Guttman" <uri@StemSystems.com> writes:
  >>>>>>> "RW" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
  >> 
  RW> Technically, this is a libellous statement you have made about me
  RW> despite knowing that it is wrong because you happen to disagree with
  RW> an opinion in favor of which I argued.
  >> 
  >> that is a very insane comment.

  RW> This is a perfectly accurate comment. In a completely different
  RW> posting than the one you were replying to, I wrote that I don't see
  RW> any compelling benefit in adding 'use warnings' to every Perl file
  RW> written when compared to doing 'compiler-style' automatic checking by
  RW> running perl -cw -Mstrict on changed files. To this, you (contextually
  RW> completely misplaced) reacted with

  RW> 	if you coded that way regularly, i would never hire you or
  RW> 	place you in a perl job. there are special cases where that
  RW> 	warning can be turned off but to do in generally means you are
  RW> 	not caring about your code and data.

that is correct too. i place perl people for a living. i know what works
and doesn't in many companies. disabling strict because you like leaving
things undef and turning on no warnings for that would mean places won't
hire you. that is a fact. i wouldn't want to submit you to places for
that reason alone. this isn't libel, this is business.

  RW> you assert that I "wouldn't care about my code or data". This is
  RW> at least a grave insult and given that I do use warnings, it is
  RW> essentially a lie you published about me. And knowingly making
  RW> false statements about others in public in order to damage their
  RW> reputation (as much as possible) is ... well ... libel.

i said what i said. you can take it as you wish. but calling it libel is
insane. 

  RW> I didn't request that you publish your baseless assumptions about me.

but i did say it. so what? you get your jobs your way, i place perl
people my way. i interview and do deep code reviews and i would mark
your code down massively for that attitude about undef warnings.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Sat, 11 Jun 2011 11:45:11 -0400
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: [RegEx] Optional parameter
Message-Id: <86pqmktlrs.fsf@mithril.chromatico.net>

>>>>> "RW" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:

    RW> you assert that I "wouldn't care about my code or data". This is
    RW> at least a grave insult and given that I do use warnings, it is
    RW> essentially a lie you published about me. And knowingly making
    RW> false statements about others in public in order to damage their
    RW> reputation (as much as possible) is ... well ... libel.

Someone threatens a libel suit over opinions expressed on Usenet!  

Dick-waving contests were interesting when I was about 14.  

And yes, uri, there are places that will hire programmers with abysmally
bad coding practices.  If Herr Weikusat is looking for work and persists
in his attitude that he knows better than anyone else possibly can, I
can refer him to at least one where he will fit in perfectly and
probably even be promoted to architect.

Charlton




-- 
Charlton Wilbur
cwilbur@chromatico.net


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

Date: Sat, 11 Jun 2011 12:45:22 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: [RegEx] Optional parameter
Message-Id: <8762ocnwpp.fsf@quad.sysarch.com>

>>>>> "CW" == Charlton Wilbur <cwilbur@chromatico.net> writes:

>>>>> "RW" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
  RW> you assert that I "wouldn't care about my code or data". This is
  RW> at least a grave insult and given that I do use warnings, it is
  RW> essentially a lie you published about me. And knowingly making
  RW> false statements about others in public in order to damage their
  RW> reputation (as much as possible) is ... well ... libel.

  CW> Someone threatens a libel suit over opinions expressed on Usenet!  

  CW> Dick-waving contests were interesting when I was about 14.  

man bites dog! film at 11.

  CW> And yes, uri, there are places that will hire programmers with abysmally
  CW> bad coding practices.  If Herr Weikusat is looking for work and persists
  CW> in his attitude that he knows better than anyone else possibly can, I
  CW> can refer him to at least one where he will fit in perfectly and
  CW> probably even be promoted to architect.

i am sure i know the place! :)

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Sat, 11 Jun 2011 18:59:57 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: [RegEx] Optional parameter
Message-Id: <slrniv77oe.a97.hjp-usenet2@hrunkner.hjp.at>

On 2011-06-09 22:03, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
> On 2011-06-09, Rainer Weikusat <rweikusat@mssgmbh.com> wrote:
>>
>> Out of my head, I know at least two cases where perl prints nonsense
>> warnings and use of 'no warning' is thus entirely legitimate:
>>
>> 	- the already mentioned case of the 'uinitialized variable':
>>           Technically, there is no such thing as an 'unitialized
>>           variable' in Perl (meaning, something whose value is
>>           essentially random, as would be the case in C). All
>>           variables start out with a value of 'undef' and this will be
>>           interpreted as 0 or '' if need be.
>
> All "uninitialized" means in this context is that no value has actually
> been assigned by the program.

No.

Consider this little program:

#!/usr/bin/perl
use warnings;
use strict;

my $foo = 'foo';
$foo = undef;

print "the value is $foo\n";
__END__

which produces the output

------------------------------------------------------------------------
Use of uninitialized value $foo in concatenation (.) or string at ./foo line 8.
the value is 
------------------------------------------------------------------------

$foo is assigned a value not only once in this program, but twice!

But you still get the warning.

What the warning actually means is that you use an undefined value in a
context where a defined value is expected. It has nothing to do with
assignments or initializations. It is simply bad wording. The warning
should read

Use of undefined value ...

(seriously, what would an "uninitialized value" be? You can initialize a
variable but not a value)

	hp




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

Date: Fri, 10 Jun 2011 23:19:36 -0700 (PDT)
From: brad <brad.clawsie@gmail.com>
Subject: Re: Module for parsing .authinfo?
Message-Id: <24fa9caf-34ab-46f5-b562-dc870b83d698@glegroupsg2000goo.googlegroups.com>

hi! oddly enough i had the problem of parsing .authinfo files crop up recently and i decided to start a File::Authinfo pkg. i should have it done and uploaded to cpan in a few days (hopefully)

i will try to accomodate some of the suggestions made here. if people would rather just see this work be folded into Net::Netrc, i can back off

thanks
brad


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

Date: Fri, 10 Jun 2011 15:32:44 -0700 (PDT)
From: Scottie <scottie383@gmail.com>
Subject: Please code review and...
Message-Id: <ce91b98c-d252-4348-ac75-34a49b801a92@k17g2000vbn.googlegroups.com>

 ... and if you have some free time, offer better solutions.

Hi,
I have written a small program in Perl which reads in Oracle RMAN log
file* and parses it to human friendly format.

Do you have some free time during the weekend? Would you like to play
with parsing non-standard, mixed up and a bit difficult** log file? Or
do want to parse better than I did? Just download my Perl script from
the Launchpad site: http://goo.gl/2Fb7G

Or, If you use Bazaar you can also get my branch in simple way:
bzr branch lp:~scottie383/+junk/parse-rman-log

Later you can update your branch with me:
bzr push lp:~scottie383/+junk/parse-rman-log

*) In this case, the log file (output of RMAN) I put in the __DATA__
section in .pl file.

**) One of the the problem is that information to the file are not
always recorded in sequence and sometimes intertwined. For example:
Channel ch2 starting:
=A0channel ch2: starting piece 1 at 2011-05-31 02:00:06=A0
Channels ch1 and ch3 finishing before ch2:
=A0channel ch1: finished piece 1 at 2011-05-31 02:34:54
=A0(...)=A0
=A0channel ch3: finished piece 1 at 2011-05-31 02:46:44
And a channel ch2 finished much later:
=A0channel ch2: finished piece 1 at 2011-05-31 02:47:54

Have fun and enyoj!! :-)

P.S. Please indulgence for me - a beginner Perl programmer.

Best regards,
--
Scottie


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

Date: Fri, 10 Jun 2011 20:15:26 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Please code review and...
Message-Id: <slrniv5g16.cmc.tadmc@tadbox.sbcglobal.net>

Scottie <scottie383@gmail.com> wrote:

> Just download my Perl script from
> the Launchpad site: http://goo.gl/2Fb7G

    #!/usr/bin/perl -w
    ...
    use warnings;

Choose which kind of warnings you want, then enable only that kind.

(lexical warnings are usually the best choice)



    if ( $_ =~ /${RMAN_RUN_CH_NAME}${i}/ ) {

too many unnecessary squiggly lines, should be:

    if ( $_ =~ /$RMAN_RUN_CH_NAME$i/ ) {
or
    if ( /$RMAN_RUN_CH_NAME$i/ ) {



My other comments are nitpicks, the following one is important:

    ( $backup_compressed eq 'compressed' ) ? ($bc = 'YES') : ($bc = 'NO');

that is an abuse of the ?: operator.

the ?: operator should be used to _provide a value_, it should not
be used for flow control.

too many curvy lines too.

    $bc = $backup_compressed eq 'compressed' ? 'YES' : 'NO';


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.


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

Date: Fri, 10 Jun 2011 15:49:02 -0700 (PDT)
From: DanielC <dnlchen@gmail.com>
Subject: Regex Matching
Message-Id: <654d9a76-d747-4a13-83af-6964071c90ea@r27g2000prr.googlegroups.com>

The output is expected to be "4" which means 4 lines match. However it
gets "5".  How can I make this script work?

test.txt:

AA::Task::AAAA (cId,315,sId,6)
AA::Task::AAAA (cId,244,ret,1,sId,2)
AA::Task::AAAA (cId,24,sId,13)
AA::Task::AAAA (cId,2,sId,3)
AA::Task::AAAA (cId,2,sId,3)
AA::Task::AAAA --cId 2 --sId 3
AA::Task::AAAA --cId 2 --sId 3
AA::Task::BBBB
AA::Task::CCCC (cId,315)
AA::Task::CCCC (cId,206)
AA::Task::DDDD

script:

#!/usr/bin/perl

use strict;
use warnings;

my $PSNOW="test.txt";
open(FH, $PSNOW) or die "Can't open $PSNOW: $!";
my @lines = <FH>;
my $task="AA::Task::AAAA";

my @arglist=qw(cId 2 sId 3);
my $pattern = $task . '.*' . join('.*',@arglist);
my $count = scalar grep { /$pattern/ } @lines;
print "$count\n";



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

Date: Fri, 10 Jun 2011 23:58:28 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Regex Matching
Message-Id: <87d3ilcmzv.fsf@sapphire.mobileactivedefense.com>

DanielC <dnlchen@gmail.com> writes:
> The output is expected to be "4" which means 4 lines match. However it
> gets "5".  How can I make this script work?

It works. You regexp is

AA::Task::AAA.*cId.*2.*sId.*3

and it matches these lines:

> AA::Task::AAAA (cId,24,sId,13)
> AA::Task::AAAA (cId,2,sId,3)
> AA::Task::AAAA (cId,2,sId,3)
> AA::Task::AAAA --cId 2 --sId 3
> AA::Task::AAAA --cId 2 --sId 3

A regexp matching only the last four lines would be (untested)

AA::Task::AAA.*cId.2.*sId.3

> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> my $PSNOW="test.txt";
> open(FH, $PSNOW) or die "Can't open $PSNOW: $!";
> my @lines = <FH>;
> my $task="AA::Task::AAAA";
>
> my @arglist=qw(cId 2 sId 3);
> my $pattern = $task . '.*' . join('.*',@arglist);
> my $count = scalar grep { /$pattern/ } @lines;
> print "$count\n";

but please put that into your obfuscated format of choice yourself ...


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

Date: Fri, 10 Jun 2011 16:45:54 -0700 (PDT)
From: DanielC <dnlchen@gmail.com>
Subject: Re: Regex Matching
Message-Id: <024ba9be-9aa2-4711-8602-6610560e2fe6@17g2000prr.googlegroups.com>

On Jun 10, 3:58=A0pm, Rainer Weikusat <rweiku...@mssgmbh.com> wrote:
> DanielC <dnlc...@gmail.com> writes:
> > The output is expected to be "4" which means 4 lines match. However it
> > gets "5". =A0How can I make this script work?
>
> It works. You regexp is
>
> AA::Task::AAA.*cId.*2.*sId.*3
>
> and it matches these lines:
>
> > AA::Task::AAAA (cId,24,sId,13)
> > AA::Task::AAAA (cId,2,sId,3)
> > AA::Task::AAAA (cId,2,sId,3)
> > AA::Task::AAAA --cId 2 --sId 3
> > AA::Task::AAAA --cId 2 --sId 3
>
> A regexp matching only the last four lines would be (untested)
>
> AA::Task::AAA.*cId.2.*sId.3
>
> > #!/usr/bin/perl
>
> > use strict;
> > use warnings;
>
> > my $PSNOW=3D"test.txt";
> > open(FH, $PSNOW) or die "Can't open $PSNOW: $!";
> > my @lines =3D <FH>;
> > my $task=3D"AA::Task::AAAA";
>
> > my @arglist=3Dqw(cId 2 sId 3);
> > my $pattern =3D $task . '.*' . join('.*',@arglist);
> > my $count =3D scalar grep { /$pattern/ } @lines;
> > print "$count\n";
>
> but please put that into your obfuscated format of choice yourself ...

This doesn't match very well. What if there is a line "AA::Task::AAAA
(cId,24,sId,33)" ?


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

Date: Fri, 10 Jun 2011 17:22:44 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Regex Matching
Message-Id: <100620111722447696%jimsgibson@gmail.com>

In article
<654d9a76-d747-4a13-83af-6964071c90ea@r27g2000prr.googlegroups.com>,
DanielC <dnlchen@gmail.com> wrote:

> The output is expected to be "4" which means 4 lines match. However it
> gets "5".  How can I make this script work?
> 
> test.txt:
> 
> AA::Task::AAAA (cId,315,sId,6)
> AA::Task::AAAA (cId,244,ret,1,sId,2)
> AA::Task::AAAA (cId,24,sId,13)

The above line matches.

> AA::Task::AAAA (cId,2,sId,3)
> AA::Task::AAAA (cId,2,sId,3)
> AA::Task::AAAA --cId 2 --sId 3
> AA::Task::AAAA --cId 2 --sId 3

As do these four.

> AA::Task::BBBB
> AA::Task::CCCC (cId,315)
> AA::Task::CCCC (cId,206)
> AA::Task::DDDD
> 
> script:
> 
> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> 
> my $PSNOW="test.txt";
> open(FH, $PSNOW) or die "Can't open $PSNOW: $!";
> my @lines = <FH>;
> my $task="AA::Task::AAAA";
> 
> my @arglist=qw(cId 2 sId 3);
> my $pattern = $task . '.*' . join('.*',@arglist);
> my $count = scalar grep { /$pattern/ } @lines;
> print "$count\n";

You should print out your generated regular expression, apply it to
your input, print which lines match and which do not, and figure out
why.

You may need to make sure that your expected digits (e.g., '2' and '3')
are not followed or preceded by another digit. You can use
lookahead/lookbehind assertions for this.

See 'perldoc perlre' and search for 'Look-Around Assertions'.

Hint: for posting programs with data, you can put the data at the end
of the program after a '__DATA__' line and use the <DATA> read operator
to read the lines.

-- 
Jim Gibson


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

Date: Sat, 11 Jun 2011 02:09:36 -0700 (PDT)
From: praveenzx <praveenzx@gmail.com>
Subject: Re: Regex Matching
Message-Id: <9c80e3a9-1937-49a5-b6c0-96c1ac673587@r33g2000prh.googlegroups.com>

Hey DanielC

Try this one..

#!/usr/bin/perl

use strict;
use warnings;

my $PSNOW="test.txt";
open(FH, $PSNOW) or die "Can't open $PSNOW: $!";
my @lines = <FH>;
my $task="AA::Task::AAAA";

my @arglist=qw(cId 2 sId 3);
my $pattern = $task . '[^0-9]*' . join('[^0-9]*',@arglist);

my $count = scalar grep { /$pattern/ } @lines;
print "$count\n";





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

Date: Sat, 11 Jun 2011 14:36:59 -0700
From: sln@netherlands.com
Subject: Re: Regex Matching
Message-Id: <iln7v6pi2o6n7a2d208f0q0o6couq5qmtd@4ax.com>

On Fri, 10 Jun 2011 15:49:02 -0700 (PDT), DanielC <dnlchen@gmail.com> wrote:

>The output is expected to be "4" which means 4 lines match. However it
>gets "5".  How can I make this script work?
>
>test.txt:
>
>AA::Task::AAAA (cId,315,sId,6)
>AA::Task::AAAA (cId,244,ret,1,sId,2)
>AA::Task::AAAA (cId,24,sId,13)
>AA::Task::AAAA (cId,2,sId,3)
>AA::Task::AAAA (cId,2,sId,3)
>AA::Task::AAAA --cId 2 --sId 3
>AA::Task::AAAA --cId 2 --sId 3
>AA::Task::BBBB
>AA::Task::CCCC (cId,315)
>AA::Task::CCCC (cId,206)
>AA::Task::DDDD
>
>script:
>
>#!/usr/bin/perl
>
>use strict;
>use warnings;
>
>my $PSNOW="test.txt";
>open(FH, $PSNOW) or die "Can't open $PSNOW: $!";
>my @lines = <FH>;
>my $task="AA::Task::AAAA";
>
>my @arglist=qw(cId 2 sId 3);
>my $pattern = $task . '.*' . join('.*',@arglist);
>my $count = scalar grep { /$pattern/ } @lines;
>print "$count\n";


I CAN'T !!!!

Why? Because I don't see any distinction in these or any
other possible unknown forms:

AA::Task::AAAA (cId,24,sId,13)
AA::Task::AAAA (cId,2,sId,3)
AA::Task::AAAA (cId,2,sId,3)
AA::Task::AAAA --cId 2 --sId 3
AA::Task::AAAA --cId 2 --sId 3

Do you?
Usually, regex is fairly simple once the form is known.
So, in general, the better you are at assesing the FORM,
the better the result.

-sln


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

Date: Sat, 11 Jun 2011 16:49:37 -0700 (PDT)
From: DanielC <dnlchen@gmail.com>
Subject: Re: Regex Matching
Message-Id: <f1cffcc1-5c07-403e-be09-51e9c953e971@k3g2000prl.googlegroups.com>

On Jun 11, 2:09=A0am, praveenzx <pravee...@gmail.com> wrote:
> Hey DanielC
>
> Try this one..
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> my $PSNOW=3D"test.txt";
> open(FH, $PSNOW) or die "Can't open $PSNOW: $!";
> my @lines =3D <FH>;
> my $task=3D"AA::Task::AAAA";
>
> my @arglist=3Dqw(cId 2 sId 3);
> my $pattern =3D $task . '[^0-9]*' . join('[^0-9]*',@arglist);
>
> my $count =3D scalar grep { /$pattern/ } @lines;
> print "$count\n";

my $pattern =3D $task . '[^0-9]*' . join('[^0-9]*',@arglist) . '(\)|$)';

yes, [^0-9]* is good for this case, plus '(\)|$)' make it perfect.

Is there any better match than [^0-9]*? [^0-9]* also matches 'cId" and
'sId'.


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

Date: Fri, 10 Jun 2011 17:04:34 -0400
From: Sherm Pendley <sherm.pendley@gmail.com>
Subject: Re: test
Message-Id: <m2y619cs9p.fsf@sherm.shermpendley.com>

Frank Seitz <devnull4711@web.de> writes:

> Sherm Pendley wrote:
>> Frank Seitz <devnull4711@web.de> writes:
>> 
>>> Dr.Ruud wrote:
>>>> On 2011-06-10 15:07, Frank Seitz wrote:
>>>>
>>>>
>>>> Your test failed.
>>>
>>> I apologize. I wanted to send the message to one of my
>>> email accounts, not to comp.lang.perl.misc.
>> 
>> In that case, the failure is even worse - not only did the message go
>> to the wrong place, it used the wrong protocol to get there. If you're
>> testing an NNTP client you've written, I'd say you have some debugging
>> to do. :-)
>
> I use Seamonkey. This Client hides the difference between mail
> and netnews nearly completely from the user.

Did it also hide the smiley face at the end of my comment?

It was a joke, I say, a joke son! I swear, that kid's at uptight as a
cat in a room full of rocking chairs. :-)

sherm--


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

Date: Sun, 12 Jun 2011 02:55:20 +0000 (UTC)
From: dkcombs@panix.com (David Combs)
Subject: Re: Unicode labels with Chart::Composite
Message-Id: <it19qo$7rm$1@reader1.panix.com>

About drawing charts, graphs, etc -- and the ease of doing so.

Sort both off and on topic -- Anywone here ever tried using
the Bell Labs (20 yrs ago) super-powerful statistics and
graphics package "The NEW S-Language",
since then privitized, and thus a from-scratch-developed 
open-source freebie version named "R"?

No, I haven't checked CPAN or google or anything -- it
merely came to mind while reading this thread.

If people here do know about R, and think it valuable,
at least for super-powerful graphics (charts, Chernov faces,
box plots, you name it), and it isn't already in CPAN --
well, should it be?

[purpose: to get a likely-interesting discussion going]


[do it myself?  No, this klutz can hardly get a 10-line
Perl program to compile the first (second?) time!]


Cheers!

David
 


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

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


Administrivia:

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

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#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 V11 Issue 3410
***************************************


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