[30997] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2242 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 1 00:14:34 2009

Date: Sat, 28 Feb 2009 21:14:27 -0800 (PST)
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, 28 Feb 2009     Volume: 11 Number: 2242

Today's topics:
    Re: Forcing list context on <$fh> <jimsgibson@gmail.com>
    Re: Forcing list context on <$fh> <noreply@gunnar.cc>
    Re: Forcing list context on <$fh> <ben@morrow.me.uk>
    Re: Forcing list context on <$fh> <noreply@gunnar.cc>
    Re: Forcing list context on <$fh> <noreply@gunnar.cc>
    Re: Forcing list context on <$fh> <tim@burlyhost.com>
    Re: Forcing list context on <$fh> <noreply@gunnar.cc>
    Re: Forcing list context on <$fh> <tim@burlyhost.com>
    Re: Forcing list context on <$fh> sln@netherlands.com
    Re: Forcing list context on <$fh> sln@netherlands.com
    Re: Forcing list context on <$fh> <tim@burlyhost.com>
    Re: Forcing list context on <$fh> <tim@burlyhost.com>
        I'm UNEMPLOYED with no job prospects. Please post your  sln@netherlands.com
    Re: I'm UNEMPLOYED with no job prospects. Please post y sln@netherlands.com
    Re: I'm UNEMPLOYED with no job prospects. Please post y <tim@burlyhost.com>
    Re: I'm UNEMPLOYED with no job prospects. Please post y sln@netherlands.com
    Re: I'm UNEMPLOYED with no job prospects. Please post y <tim@burlyhost.com>
    Re: I'm UNEMPLOYED with no job prospects. Please post y sln@netherlands.com
    Re: I'm UNEMPLOYED with no job prospects. Please post y <tim@burlyhost.com>
        new CPAN modules on Sat Feb 28 2009 (Randal Schwartz)
    Re: Once again: Rolling Frame! sln@netherlands.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 27 Feb 2009 14:36:30 -0800
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Forcing list context on <$fh>
Message-Id: <270220091436308861%jimsgibson@gmail.com>

In article <go9ieb$jsq$1@reader1.panix.com>, Tim McDaniel
<tmcd@panix.com> wrote:

> As a practical matter, I run enough scripts on Windows (whether
> under bash or cmd) and have hit the problem enough that I do
>     chomp;
>     s/\r+$//;
> as a matter of rote, or instead use \s if I want to strip all trailing
> whitespace whatsoever.

Why not just

  s/[\r\n]+$//;

in one operation and skip the chomp?

-- 
Jim Gibson


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

Date: Sat, 28 Feb 2009 00:08:02 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Forcing list context on <$fh>
Message-Id: <70r9uuFhnpiiU1@mid.individual.net>

Ben Morrow wrote:
> Quoth Gunnar Hjalmarsson <noreply@gunnar.cc>:
>> Ben Morrow wrote:
>>> Of course, if you read a line from an ordinary text file on Win32 with a
>>> binmoded filehandle, the string returned will be "mycompany\r\n" and
>>> will not match,
>>
>> You don't need binmode() for that to be true.
>>
>> $ cat -vE w32.txt
>> mycompany^M$
>> $ cat test.pl
>> open my $fh, '<', 'w32.txt' or die $!;
>> print <$fh> =~ /^mycompany$/ ? "Match\n" : "No match\n";
>> $ perl test.pl
>> No match
>> $
> 
> Given that most Win32 machines don't have cat(1), and that the usual
> prompt on Win32 isn't '$', I am going to presume that you are not,
> in fact, running this on Win32.

Well, obviously I misunderstood your statement. Thanks for the 
clarification.

> On Win32, unless you've set the PERLIO environment variable, the default
> filehandle layers are ":unix:crlf".

Hmm.. I had no idea. Seems not even to be disabled by

     binmode $fh, ':raw';

:(

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Fri, 27 Feb 2009 23:53:14 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Forcing list context on <$fh>
Message-Id: <a0bm76-c4d.ln1@osiris.mauzo.dyndns.org>


Quoth Gunnar Hjalmarsson <noreply@gunnar.cc>:
> Ben Morrow wrote:
> > Quoth Gunnar Hjalmarsson <noreply@gunnar.cc>:
> >> Ben Morrow wrote:
> >>> Of course, if you read a line from an ordinary text file on Win32 with a
> >>> binmoded filehandle, the string returned will be "mycompany\r\n" and
> >>> will not match,
> >>
> >> You don't need binmode() for that to be true.
> >>
> >> $ cat -vE w32.txt
> >> mycompany^M$
> >> $ cat test.pl
> >> open my $fh, '<', 'w32.txt' or die $!;
> >> print <$fh> =~ /^mycompany$/ ? "Match\n" : "No match\n";
> >> $ perl test.pl
> >> No match
> >> $
> > 
> > Given that most Win32 machines don't have cat(1), and that the usual
> > prompt on Win32 isn't '$', I am going to presume that you are not,
> > in fact, running this on Win32.
> 
> Well, obviously I misunderstood your statement. Thanks for the 
> clarification.

Sorry, I was being snarky :).

> > On Win32, unless you've set the PERLIO environment variable, the default
> > filehandle layers are ":unix:crlf".
> 
> Hmm.. I had no idea.

It's been the case since long before PerlIO existed. Turning off the
default "\r\n"->"\n" conversion on Win32 is, in fact, the reason
'binmode' existed in the first place.

> Seems not even to be disabled by
> 
>      binmode $fh, ':raw';

Have you tried it, or are you getting this from the docs? I don't have a
Win32 machine to hand, but AIUI either

    binmode $fh;

or

    binmode $fh, ":raw";

ought to switch the :crlf layer into a mode where it no longer does
"\r\n"->"\n" translation. I don't believe the layer actually goes away,
but it becomes exactly equivalent to a :perlio layer. Is this not
correct?

Ben



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

Date: Sat, 28 Feb 2009 19:56:08 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Forcing list context on <$fh>
Message-Id: <70tfimFibspoU1@mid.individual.net>

Ben Morrow wrote:
> Quoth Gunnar Hjalmarsson <noreply@gunnar.cc>:
>> Ben Morrow wrote:
>>> On Win32, unless you've set the PERLIO environment variable, the default
>>> filehandle layers are ":unix:crlf".
>>
>> Hmm.. I had no idea.
> 
> It's been the case since long before PerlIO existed. Turning off the
> default "\r\n"->"\n" conversion on Win32 is, in fact, the reason
> 'binmode' existed in the first place.
> 
>> Seems not even to be disabled by
>>
>>      binmode $fh, ':raw';
> 
> Have you tried it, or are you getting this from the docs?

I'm afraid that I'm guilty of a great deal of confusion, which explains 
my remarks above. Please disregard them.

I thought that \n means \015\012 on Windows. Now - after having re-read 
your comments, re-read the "Newlines" section in "perldoc perlport", and 
played around some more - I'm slowly realizing that it means \012 just 
as on *nix, and that the \015\012 newline is only used on *saved* text 
files.

Suddenly everything you said in this thread makes a lot of sense, also 
to me. ;-)  Thanks for the lesson!

> ... either
> 
>     binmode $fh;
> 
> or
> 
>     binmode $fh, ":raw";
> 
> ought to switch the :crlf layer into a mode where it no longer does
> "\r\n"->"\n" translation. I don't believe the layer actually goes away,
> but it becomes exactly equivalent to a :perlio layer. Is this not
> correct?

Probably. This is the test I did:

C:\home>type test.pl
open $fh, '<', 'w32.txt' or die $!;
print 'No binmode() :             ',
   <$fh> =~ /^mycompany$/ ? "Match\n" : "No match\n";

open $fh, '<', 'w32.txt' or die $!;
binmode $fh;
print 'binmode() without layer :  ',
   <$fh> =~ /^mycompany$/ ? "Match\n" : "No match\n";

open $fh, '<', 'w32.txt' or die $!;
binmode $fh, ':raw';
print 'binmode() with :raw :      ',
   <$fh> =~ /^mycompany$/ ? "Match\n" : "No match\n";

open $fh, '<', 'w32.txt' or die $!;
binmode $fh, ':crlf';
print 'binmode() with :crlf :     ',
   <$fh> =~ /^mycompany$/ ? "Match\n" : "No match\n";

C:\home>test.pl
No binmode() :             Match
binmode() without layer :  No match
binmode() with :raw :      No match
binmode() with :crlf :     Match

C:\home>

The result is the same as before, but suddenly it's in accordance with 
my expectations. :)

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Sat, 28 Feb 2009 20:26:59 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Forcing list context on <$fh>
Message-Id: <70thcgFieue6U1@mid.individual.net>

Gunnar Hjalmarsson wrote:
> I thought that \n means \015\012 on Windows. Now - after having re-read 
> your comments, re-read the "Newlines" section in "perldoc perlport", and 
> played around some more - I'm slowly realizing that it means \012 just 
> as on *nix, and that the \015\012 newline is only used on *saved* text 
> files.

Second thought. Please read this extract from "perldoc perlport":

"Perl uses \n to represent the "logical" newline, where what is logical 
may depend on the platform in use. In MacPerl, \n always means \015. In 
DOSish perls, \n usually means \012, but when accessing a file in "text" 
mode, STDIO translates it to (or from) \015\012, depending on whether 
you're reading or writing."

Doesn't it say that STDIO changes the meaning of \n on Windows? But that 
is not correct, is it? Or am I still missing something?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Sat, 28 Feb 2009 11:30:38 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Forcing list context on <$fh>
Message-Id: <zhgql.6821$FF1.893@newsfe20.iad>

Gunnar Hjalmarsson wrote:

> Gunnar Hjalmarsson wrote:
>> I thought that \n means \015\012 on Windows. Now - after having
>> re-read your comments, re-read the "Newlines" section in "perldoc
>> perlport", and played around some more - I'm slowly realizing that it
>> means \012 just as on *nix, and that the \015\012 newline is only
>> used on *saved* text files.
> 
> Second thought. Please read this extract from "perldoc perlport":
> 
> "Perl uses \n to represent the "logical" newline, where what is
> logical may depend on the platform in use. In MacPerl, \n always means
> \015. In DOSish perls, \n usually means \012, but when accessing a
> file in "text" mode, STDIO translates it to (or from) \015\012,
> depending on whether you're reading or writing."
> 
> Doesn't it say that STDIO changes the meaning of \n on Windows? But
> that is not correct, is it? Or am I still missing something?
> 

I thought it meant that it changes it so reading \015\012 would
translate it to \n, and writing it would change it from \n to \015\012. 
It's been a _long time_ since I've used Windows.  Maybe run a couple of
quick tests to verify and see exactly what it's doing (to avoid any
confusion), and then you'll know.
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Sat, 28 Feb 2009 20:51:29 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Forcing list context on <$fh>
Message-Id: <70tiqfFh77t6U1@mid.individual.net>

Tim Greer wrote:
> Gunnar Hjalmarsson wrote:
>> Gunnar Hjalmarsson wrote:
>>> I thought that \n means \015\012 on Windows. Now - after having
>>> re-read your comments, re-read the "Newlines" section in "perldoc
>>> perlport", and played around some more - I'm slowly realizing that it
>>> means \012 just as on *nix, and that the \015\012 newline is only
>>> used on *saved* text files.
>>
>> Second thought. Please read this extract from "perldoc perlport":
>>
>> "Perl uses \n to represent the "logical" newline, where what is
>> logical may depend on the platform in use. In MacPerl, \n always means
>> \015. In DOSish perls, \n usually means \012, but when accessing a
>> file in "text" mode, STDIO translates it to (or from) \015\012,
>> depending on whether you're reading or writing."
>>
>> Doesn't it say that STDIO changes the meaning of \n on Windows? But
>> that is not correct, is it? Or am I still missing something?
> 
> I thought it meant that it changes it so reading \015\012 would
> translate it to \n, and writing it would change it from \n to \015\012.

That's apparently what's happening. I'm just questioning the possible 
lack of clarity in that para.

> It's been a _long time_ since I've used Windows.  Maybe run a couple of
> quick tests to verify and see exactly what it's doing (to avoid any
> confusion), and then you'll know.

I did that already. :)

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Sat, 28 Feb 2009 12:42:33 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Forcing list context on <$fh>
Message-Id: <_khql.28627$FI5.12113@newsfe07.iad>

Gunnar Hjalmarsson wrote:

> Tim Greer wrote:
>> Gunnar Hjalmarsson wrote:
>>> Gunnar Hjalmarsson wrote:
>>>> I thought that \n means \015\012 on Windows. Now - after having
>>>> re-read your comments, re-read the "Newlines" section in "perldoc
>>>> perlport", and played around some more - I'm slowly realizing that
>>>> it means \012 just as on *nix, and that the \015\012 newline is
>>>> only used on *saved* text files.
>>>
>>> Second thought. Please read this extract from "perldoc perlport":
>>>
>>> "Perl uses \n to represent the "logical" newline, where what is
>>> logical may depend on the platform in use. In MacPerl, \n always
>>> means \015. In DOSish perls, \n usually means \012, but when
>>> accessing a file in "text" mode, STDIO translates it to (or from)
>>> \015\012, depending on whether you're reading or writing."
>>>
>>> Doesn't it say that STDIO changes the meaning of \n on Windows? But
>>> that is not correct, is it? Or am I still missing something?
>> 
>> I thought it meant that it changes it so reading \015\012 would
>> translate it to \n, and writing it would change it from \n to
>> \015\012.
> 
> That's apparently what's happening. I'm just questioning the possible
> lack of clarity in that para.
> 

Well, now you have me wondering, too. :-)
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Sun, 01 Mar 2009 01:22:25 GMT
From: sln@netherlands.com
Subject: Re: Forcing list context on <$fh>
Message-Id: <qkojq4hrtqaftqc1786fb845962idokf89@4ax.com>

On Sat, 28 Feb 2009 11:30:38 -0800, Tim Greer <tim@burlyhost.com> wrote:

>Gunnar Hjalmarsson wrote:
>
>> Gunnar Hjalmarsson wrote:
>>> I thought that \n means \015\012 on Windows. Now - after having
>>> re-read your comments, re-read the "Newlines" section in "perldoc
>>> perlport", and played around some more - I'm slowly realizing that it
>>> means \012 just as on *nix, and that the \015\012 newline is only
>>> used on *saved* text files.
>> 
>> Second thought. Please read this extract from "perldoc perlport":
>> 
>> "Perl uses \n to represent the "logical" newline, where what is
>> logical may depend on the platform in use. In MacPerl, \n always means
>> \015. In DOSish perls, \n usually means \012, but when accessing a
>> file in "text" mode, STDIO translates it to (or from) \015\012,
>> depending on whether you're reading or writing."
>> 
>> Doesn't it say that STDIO changes the meaning of \n on Windows? But
>> that is not correct, is it? Or am I still missing something?
>> 
>
>I thought it meant that it changes it so reading \015\012 would
>translate it to \n, and writing it would change it from \n to \015\012. 
>It's been a _long time_ since I've used Windows.  Maybe run a couple of
>quick tests to verify and see exactly what it's doing (to avoid any
>confusion), and then you'll know.

Why don't you create a binary file in windows and insert 10 or 13 on a few
lines (but not both), then the pair in a few (reverse a few too), then
check the results.

Or, dial up Wally and ask him.

-sln


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

Date: Sun, 01 Mar 2009 01:44:53 GMT
From: sln@netherlands.com
Subject: Re: Forcing list context on <$fh>
Message-Id: <s1qjq4lgum8pjdou7i2gjc6e2uj7813899@4ax.com>

On Sun, 01 Mar 2009 01:22:25 GMT, sln@netherlands.com wrote:

>On Sat, 28 Feb 2009 11:30:38 -0800, Tim Greer <tim@burlyhost.com> wrote:
>
>>Gunnar Hjalmarsson wrote:
>>
>>> Gunnar Hjalmarsson wrote:
>>>> I thought that \n means \015\012 on Windows. Now - after having
>>>> re-read your comments, re-read the "Newlines" section in "perldoc
>>>> perlport", and played around some more - I'm slowly realizing that it
>>>> means \012 just as on *nix, and that the \015\012 newline is only
>>>> used on *saved* text files.
>>> 
>>> Second thought. Please read this extract from "perldoc perlport":
>>> 
>>> "Perl uses \n to represent the "logical" newline, where what is
>>> logical may depend on the platform in use. In MacPerl, \n always means
>>> \015. In DOSish perls, \n usually means \012, but when accessing a
>>> file in "text" mode, STDIO translates it to (or from) \015\012,
>>> depending on whether you're reading or writing."
>>> 
>>> Doesn't it say that STDIO changes the meaning of \n on Windows? But
>>> that is not correct, is it? Or am I still missing something?
>>> 
>>
>>I thought it meant that it changes it so reading \015\012 would
>>translate it to \n, and writing it would change it from \n to \015\012. 
>>It's been a _long time_ since I've used Windows.  Maybe run a couple of
>>quick tests to verify and see exactly what it's doing (to avoid any
>>confusion), and then you'll know.
>
>Why don't you create a binary file in windows and insert 10 or 13 on a few
>lines (but not both), then the pair in a few (reverse a few too), then
>check the results.
>
>Or, dial up Wally and ask him.

"Hey Wally, whats in that 'if()' statement?".
-sln



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

Date: Sat, 28 Feb 2009 18:07:13 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Forcing list context on <$fh>
Message-Id: <l5mql.62403$6r1.36237@newsfe19.iad>

sln@netherlands.com wrote:

> On Sat, 28 Feb 2009 11:30:38 -0800, Tim Greer <tim@burlyhost.com>
> wrote:
> 
>>Gunnar Hjalmarsson wrote:
>>
>>> Gunnar Hjalmarsson wrote:
>>>> I thought that \n means \015\012 on Windows. Now - after having
>>>> re-read your comments, re-read the "Newlines" section in "perldoc
>>>> perlport", and played around some more - I'm slowly realizing that
>>>> it means \012 just as on *nix, and that the \015\012 newline is
>>>> only used on *saved* text files.
>>> 
>>> Second thought. Please read this extract from "perldoc perlport":
>>> 
>>> "Perl uses \n to represent the "logical" newline, where what is
>>> logical may depend on the platform in use. In MacPerl, \n always
>>> means \015. In DOSish perls, \n usually means \012, but when
>>> accessing a file in "text" mode, STDIO translates it to (or from)
>>> \015\012, depending on whether you're reading or writing."
>>> 
>>> Doesn't it say that STDIO changes the meaning of \n on Windows? But
>>> that is not correct, is it? Or am I still missing something?
>>> 
>>
>>I thought it meant that it changes it so reading \015\012 would
>>translate it to \n, and writing it would change it from \n to
>>\015\012.
>>It's been a _long time_ since I've used Windows.  Maybe run a couple
>>of quick tests to verify and see exactly what it's doing (to avoid any
>>confusion), and then you'll know.
> 
> Why don't you create a binary file in windows and insert 10 or 13 on a
> few lines (but not both), then the pair in a few (reverse a few too),
> then check the results.
> 
> Or, dial up Wally and ask him.
> 
> -sln

Who are you talking to?  Who's using Windows?  Who's creating a binary
file and needs to do that test?  Were you replying to Gunnar?
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Sat, 28 Feb 2009 18:09:25 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: Forcing list context on <$fh>
Message-Id: <p7mql.62405$6r1.60838@newsfe19.iad>

sln@netherlands.com wrote:

> "Hey Wally, whats in that 'if()' statement?".
> -sln

You remind me of Xah Lee. You aren't really him, are you?
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Sun, 01 Mar 2009 01:36:02 GMT
From: sln@netherlands.com
Subject: I'm UNEMPLOYED with no job prospects. Please post your Perl homework, any work that you can't do.
Message-Id: <qcpjq45dm7al4e2e0dunv2cbo8ic7pdhkj@4ax.com>

No questions asked. I need something to do.
Post all you have.

Any Teachers/Students/Employers/Employee's requests will be honored.

Thanks a lot!

-sln


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

Date: Sun, 01 Mar 2009 01:39:12 GMT
From: sln@netherlands.com
Subject: Re: I'm UNEMPLOYED with no job prospects. Please post your Perl homework, any work that you can't do.
Message-Id: <dnpjq454gfahgps97d2sra0fst0uijo32h@4ax.com>

On Sun, 01 Mar 2009 01:36:02 GMT, sln@netherlands.com wrote:

>No questions asked. I need something to do.
>Post all you have.
>
>Any Teachers/Students/Employers/Employee's requests will be honored.
>
>Thanks a lot!
>
>-sln

I'll write it from start to finish for you, no questions asked!
I will even give follow up support, any time, day or night.

-sln


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

Date: Sat, 28 Feb 2009 18:08:16 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: I'm UNEMPLOYED with no job prospects. Please post your Perl homework, any work that you can't do.
Message-Id: <k6mql.62404$6r1.48382@newsfe19.iad>

sln@netherlands.com wrote:

> No questions asked. I need something to do.
> Post all you have.
> 
> Any Teachers/Students/Employers/Employee's requests will be honored.
> 
> Thanks a lot!
> 
> -sln

You've been told before that this isn't an appropriate group to just
post random "I need a job" posts.  This isn't said to be mean, but that
you'll likely have a lot better luck if you post to relevant groups or
sites that are employment sites.
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Sun, 01 Mar 2009 02:32:44 GMT
From: sln@netherlands.com
Subject: Re: I'm UNEMPLOYED with no job prospects. Please post your Perl homework, any work that you can't do.
Message-Id: <gnsjq4t9jb1cqk4u06n4c2r1gjtvirm403@4ax.com>

On Sat, 28 Feb 2009 18:08:16 -0800, Tim Greer <tim@burlyhost.com> wrote:

>sln@netherlands.com wrote:
>
>> No questions asked. I need something to do.
>> Post all you have.
>> 
>> Any Teachers/Students/Employers/Employee's requests will be honored.
>> 
>> Thanks a lot!
>> 
>> -sln
>
>You've been told before that this isn't an appropriate group to just
>post random "I need a job" posts.  This isn't said to be mean, but that
>you'll likely have a lot better luck if you post to relevant groups or
>sites that are employment sites.

I gave up on finding work a while ago. Now I just want to do everybody's
homework and work work for them.

Just knowing someone else will survive the depression due to my measly
contribution, will one day, get me to Heaven.

-sln


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

Date: Sat, 28 Feb 2009 18:34:29 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: I'm UNEMPLOYED with no job prospects. Please post your Perl homework, any work that you can't do.
Message-Id: <Xumql.35694$EO2.15861@newsfe04.iad>

sln@netherlands.com wrote:

> On Sat, 28 Feb 2009 18:08:16 -0800, Tim Greer <tim@burlyhost.com>
> wrote:
> 
>>sln@netherlands.com wrote:
>>
>>> No questions asked. I need something to do.
>>> Post all you have.
>>> 
>>> Any Teachers/Students/Employers/Employee's requests will be honored.
>>> 
>>> Thanks a lot!
>>> 
>>> -sln
>>
>>You've been told before that this isn't an appropriate group to just
>>post random "I need a job" posts.  This isn't said to be mean, but
>>that you'll likely have a lot better luck if you post to relevant
>>groups or sites that are employment sites.
> 
> I gave up on finding work a while ago. Now I just want to do
> everybody's homework and work work for them.
> 
> Just knowing someone else will survive the depression due to my measly
> contribution, will one day, get me to Heaven.
> 
> -sln

Oh, I see.  So, maybe take advantage from the people posting here asking
people to do their home work for them, and you agree to for a fee.  I
didn't see all of the long subject title.   Good luck.
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Sun, 01 Mar 2009 02:41:27 GMT
From: sln@netherlands.com
Subject: Re: I'm UNEMPLOYED with no job prospects. Please post your Perl homework, any work that you can't do.
Message-Id: <e9tjq49fu68t1g40s8qq894gkmjhocj6gd@4ax.com>

On Sat, 28 Feb 2009 18:34:29 -0800, Tim Greer <tim@burlyhost.com> wrote:

>sln@netherlands.com wrote:
>
>> On Sat, 28 Feb 2009 18:08:16 -0800, Tim Greer <tim@burlyhost.com>
>> wrote:
>> 
>>>sln@netherlands.com wrote:
>>>
>>>> No questions asked. I need something to do.
>>>> Post all you have.
>>>> 
>>>> Any Teachers/Students/Employers/Employee's requests will be honored.
>>>> 
>>>> Thanks a lot!
>>>> 
>>>> -sln
>>>
>>>You've been told before that this isn't an appropriate group to just
>>>post random "I need a job" posts.  This isn't said to be mean, but
>>>that you'll likely have a lot better luck if you post to relevant
>>>groups or sites that are employment sites.
>> 
>> I gave up on finding work a while ago. Now I just want to do
>> everybody's homework and work work for them.
>> 
>> Just knowing someone else will survive the depression due to my measly
>> contribution, will one day, get me to Heaven.
>> 
>> -sln
>
>Oh, I see.  So, maybe take advantage from the people posting here asking
>people to do their home work for them, and you agree to for a fee.  I
                                                         ^^^^^^^^^
                                                         for free
>didn't see all of the long subject title.   Good luck.

I think that we, the permanently unemployed, should do the work we love
for free. And more important, without teaching anybody anything at all
except love.

-sln


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

Date: Sat, 28 Feb 2009 18:50:16 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: I'm UNEMPLOYED with no job prospects. Please post your Perl homework, any work that you can't do.
Message-Id: <JJmql.62571$6r1.42193@newsfe19.iad>

sln@netherlands.com wrote:

> On Sat, 28 Feb 2009 18:34:29 -0800, Tim Greer <tim@burlyhost.com>
> wrote:
> 
>>sln@netherlands.com wrote:
>>
>>> On Sat, 28 Feb 2009 18:08:16 -0800, Tim Greer <tim@burlyhost.com>
>>> wrote:
>>> 
>>>>sln@netherlands.com wrote:
>>>>
>>>>> No questions asked. I need something to do.
>>>>> Post all you have.
>>>>> 
>>>>> Any Teachers/Students/Employers/Employee's requests will be
>>>>> honored.
>>>>> 
>>>>> Thanks a lot!
>>>>> 
>>>>> -sln
>>>>
>>>>You've been told before that this isn't an appropriate group to just
>>>>post random "I need a job" posts.  This isn't said to be mean, but
>>>>that you'll likely have a lot better luck if you post to relevant
>>>>groups or sites that are employment sites.
>>> 
>>> I gave up on finding work a while ago. Now I just want to do
>>> everybody's homework and work work for them.
>>> 
>>> Just knowing someone else will survive the depression due to my
>>> measly contribution, will one day, get me to Heaven.
>>> 
>>> -sln
>>
>>Oh, I see.  So, maybe take advantage from the people posting here
>>asking
>>people to do their home work for them, and you agree to for a fee.  I
>                                                          ^^^^^^^^^
>                                                          for free
>>didn't see all of the long subject title.   Good luck.
> 
> I think that we, the permanently unemployed, should do the work we
> love for free. And more important, without teaching anybody anything
> at all except love.
> 
> -sln

I missed that part as well.  I guess this isn't my day.
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Sat, 28 Feb 2009 05:42:26 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Feb 28 2009
Message-Id: <KFrH6q.238v@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

App-Framework-0.02
http://search.cpan.org/~sdprice/App-Framework-0.02/
A framework for creating applications 
----
App-Maisha-0.12
http://search.cpan.org/~barbie/App-Maisha-0.12/
A command line social micro-blog networking tool. 
----
Audio-ScratchLive-0.03
http://search.cpan.org/~capoeirab/Audio-ScratchLive-0.03/
Simple way to read/write ScratchLIVE crates and databases 
----
Catalyst-Example-InstantCRUD-0.0.29
http://search.cpan.org/~zby/Catalyst-Example-InstantCRUD-0.0.29/
A CRUD scaffolding for Catalyst. 
----
Catalyst-Plugin-Upload-Audio-File-0.01
http://search.cpan.org/~nheinric/Catalyst-Plugin-Upload-Audio-File-0.01/
Get an Audio::File from an upload 
----
DBIx-Migration-Directories-0.10
http://search.cpan.org/~crakrjack/DBIx-Migration-Directories-0.10/
Install/remove/upgrade/downgrade SQL schemas 
----
Forest-0.05
http://search.cpan.org/~stevan/Forest-0.05/
A collection of n-ary tree related modules 
----
Forest-0.06
http://search.cpan.org/~stevan/Forest-0.06/
A collection of n-ary tree related modules 
----
Frontier-Client-Easy-1.03
http://search.cpan.org/~dfreedman/Frontier-Client-Easy-1.03/
Perl extension for easy use of Frontier::Client 
----
Geography-JapaneseMunicipals-0.01
http://search.cpan.org/~yukio/Geography-JapaneseMunicipals-0.01/
Japanese Municipals Data. 
----
HTML-BBCode-2.06
http://search.cpan.org/~blom/HTML-BBCode-2.06/
Perl extension for converting BBcode to HTML. 
----
HTTP-Engine-Middleware-0.10
http://search.cpan.org/~yappo/HTTP-Engine-Middleware-0.10/
middlewares distribution 
----
IPC-MMA-0.54
http://search.cpan.org/~mackenna/IPC-MMA-0.54/
Shared Memory using Ralf Engelschall's mm library 
----
Image-Heatmap-0.017
http://search.cpan.org/~wazzuteke/Image-Heatmap-0.017/
Build heatmap images 
----
Image-Heatmap-0.419
http://search.cpan.org/~wazzuteke/Image-Heatmap-0.419/
Build heatmap images 
----
Image-Heatmap-0.421
http://search.cpan.org/~wazzuteke/Image-Heatmap-0.421/
Build heatmap images 
----
Image-Heatmap-0.423
http://search.cpan.org/~wazzuteke/Image-Heatmap-0.423/
Build heatmap images 
----
JS-Chicken-0.01
http://search.cpan.org/~stevan/JS-Chicken-0.01/
Templating module for Javascript 
----
JS-Chicken-0.02
http://search.cpan.org/~stevan/JS-Chicken-0.02/
Templating module for Javascript 
----
JSORB-0.01
http://search.cpan.org/~stevan/JSORB-0.01/
Javascript Object Request Broker 
----
MooseX-GlobRef-0.07
http://search.cpan.org/~dexter/MooseX-GlobRef-0.07/
Store a Moose object in glob reference 
----
Net-IMAP-Client-0.11
http://search.cpan.org/~mishoo/Net-IMAP-Client-0.11/
Not so simple IMAP client library 
----
Parse-Dia-SQL-0.02
http://search.cpan.org/~aff/Parse-Dia-SQL-0.02/
Convert Dia class diagrams into SQL. 
----
Parse-Eyapp-1.143
http://search.cpan.org/~casiano/Parse-Eyapp-1.143/
Extensions for Parse::Yapp 
----
Rose-HTMLx-Form-Field-PopUpMenuNumeric-0.001
http://search.cpan.org/~karman/Rose-HTMLx-Form-Field-PopUpMenuNumeric-0.001/
popup menu for numeric values 
----
Rose-HTMLx-Form-Related-0.16
http://search.cpan.org/~karman/Rose-HTMLx-Form-Related-0.16/
RHTMLO forms, living together 
----
SVN-Look-0.14.5
http://search.cpan.org/~gnustavo/SVN-Look-0.14.5/
A caching wrapper aroung the svnlook command. 
----
Simo-0.09_01
http://search.cpan.org/~kimoto/Simo-0.09_01/
Very simple framework for Object Oriented Perl. 
----
Storable-Ref-1.1
http://search.cpan.org/~vany/Storable-Ref-1.1/
Persistent automatic variables vi Storable 
----
String-BufferStack-1.13
http://search.cpan.org/~alexmv/String-BufferStack-1.13/
Nested buffers for templating systems 
----
Template-Declare-0.38
http://search.cpan.org/~alexmv/Template-Declare-0.38/
Perlish declarative templates 
----
Term-Completion-0.91
http://search.cpan.org/~marekr/Term-Completion-0.91/
read one line of user input, with convenience functions 
----
Term-ReadLine-Gnu-1.18
http://search.cpan.org/~hayashi/Term-ReadLine-Gnu-1.18/
Perl extension for the GNU Readline/History Library 
----
Test-XML-Deep-0.04
http://search.cpan.org/~jlavallee/Test-XML-Deep-0.04/
= XML::Simple + Test::Deep 
----
Test-XML-Deep-0.05
http://search.cpan.org/~jlavallee/Test-XML-Deep-0.05/
= XML::Simple + Test::Deep 
----
Tie-FlatFile-Array-0.04
http://search.cpan.org/~mumiaw/Tie-FlatFile-Array-0.04/
Treat a flatfile database as an array of arrays. 
----
Tie-FlatFile-Array-0.0401
http://search.cpan.org/~mumiaw/Tie-FlatFile-Array-0.0401/
Treat a flatfile database as an array of arrays. 
----
WWW-Facebook-Go-SGF-1.0
http://search.cpan.org/~dcantrell/WWW-Facebook-Go-SGF-1.0/
convert a game of Go on Facebook into SGF. 
----
WWW-Mechanize-Plugin-JavaScript-0.009
http://search.cpan.org/~sprout/WWW-Mechanize-Plugin-JavaScript-0.009/
JavaScript plugin for WWW::Mechanize 
----
XML-Grammar-Screenplay-0.0500
http://search.cpan.org/~shlomif/XML-Grammar-Screenplay-0.0500/
CPAN distribution implementing an XML grammar for screenplays. 
----
Xacobeo-0.07
http://search.cpan.org/~potyl/Xacobeo-0.07/
XPath (XML Path Language) visualizer. 
----
threads-emulate-0.0.4
http://search.cpan.org/~fco/threads-emulate-0.0.4/
Create and use emulated threads (and share vars easyer) 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


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

Date: Sun, 01 Mar 2009 01:12:38 GMT
From: sln@netherlands.com
Subject: Re: Once again: Rolling Frame!
Message-Id: <p6njq49cdig8e7dmt8f2klkadrmcotuvpm@4ax.com>

On Mon, 23 Feb 2009 22:30:42 -0800 (PST), Marek <mstep@podiuminternational.org> wrote:

>On Feb 24, 2:24 am, s...@netherlands.com wrote:
>
>> snip
>
>Wow! This is great art! I am admiring such code, like a painting of
>Ilya Repin or ( because you are from Netherlands :) Salomon van
>Ruysdael. I will need weeks to fully understand, what is exactly going
>on in your solution.
>
>I know, the codex of honour in this group is to suggest first an own
>attempt of code, before asking for help. But: Dear Master sln! I dare
>not to ask a supplemental question. If you have no time, please simply
>don't answer. I don't want to abuse your witness and ***art***. But
>certainly I have a next big problem: How to work with these double
>numbers, once they occur? If there appears a double number, for
>example the 7 in line 5, I would like to see, whether it appears for a
>third time in a frame of five steps later.
>
>Thank you again
>
>
>marek

Play with $Frame, $subframe and $suboffset variables and ramp stuff.
Frame can be as large as you want, even larger than all your data.
Make it large enough to encapsulate the numeric searches you need.
This is really 2 subroutines. A third might be able to do number
processing with regular expressions, letting you define more specific
numeric traffic.

There is no need though, to do while() unless you either have a very
large file or are streaming real-time data. The same results can be had
by mapping (line/number) pairs into an array, the primary sort by number,
secondary by line. Then you can process the #line's withing the encolsing
#number's. Same thing.

Btw, I'm not from Europe.

Regards,
-sln

----------------------------------------------------
## frame3.pl
##
use warnings;
use strict;

# Variables that control buffer manipulation ...
my %Lines;	  # Line buffer, up to $frame lines:  line => number.
my %Nums;	  # Number buffer, less than or equal to $frame:  number => [line,line,line]
my $Frame = 20;	  # Frame size, can be many times larger than Subframe
my $line = 0;	  # "line" counter.

# Virtual frame variable (used for rampdown and data printing)
my $vframe = $Frame;

# Variables to control number matching ...
my $rampup = 0;	     # 1 = process frame before it fills (no match, for debug only), 0 = wait for full frame
my $rampdown = 1;    # 1 = process last full frame until its empty (RECOMMENDED), 0 = do not process last frame
my $subframe = 3;    # Subframe size to check for number after double (can be 1 .. # for different effects)
my $suboffset= 2;    # Suboffset from 'double' where Subframe starts, 'double' is on Frame boundry (0 .. # for effects)
my $firstdouble = 1; # 1 = force first sequential double found  (22)22222
                     # 0 = force last double found  22222(22), offset should be greater than 2
# Misc ...
my ($data,$nbr,$nbr_count,$aref,$off_frame_nbr);


print <<"EOINF";

===========================
Frame size	$Frame
Subframe size	$subframe
Suboffset	$suboffset
Rampup		$rampup
Rampdown	$rampdown
First double	$firstdouble
===========================
EOINF


while ( defined ($data = <DATA>) || ($rampdown && keys %Lines))
{
	# Get digits
	if (defined $data) {
		$data =~ /^\s*(\d+)\s*$/;
		next if (!defined $1);
		$nbr = $1;
		$line++;
		$Lines{ $line} = $nbr;
		unshift @{$Nums{ $nbr}}, $line;  # prepend line to array
	} else {
		--$vframe;
		$vframe = $line if ($vframe > $line);
	}

	if ( $rampup || ($vframe != $Frame) || keys %Lines == $vframe )
	{
		## Display/check whats in the Numbs buffer
		if ( keys %Lines ) { print "\nFrame ".($line < $vframe ? 1: $line-$vframe+1)."-$line\n" }
		foreach $nbr ( sort { $a <=> $b } keys %Nums )
		{
			$aref = $Nums{ $nbr};
			$nbr_count = @$aref;
			my @ln_array = reverse @$aref;

			printf "%3d: %3d times at lines (%s)\n", $nbr, $nbr_count, join(',', @ln_array);

			# -------------------------------------------------------------------------------------
			# Check if number is seen within a subframe at suboffset past finding its 'double'.
			# Detection of 'double' is on a frame boundry only.
			# --------------
			my ($cur,$prev,$offset,$check_subframe) = (0,-1,0,0);

			foreach $cur (@ln_array)
			{
				if ( !($check_subframe && $firstdouble) && $cur == ($prev + 1)) {
					$offset = $prev + $suboffset;
					$check_subframe = 1;
					# ---
					# Force detection on frame boundry (full frame or ramp down frame).
					last if (($line - $vframe + 1) != ($offset - $suboffset));
				}
				if ($check_subframe && $cur >= $offset && $cur < ($offset + $subframe) ) {
					print "\t\$\$ >> Found #($nbr) !!  Sequence \@ " . ($offset - $suboffset) .
						", subframe = " . $offset ."-". ($offset + $subframe - 1) .
						", line = $cur\n";
					last;
				}
				$prev = $cur;
			}
		}
		print "---------\n";

		## Handle buffers
		if ( keys %Lines == $vframe || !defined $data)
		{
			# Deplete line going out of frame
			$off_frame_nbr = $Lines{ $line - $vframe + 1};
			pop @{$Nums{ $off_frame_nbr}};
			delete $Nums{ $off_frame_nbr} if (!@{$Nums{ $off_frame_nbr}});

			# Maintain Line buffer size
			delete $Lines{ $line - $vframe + 1};
		}
	}
}

__DATA__
01.01.98
7
7
7
31
7
33
14
77
7
35
26
20
20
7
7
7
23
55
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
21
2
20
7
20
0
2
0




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

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


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