[29418] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 662 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 19 14:10:07 2007

Date: Thu, 19 Jul 2007 11:09:06 -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           Thu, 19 Jul 2007     Volume: 11 Number: 662

Today's topics:
    Re: catch-ing unsatisfied ``use'' <bik.mido@tiscalinet.it>
    Re: Math <bik.mido@tiscalinet.it>
    Re: Math <bik.mido@tiscalinet.it>
    Re: Math <sisyphus1@nomail.afraid.org>
    Re: Math <bik.mido@tiscalinet.it>
    Re: new lines in the way <glennj@ncf.ca>
    Re: new lines in the way <bik.mido@tiscalinet.it>
    Re: pid from startet process <paduille.4061.mumia.w+nospam@earthlink.net>
    Re: pid from startet process xhoster@gmail.com
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
    Re: retrieving usenet messages III <bik.mido@tiscalinet.it>
        To know if a variable is a file handler <laffdez@gmail.com>
    Re: To know if a variable is a file handler <sisyphus1@nomail.afraid.org>
    Re: To know if a variable is a file handler <glennj@ncf.ca>
    Re: Use UTF-8 in Log::StdLog? <jerry@sheepsystems.com>
    Re: Using the split function <abigail@abigail.be>
    Re: Using the split function <bik.mido@tiscalinet.it>
    Re: Using the split function <scobloke2@infotop.co.uk>
    Re: Using the split function <usenet@larseighner.com>
    Re: Using the split function <bik.mido@tiscalinet.it>
    Re: Using the split function (Steven M. O'Neill)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 19 Jul 2007 15:24:49 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: catch-ing unsatisfied ``use''
Message-Id: <4gpu93542a6k1p758s489dgfjqdilpuatc@4ax.com>

On Wed, 18 Jul 2007 12:59:18 GMT, "David Formosa (aka ? the Platypus)"
<dformosa@usyd.edu.au> wrote:

>Perl has try and catch now?  My 5.8.8 definitly doesn't have anything
>looking like it.  Perhaps you mean 

There are modules providing them, as anything else! ;-)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 16:25:15 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Math
Message-Id: <upsu93htei7mcie2onosn05vs9scqo7lt1@4ax.com>

On Thu, 19 Jul 2007 08:36:50 +0200, Mirco Wahab
<wahab@chemie.uni-halle.de> wrote:

>There is already a Perl extension for vector and matrix
>computations, it's called 'PDL' (Perl Data language,
>see http://pdl.perl.org/) an an implementation of

Since documentation seems not to abound, it is worth mentioning, for
the interested reader, that "lino" is posting a number of articles and
snippets about it in PerlMonks: the following Super Search should
retrieve them; note that it doesn't bring you directly to the results
but simply preloads some search form fields.

http://perlmonks.org/?node_id=3989;BIT=pdl;a=lin0


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 16:27:27 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Math
Message-Id: <r2tu93l14cn3edksg731reh62kg5sh0ipi@4ax.com>

On Thu, 19 Jul 2007 01:46:54 -0000, Robert Hicks <sigzero@gmail.com>
wrote:

>Subject: Math

Maths!

>I realize that any math in Perl is probably slower than the same math
>in "C" but I was wondering if Perl was as accurate as "C" in math
>computations. I don't see why it wouldn't be but I thought I would ask
>as a heavy spherical math project is on the horizon.

With the usual caveat about "many parameters to take into account",
there shouldn't be a difference, but possibly for a Perl's dwimmery
not really doing what you want. And when accuracy becomes a relevant
issue, then you can use specialized packages, as hinted to by others.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Fri, 20 Jul 2007 01:33:52 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Math
Message-Id: <469f845e$0$18304$afc38c87@news.optusnet.com.au>


"Mirco Wahab" <wahab@chemie.uni-halle.de> wrote in message 
news:f7n0q3$26ae$1@nserver.hrz.tu-freiberg.de...
> Robert Hicks wrote:
>> I realize that any math in Perl is probably slower than the same math
>> in "C" but I was wondering if Perl was as accurate as "C" in math
>> computations. I don't see why it wouldn't be but I thought I would ask
>> as a heavy spherical math project is on the horizon.
>
> From my own experiences: Perl is not *that* slow in
> numerical thinks.

I'll (tentatively) agree with that.

>
> The "accuracy" is, as has been mentioned, in the
> normal IEEE "double" range. With only one additional
> line of code (eg. "use Math::BigFloat;"), one can get
> into almost "arbitary accuracy" mode
> (see: http://perldoc.perl.org/Math/BigFloat.html and others).
>

But now things *do* start to get noticeably slower ... to the extent that a 
"heavy spherical math project" may be better advised to use (instead of 
Math::BigFloat) Math::Pari or <plug> Math::MPFR </plug>, both of which make 
extensive use of "C" computations.

Of course, it all depends upon the heaviness and sphericality of the math 
project :-)

Cheers,
Rob 



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

Date: Thu, 19 Jul 2007 19:04:01 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Math
Message-Id: <u56v935haov3427m6qgcf5invob1qmmulq@4ax.com>

On Fri, 20 Jul 2007 01:33:52 +1000, "Sisyphus"
<sisyphus1@nomail.afraid.org> wrote:

>But now things *do* start to get noticeably slower ... to the extent that a 
>"heavy spherical math project" may be better advised to use (instead of 
>Math::BigFloat) Math::Pari or <plug> Math::MPFR </plug>, both of which make 
>extensive use of "C" computations.

I was about to tell you that M::BF can use a suitable XS module, if
you tell it so: but I checked and it's not the case, although it
definitely is with M::BI. Too bad...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 19 Jul 2007 14:20:15 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: new lines in the way
Message-Id: <slrnf9usov.6km.glennj@smeagol.ncf.ca>

At 2007-07-18 10:11PM, "new2perl@gmail.com" wrote:
>  Hi,
>  
>  I am trying to parse a text file that looks like this:
>  
>  __
>  VAR1=15
>  VAR2=16
>  VAR=17
>  
>  FIRSTJOKE=this is my first joke.  its isnt that funny but its still
>  pretty good bla hbls dfd fsdf dsf sdfsd sd fdssd sdfdsf
>  dsfdsfsdsdfsfsd
>  
>  SECONDJOKE=fdsf sdfdsf sdfdsfsdfdsfdsfdsfderew
>  rweeeeeeeeeeeeeeeeeeeeeeeer2 wr ewre  rewr er ewewrrewrew rewrewrew
>  ewrew ewr ewr er ewr ewr er ewr we rew ew
>  rewrewrewrewrewrererewrewrewrewrewrewrewrwerewrererewreerewrewrerererererer
>  
>  THIRDJOKE=notfunny
>  ---

    open my $f, '<', $filename or die "can't open '$filename': $!\n";
    my ($var, $value);
    while (<$f>) {
        chomp;
        if (/^(\w+)=(.*)/) {
            print "$var => $value\n" if ($var and $value);
            ($var, $value) = ($1, $2);
        }
        else {
            $value .= ' ' . $_;
            # if you want the value to retain it's multi-linedness,
            # change the space above to a newline
        }
    }
    print "$var => $value\n" if ($var and $value);
    close $f;

-- 
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry


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

Date: Thu, 19 Jul 2007 16:30:07 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: new lines in the way
Message-Id: <o7tu931as801e31ck6n1a3p2cjgglspvbt@4ax.com>

On Thu, 19 Jul 2007 02:11:27 -0000, new2perl@gmail.com wrote:

># It only prints out the first line of each joke.  I played around
>with $/ but not working.
># I understand that $/ is set to new line by default. So this explains
>why I only get
># the first line of each joke.
># There must be a simple way to fix this?  I appreciate any feedback.
>Bob

If you know $/, that is you've read

  perldoc perlvar

then you should know that what you'ere after is ''.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 15:43:27 GMT
From: "Mumia W." <paduille.4061.mumia.w+nospam@earthlink.net>
Subject: Re: pid from startet process
Message-Id: <zELni.8816$tj6.4682@newsread4.news.pas.earthlink.net>

On 07/19/2007 07:51 AM, carlo.maier@netcologne.de wrote:
> [...]
> What kind of reasons can be imagined, that the method "$pid=open(H, "$
> {cmd} |");" doesn't supply the correct pid?
> Does anybody know about a method that gives me the correct pid?
> 
> Thanks in adance,
> carlo
> 

Perhaps "myexecutable" is a script that starts the real executable.

Although it's just guessing, the real PID might be $pid+1.



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

Date: 19 Jul 2007 16:38:33 GMT
From: xhoster@gmail.com
Subject: Re: pid from startet process
Message-Id: <20070719123834.995$wB@newsreader.com>

carlo.maier@netcologne.de wrote:
> hi,
>
> i am starting an exectuable on hp-ux (ActivePerl Build 817) from a
> perl script and need to know the childs pid.
>
> my $cmd="myexecutable -P parmfile "
>
> my $pid=open(H, "${cmd} |");
> print "\ttest: $_" while (<H>);
> close(H);
>
> The executable starts, but the pid i am getting is not right.

I don't see that problem.

$ perl -le 'print open my $fh, q{perl -le  "print \$$;" |}; print <$fh>'
11050
11050

Maybe your $cmd isn't doing what you think it is doing.

Also, you might want to try using the 3-or-more argument form
of open:

open my $fh, "-|", "$cmd1", @cmd_args;

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Thu, 19 Jul 2007 15:09:14 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <ihou93ptmuu3m4r6s1afkoa4c7i3s2sq4g@4ax.com>

On Tue, 17 Jul 2007 20:24:03 -0700, "merl the perl"
<zaxfuuq@invalid.net> wrote:

>I've been trying to herd usenet messages into files on my machine.  The 
>latest setback I had was that I had to do a clean sweep on my machine (not 
>perl related, itunes with bundled Quicktime killed my primary identity with 
>a script that would make it a virus by any other name).  Unfortunately, I 
>didn't save my last version of this script:
>#!/usr/bin/env perl
>use strict;
>use warnings;
>use Net::NNTP;
>
>my $nntp = Net::NNTP->new('newsgroups.comcast.net', ( Debug => 1) );

Oh no, again! Did you try by any chance try using my "version" of the
script, or the much more complete program a link to which was posted
by another one of the regulars here?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 15:19:26 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <fmou93phvkmge4ithbv29pql2cl8as3mar@4ax.com>

On Wed, 18 Jul 2007 00:47:46 -0700, "merl the perl"
<zaxfuuq@invalid.net> wrote:

>my $nntp = Net::NNTP->new('newsgroups.comcast.net', ( Debug => 1) );

BTW: those additional parens are unnecessary, and confusing.

>This gives the following debug info:
[snip]
>Net::NNTP=GLOB(0x18329d0)<<< 502 NEWNEWS permission denied (command 
>disabled)

Gunnar wrote:

: That's the info you are supposed to study when debugging. From that it's 
: clear that the script didn't attempt to authenticate.

And QoS also wrote:

: It would be best if you carefully parsed anything that the server sends
: back to your client, if you study the Net::NNTP debug information, you
: will notice that the messages coming from the server are denoted with
: a '<<< '.

Why don't you try to put in practice their advice? That is, why don't
*you* read the debugging info rather than having *us* read it for you?
I think it's clear enough that the server doesn't support the NEWNEWS
command. Or is it that hard to understand? So, to put it simply, you
can't use *that* script. Neither could I thus I rolled my own which
manually parses headers to achieve the same task as the original one,
and I posted it *here*. Did you try it? Also, QoS repeatedly pointed
you to the XOVER command instead: did you mind reading his/her
posts?!? Yet another poster posted the link to a complete script
following a logic similar to mine and actually using Net::NNTP's
xover() method: did you look at it too?

I'll repost my poor attempt: I feel like directing you to better code,
but this could concise and clear enough for you, and works:


  #!/usr/bin/perl
  
  use strict;
  use warnings;
  use Net::NNTP;
  use Date::Parse;
  
  my $nsrv='news.tiscali.it';
  my $grp='comp.lang.perl.misc';
  
  my $nntp=Net::NNTP->new($nsrv) or die "Can't login to `$nsrv'$!\n";
  my (undef, $first, $last, undef)=$nntp->group($grp)
    or die "Can't access $grp\n";
  
  my ($since, @arts)=time-24*60*60;
  for (reverse $first..$last) {
      my %hdr=map /^(\S[^:]+):\s(.*)$/g, @{$nntp->head($_)};
      defined(my $date=$hdr{'NNTP-Posting-Date'}) or next;
      defined(my $time=str2time $date)
        or warn "Couldn't parse date for article $_ ($date)\n"
        and next;
      last if $time < $since;
      unshift @arts, $_;
  }
  
  $nntp->article($_,\*STDOUT) for @arts;
    
  __END__


(I made a further little modification from the last posted version, I
think.)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 15:23:20 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <c8pu93ht3jp1bods4f621ko0llrn2dts2q@4ax.com>

On Wed, 18 Jul 2007 02:34:54 -0700, "merl the perl"
<zaxfuuq@invalid.net> wrote:

>> I thought that the Debug argument was still surrounded by curly braces. 
>> Sorry, my mistake.
>IIRC, you were the first to mention that the braces were a problem.  I read 
>aloud the names of every perl function tonight.  IIRC, abs is the first and 
>write is the last.

  print IIUC ? 'So what?' : 'Huh?!?'


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 16:10:49 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <7dru935fq5r515772s2v83aih2si4f6dpo@4ax.com>

On Thu, 19 Jul 2007 00:28:32 -0700, "merl the perl"
<zaxfuuq@invalid.net> wrote:

>I don't see debug information at the cpan site:
>http://search.cpan.org/dist/libnet/Net/NNTP.pm

Well, for one thing if the module is installed, you can read the
documentation more comfortably by issuing the

  perldoc Net::NNTP

command at the prompt of your shell. Seeing it... one can see that
what you say is fair enough. However the docs say clearly that
Net::NNTP @ISA Net::Cmd, thus I would check the latter as well...
Hmmm... it doesn't specify the Debug info "format" either... but,
C'mon! Do you really find it that hard to understand?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 16:19:05 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving usenet messages III
Message-Id: <ifsu93tb0b4imeg9r2n29di1nulbrhgmf2@4ax.com>

On Wed, 18 Jul 2007 20:01:47 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:

>From: "Wade Ward" <zaxfuuq@invalid.net>

Just a question out of curiosity: but are you and Merl the Perl the
same person? I was quite sure about that, and thought that you
abandoned your initial nick for the current one, and here it is: "Wade
Ward" popping up again!

>> IIRC, you were the first to mention that the braces were a problem.  I 
>> read aloud the names of every perl function tonight.  IIRC, abs is the 
>> first and write is the last.

Well,

  perldoc perlfunc

lists -X as the first.

>If that list were from 2003, would it differ from Perl, 2007?

I don't think there have been many function addictions from '03 to
'07, if any at all. I want a CORE:: say() though!


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 07:27:54 -0700
From:  "Luis Angel Fdez. Fdez." <laffdez@gmail.com>
Subject: To know if a variable is a file handler
Message-Id: <1184855274.612227.109960@x40g2000prg.googlegroups.com>

  Hi!

  I was looking in Google and I don't find anything that solves my
doubt. Is there any way I can check if a variable is an file handler
of an opened file?.

  Thanks in advance.

  Bye!



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

Date: Fri, 20 Jul 2007 01:11:14 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: To know if a variable is a file handler
Message-Id: <469f7f10$0$16207$afc38c87@news.optusnet.com.au>


"Luis Angel Fdez. Fdez." <laffdez@gmail.com> wrote in message 
news:1184855274.612227.109960@x40g2000prg.googlegroups.com...
>  Hi!
>
>  I was looking in Google and I don't find anything that solves my
> doubt. Is there any way I can check if a variable is an file handler
> of an opened file?.
>
>  Thanks in advance.
>

# Untested
use warnings;
use strict;
use FileHandle::Fmode qw(:all);
my $fh;
# (optionally) other code that does stuff
if is_arg_ok($fh) {print "\$fh is a file handle to an open file"}
else  {print "\$fh is NOT a file handle to an open file"}
__END__

Cheers,
Rob 



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

Date: 19 Jul 2007 16:59:43 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: To know if a variable is a file handler
Message-Id: <slrnf9v640.6km.glennj@smeagol.ncf.ca>

At 2007-07-19 10:27AM, "Luis Angel Fdez. Fdez." wrote:
>    Hi!
>  
>    I was looking in Google and I don't find anything that solves my
>  doubt. Is there any way I can check if a variable is an file handler
>  of an opened file?.


if (tell($scalar) > -1) {print "I'm a filehandle"}

You may also want to look at 'seek' and 'sysseek'

-- 
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry


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

Date: Thu, 19 Jul 2007 07:11:26 -0700
From:  Jerry Krinock <jerry@sheepsystems.com>
Subject: Re: Use UTF-8 in Log::StdLog?
Message-Id: <1184854286.906090.31510@e16g2000pri.googlegroups.com>

Ah, perldata!  Well, search engines don't work very well when you're
looking for "*".  But you folks are great; thank you very much.
Thanks especially to Mumia for the shortcut to the code.  Of course, I
used your non-hacky solution (2).

On Jul 17, 3:27 am, "Mumia W." wrote:
> you might make a feature request of the author for binmode() support.

I just did that.  CPAN ticket 28232.

Thanks again,

Jerry



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

Date: 19 Jul 2007 13:27:50 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Using the split function
Message-Id: <slrnf9upmd.i5.abigail@alexandra.abigail.be>

                                                _
Michele Dondi (bik.mido@tiscalinet.it) wrote on VLXX September MCMXCIII
in <URL:news:uunu939h9hrvjlrjmq52nfpphca41mpqhv@4ax.com>:
~~  On Tue, 17 Jul 2007 17:36:34 -0500, Tad McClellan
~~ <tadmc@seesig.invalid> wrote:
~~  
~~ >>>> Ive deliberately left out the split function 
~~ >
~~ >
~~ >> Eighner sounds suspiciously like "a.....s"
~~ >                                    ^^^^^^^
~~ >                                    ^^^^^^^
~~ >
~~ >"abducts" ?
~~ >
~~ >"abscess" ?
~~ >
~~ >"assumes" ?
~~ >
~~ >"accuses"?
~~  
~~  I thought it may have been something /^ass/, not "assumes", but I
~~  can't think of anything significant... that "s" at the end defies my
~~  poor English knowledge.


abasers abashes abasias abaters abators abattis abduces abducts abelias
abiders abioses abiosis abjures ablates ablauts ablings abounds abrades
abscess abseils absents absorbs absurds abulias abusers abvolts abwatts
abysses acacias acajous acarids accedes accents accepts accords accosts
accrues accuses acedias acerous acetals acetins acetous acetyls achenes
acinous acnodes acquits actings actions actives actress aculeus acumens
adagios addaxes addends addicts address adduces adducts adenyls adheres
adipous adjoins adjures adjusts admires admixes adnouns adorers adsorbs
advects advents adverbs adverts advices advises adzukis aediles aegises
aeneous aerates aerials aerobes aerugos aethers affairs affects affines
affirms affixes affords affrays afghans afreets aftosas agamous agarics
ageings ageisms ageists ageless agendas aggress agnails agnates agnizes
agonies agoutis agrafes ahimsas aiblins aidless aiglets aigrets aikidos
aimless airbags airings airless airways aitches ajowans alanins alanyls
alarums alaskas albatas albedos albinos albites alcades alcaics alcoves
aldoses aldrins alegars alevins alexias alexins alfakis aliases alibies
alidads alights aliners alipeds aliyahs alkalis alkanes alkenes alkines
alkynes alleges alleles alliums alludes allures almners almonds almuces
almudes alnicos alpacas alphyls alpines alsikes altheas aludels alumins
alumnus amadous amasses amatols amazons ambages ambaris ambeers amblers
ambones ambries amerces amidins amidols amities ammines amnions amoebas
amorous amounts amperes ampules amritas amtracs amulets amusers amusias
amylums anadems analogs anankes anarchs anattos anchors ancones ancress
anemias angelus anginas anglers angoras anilins animals anklets ankuses
anlaces anlages anlases annates anneals annexes annuals annulus anoints
anomies anonyms anopias anoraks anoxias answers anthems anthers antiars
anticks antings antlers antrums anurans anurias anurous anxious anyways
aorists aoudads apaches apercus aperies apheses aphesis aphides apicals
aplites aplombs apnoeas apodous apogees apollos apologs appalls appeals
appears appends applies apposes apropos apsides aptness aqueous arables
aramids arbores arbours arbutes arbutus arcades archers archils archons
arctics arcuses ardours arduous arenous areolas areoles argalas argalis
argents arguers arguses argyles argylls ariosos aristas aristos arkoses
armadas armfuls armings armless armlets armours armpits armures arnicas
aroints arouses aroynts arpents arracks arrases arrears arrests arrises
arrives arrobas arroyos arshins arsines artists artless asarums ascaris
ascends ascents asceses ascesis ascites asepses asepsis ashcans ashlars
ashlers ashless ashrams askeses askesis askings aspects aspires aspises
asramas assails assents asserts assigns assists assizes assoils assorts
assumes assures asthmas astrals asylums atabals atamans ataxias ataxics
ataxies atlases atlatls atomics atomies atoners atonics atonies atopies
atriums attacks attains attends attests attires attorns attunes aubades
auburns aucubas audiles audings augends augites auklets aunties aurists
aurochs auroras ausubos auteurs authors autisms autobus autumns auxeses
auxesis avatars avenges avenses avenues avgases aviates avidins avocets
avosets avowals avowers avulses awakens aweless awnings awnless axillas
axseeds azaleas azygous


Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


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

Date: Thu, 19 Jul 2007 15:56:06 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Using the split function
Message-Id: <65ru931l3qrc9br3rs9klvvb7f97p74a40@4ax.com>

On 19 Jul 2007 13:27:50 GMT, Abigail <abigail@abigail.be> wrote:

>~~  I thought it may have been something /^ass/, not "assumes", but I
>~~  can't think of anything significant... that "s" at the end defies my
>~~  poor English knowledge.
>
>
>abasers abashes abasias abaters abators abattis abduces abducts abelias

Incredible what a man can do with /usr/dict/words and a perl
interpreter...

>asramas assails assents asserts assigns assists assizes assoils assorts

I vote for "assoils" the significance of which I don't know, but I
assumes to be an alternative spelling of "asshole"...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 14:58:26 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: Re: Using the split function
Message-Id: <469f6e03$0$24755$da0feed9@news.zen.co.uk>

Abigail wrote:
>                                                 _
> Michele Dondi (bik.mido@tiscalinet.it) wrote on VLXX September MCMXCIII
> in <URL:news:uunu939h9hrvjlrjmq52nfpphca41mpqhv@4ax.com>:
> ~~  On Tue, 17 Jul 2007 17:36:34 -0500, Tad McClellan
> ~~ <tadmc@seesig.invalid> wrote:
> ~~  
> ~~ >>>> Ive deliberately left out the split function 
> ~~ >
> ~~ >
> ~~ >> Eighner sounds suspiciously like "a.....s"
> ~~ >                                    ^^^^^^^
> ~~ >                                    ^^^^^^^
> ~~ >"abducts" ?
> ~~ >"abscess" ?
> ~~ >"assumes" ?
> ~~ >"accuses"?
> ~~  
> ~~  I thought it may have been something /^ass/, not "assumes", but I
> ~~  can't think of anything significant... that "s" at the end defies my
> ~~  poor English knowledge.
> 
> 
> abasers abashes abasias abaters abators abattis abduces abducts abelias
> abiders abioses abiosis abjures ablates ablauts ablings abounds abrades
> abscess abseils absents absorbs absurds abulias abusers abvolts abwatts

<40 lines omitted>

> aurochs auroras ausubos auteurs authors autisms autobus autumns auxeses
> auxesis avatars avenges avenses avenues avgases aviates avidins avocets
> avosets avowals avowers avulses awakens aweless awnings awnless axillas
> axseeds azaleas azygous
> 
> 

Is there a bonus for applying Text::Soundex to work out which ones sound 
like Eighner?


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

Date: 19 Jul 2007 14:32:38 GMT
From: Lars Eighner <usenet@larseighner.com>
Subject: Re: Using the split function
Message-Id: <slrnf9ute6.1prl.usenet@goodwill.larseighner.com>

In our last episode, <65ru931l3qrc9br3rs9klvvb7f97p74a40@4ax.com>, the
lovely and talented Michele Dondi broadcast on comp.lang.perl.misc:

> On 19 Jul 2007 13:27:50 GMT, Abigail <abigail@abigail.be> wrote:

>>~~  I thought it may have been something /^ass/, not "assumes", but I
>>~~  can't think of anything significant... that "s" at the end defies my
>>~~  poor English knowledge.
>>
>>
>>abasers abashes abasias abaters abators abattis abduces abducts abelias

> Incredible what a man can do with /usr/dict/words and a perl
> interpreter...

It's a one-liner in grep.  The right tool for the job, and all.

-- 
Lars Eighner     <http://larseighner.com/>     <http://myspace.com/larseighner>
                         Countdown: 551 days to go.
Owing to massive spam from googlegroups, I do not see most posts from there.


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

Date: Thu, 19 Jul 2007 18:59:10 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Using the split function
Message-Id: <rr5v9353h364dqrkg8vommqnnujgscniss@4ax.com>

On 19 Jul 2007 14:32:38 GMT, Lars Eighner <usenet@larseighner.com>
wrote:

>> Incredible what a man can do with /usr/dict/words and a perl
>> interpreter...
>
>It's a one-liner in grep.  The right tool for the job, and all.

It can be a one-liner in Perl too. Can grep format the output that
way?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 19 Jul 2007 17:12:04 +0000 (UTC)
From: steveo@panix.com (Steven M. O'Neill)
Subject: Re: Using the split function
Message-Id: <f7o614$6ht$1@reader2.panix.com>

Michele Dondi  <bik.mido@tiscalinet.it> wrote:
>On 19 Jul 2007 14:32:38 GMT, Lars Eighner <usenet@larseighner.com>
>wrote:
>
>>> Incredible what a man can do with /usr/dict/words and a perl
>>> interpreter...
>>
>>It's a one-liner in grep.  The right tool for the job, and all.
>
>It can be a one-liner in Perl too. Can grep format the output that
>way?

It doesn't need to.

    :~>grep '^a.....s$' words | fmt
    abigeus abiosis abortus abraxas abscess absciss acerous acetous
    acinous acolous acomous actless actress aculeus acyesis addlins
    address adipous adpress adzooks aeneous aerobus agamous ageless
    aggress agnosis agogics agynous aidless aimless airless aitesis
    algesis algosis aliptes allness alumnus amaltas amanous ambiens
    ambitus amellus amorous amuguis anights animous annates annulus
    anoesis anurous anxious anyways aphesis aphides aphodus apieces
    apodous apropos apsides aptness apyrous aqueous arbutus archeus
    arduous argeers arillus armless artless ascites asepsis ashless
    assizes atelets atheous atokous atomics attacus auletes aureous
    aurochs autobus auxesis avenous avidous awnless azotous azurous
    azygous azymous

(not sure why my output is so much less than Abigail's)

-- 
Steven O'Neill                                  steveo@panix.com
Brooklyn, NY                        http://www.panix.com/~steveo


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

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:

#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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 662
**************************************


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