[28523] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9887 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 25 03:05:56 2006

Date: Wed, 25 Oct 2006 00:05:09 -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           Wed, 25 Oct 2006     Volume: 10 Number: 9887

Today's topics:
    Re: ActiveState Perl crashs, why ? <tadmc@augustmail.com>
    Re: Can't find string terminator ... <nospam@somewhere.com>
    Re: Can't find string terminator ... <softouch@softouch.on.ca>
    Re: Can't find string terminator ... <darryll.wolf@gmail.com>
    Re: FAQ 3.3 Is there a Perl shell? <brian.d.foy@gmail.com>
    Re: File and directory permissions <joe@inwap.com>
        Getting session cookies to work with perl <nospam@home.com>
    Re: Getting session cookies to work with perl usenet@DavidFilmer.com
        help needed <novostik@googlemail.com>
    Re: help needed usenet@DavidFilmer.com
    Re: Help with reverse order number generation <wahab@chemie.uni-halle.de>
    Re: Help with reverse order number generation <xicheng@gmail.com>
        multiline hawk.alan@gmail.com
    Re: multiline <thepoet_nospam@arcor.de>
    Re: multiline hawk.alan@gmail.com
        new CPAN modules on Wed Oct 25 2006 (Randal Schwartz)
    Re: string substitution for a file, without replacing p <bootiack@yahoo.com>
        using File::Find with big files on Linux <rohm@cisco.com>
    Re: using File::Find with big files on Linux <DJStunks@gmail.com>
    Re: using File::Find with big files on Linux <joe@inwap.com>
        What's wrong <dialectics@yahoo.com>
    Re: What's wrong <noreply@gunnar.cc>
    Re: What's wrong <joe@inwap.com>
    Re: What's wrong <tadmc@augustmail.com>
    Re: Why I no longer use Perl <joe@inwap.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 24 Oct 2006 18:49:06 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: ActiveState Perl crashs, why ?
Message-Id: <slrnejt9ji.7qa.tadmc@tadmc30.august.net>

perl <someone@somewhere.none> wrote:

> Perl crashes 


What does "crashes" mean when you say it?

That is, what symptoms do you observe?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 24 Oct 2006 20:33:07 -0400
From: "Thrill5" <nospam@somewhere.com>
Subject: Re: Can't find string terminator ...
Message-Id: <8-WdnR0mr8UKLaPYnZ2dnUVZ_o6dnZ2d@comcast.com>


"Amer Neely" <softouch@softouch.on.ca> wrote in message 
news:SQb%g.172875$sS1.156628@read1.cgocable.net...
> Amer Neely wrote:
>> Tintin wrote:
>>> "Trudge" <trudge@softouch.on.ca> wrote in message 
>>> news:1161631450.832297.271190@h48g2000cwc.googlegroups.com...
>>>> This is driving me crazy. I've been programming Perl for several years,
>>>> and love the 'here' document capability. I know how it works, and use
>>>> it in almost every script I write. I've done the Google group search
>>>> and read most of the postings, but no answers to my particular problem.
>>>>
>>>> My development environment is Windows 2000 Pro, running Apache (1.3.29
>>>> and  2.0.52) and ActiveState Perl 5.x. I've been developing under this
>>>> scenario for a couple of years. I use TextPad as my editor. I haven't
>>>> made any changes to anything in the environment. Most of my scripts end
>>>> up on *nix boxes, and they all work just fine there.
>>>>
>>>> Lately I noticed this on my home machine when running a test script:
>>>> Can't find string terminator "EndOfText" anywhere before EOF at test.pl
>>>> line 12 (#1)
>>>>    (F) Perl strings can stretch over multiple lines.  This message
>>>> means
>>>>    that the closing delimiter was omitted.  Because bracketed quotes
>>>> count
>>>>    nesting levels, the following is missing its final parenthesis:
>>>>
>>>>        print q(The character '(' starts a side comment.);
>>>>
>>>>    If you're getting this error from a here-document, you may have
>>>> included
>>>>    unseen whitespace before or after your closing tag. A good
>>>> programmer's
>>>>    editor will have a way to help you find these characters.
>>>>
>>>> Uncaught exception from user code:
>>>> Can't find string terminator "EndOfText" anywhere before EOF at
>>>> test.pl line 12.
>>>> at test.pl line 12
>>>>
>>>> Here's the code:
>>>> #! /usr/bin/perl -w
>>>> BEGIN
>>>> {
>>>> open (STDERR,">>$0-err.txt");
>>>> print STDERR "\n",scalar localtime,"\n";
>>>> }
>>>>
>>>> use diagnostics;
>>>>
>>>> print "Content-type:text/plain\n\n";
>>>>
>>>> print <<EndOfText;
>>>> Why doesn't this work?
>>>> EndOfText
>>>>
>>>> I've checked this for syntax umpteen times and can't find anything
>>>> wrong. There is a hard-return after 'EndOfText' and it is at the left
>>>> margin. I run it through the server in a browser window and from the
>>>> command line, but still get the same result.
>>>>
>>>> It's like an EOF character is buried in there somewhere. Which leads me
>>>> to wonder if TextPad has been corrupted to save files in a funky format
>>>> or something.
>>>
>>> What is the hex or octal output of those last 3 lines?
>>
>> Hmmm. This is interesting. I loaded the file as a binary into TextPad, 
>> and there is 0D 0D 0A after the final 't'. So an extra line-feed seems to 
>> have crept in there.
>>
>> Good call :) Now to fix the bloody problem.
>>
>
> Well, I've solved the problem, but it is the weirdest thing I've seen.
>
> In TextPad my default font was verdana. I switched that to courier. Then 
> copied the code from my test.pl file. Deleted that file, then into a new 
> file I pasted the code, but now in the new font. Voila. Unbelievable but 
> true.
>
> -- 
> Amer Neely

I had a similar experience once before with an extra "0x0d" characters in a 
small script I was working on, and I have never used the above text editor, 
but with "notepad.exe".  I found it pretty quickly using "Wordpad.exe".  I 
loaded up the script in WordPad because I know from experience that it will 
either fix, or display any funky characters in a text file.  (It will 
successfully load unix text files, and covert them to cr-lf format after 
saving)  Each line had an offending "0x0d" on the end which showed up in 
WordPad as a funky character at the end of each line.

Scott 




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

Date: Tue, 24 Oct 2006 21:41:07 -0400
From: Amer Neely <softouch@softouch.on.ca>
Subject: Re: Can't find string terminator ...
Message-Id: <Hgz%g.122169$ED.46281@read2.cgocable.net>

Thrill5 wrote:
> "Amer Neely" <softouch@softouch.on.ca> wrote in message 
> news:SQb%g.172875$sS1.156628@read1.cgocable.net...
>> Amer Neely wrote:
>>> Tintin wrote:
>>>> "Trudge" <trudge@softouch.on.ca> wrote in message 
>>>> news:1161631450.832297.271190@h48g2000cwc.googlegroups.com...
>>>>> This is driving me crazy. I've been programming Perl for several years,
>>>>> and love the 'here' document capability. I know how it works, and use
>>>>> it in almost every script I write. I've done the Google group search
>>>>> and read most of the postings, but no answers to my particular problem.
>>>>>
>>>>> My development environment is Windows 2000 Pro, running Apache (1.3.29
>>>>> and  2.0.52) and ActiveState Perl 5.x. I've been developing under this
>>>>> scenario for a couple of years. I use TextPad as my editor. I haven't
>>>>> made any changes to anything in the environment. Most of my scripts end
>>>>> up on *nix boxes, and they all work just fine there.
>>>>>
>>>>> Lately I noticed this on my home machine when running a test script:
>>>>> Can't find string terminator "EndOfText" anywhere before EOF at test.pl
>>>>> line 12 (#1)
>>>>>    (F) Perl strings can stretch over multiple lines.  This message
>>>>> means
>>>>>    that the closing delimiter was omitted.  Because bracketed quotes
>>>>> count
>>>>>    nesting levels, the following is missing its final parenthesis:
>>>>>
>>>>>        print q(The character '(' starts a side comment.);
>>>>>
>>>>>    If you're getting this error from a here-document, you may have
>>>>> included
>>>>>    unseen whitespace before or after your closing tag. A good
>>>>> programmer's
>>>>>    editor will have a way to help you find these characters.
>>>>>
>>>>> Uncaught exception from user code:
>>>>> Can't find string terminator "EndOfText" anywhere before EOF at
>>>>> test.pl line 12.
>>>>> at test.pl line 12
>>>>>
>>>>> Here's the code:
>>>>> #! /usr/bin/perl -w
>>>>> BEGIN
>>>>> {
>>>>> open (STDERR,">>$0-err.txt");
>>>>> print STDERR "\n",scalar localtime,"\n";
>>>>> }
>>>>>
>>>>> use diagnostics;
>>>>>
>>>>> print "Content-type:text/plain\n\n";
>>>>>
>>>>> print <<EndOfText;
>>>>> Why doesn't this work?
>>>>> EndOfText
>>>>>
>>>>> I've checked this for syntax umpteen times and can't find anything
>>>>> wrong. There is a hard-return after 'EndOfText' and it is at the left
>>>>> margin. I run it through the server in a browser window and from the
>>>>> command line, but still get the same result.
>>>>>
>>>>> It's like an EOF character is buried in there somewhere. Which leads me
>>>>> to wonder if TextPad has been corrupted to save files in a funky format
>>>>> or something.
>>>> What is the hex or octal output of those last 3 lines?
>>> Hmmm. This is interesting. I loaded the file as a binary into TextPad, 
>>> and there is 0D 0D 0A after the final 't'. So an extra line-feed seems to 
>>> have crept in there.
>>>
>>> Good call :) Now to fix the bloody problem.
>>>
>> Well, I've solved the problem, but it is the weirdest thing I've seen.
>>
>> In TextPad my default font was verdana. I switched that to courier. Then 
>> copied the code from my test.pl file. Deleted that file, then into a new 
>> file I pasted the code, but now in the new font. Voila. Unbelievable but 
>> true.
>>
>> -- 
>> Amer Neely
> 
> I had a similar experience once before with an extra "0x0d" characters in a 
> small script I was working on, and I have never used the above text editor, 
> but with "notepad.exe".  I found it pretty quickly using "Wordpad.exe".  I 
> loaded up the script in WordPad because I know from experience that it will 
> either fix, or display any funky characters in a text file.  (It will 
> successfully load unix text files, and covert them to cr-lf format after 
> saving)  Each line had an offending "0x0d" on the end which showed up in 
> WordPad as a funky character at the end of each line.
> 
> Scott 
> 

TP has configuration capabilities to use DOS, Unix, or Mac end-of-line 
characters but I've never run into this problem before. What is still 
weird is that a change of font should make a difference, as you say. It 
seems more likely to be an artifact of something else. Notepad has some 
quirky behaviour as well. Try this:
1. Open Notepad
2. Type the text "this app can break" (without quotes)
3. Save the file
4. Re-open the file in Notepad


-- 
Amer Neely
w: www.softouch.on.ca/
b: www.softouch.on.ca/blog/
v: 705.223.3539
Perl | MySQL programming for all data entry forms.
"We make web sites work!"


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

Date: 24 Oct 2006 22:26:50 -0700
From: "Solipsis" <darryll.wolf@gmail.com>
Subject: Re: Can't find string terminator ...
Message-Id: <1161754010.436348.299030@k70g2000cwa.googlegroups.com>

Trudge,


Silly question.  Is this happening after you ftp the files to the *nix
box? Or before?



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

Date: Tue, 24 Oct 2006 16:31:34 -0500
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 3.3 Is there a Perl shell?
Message-Id: <241020061631345445%brian.d.foy@gmail.com>

In article <pan.2006.10.24.06.39.19.863347@remove.this.part.rtij.nl>,
Martijn Lievaart <m@remove.this.part.rtij.nl> wrote:

> On Mon, 23 Oct 2006 12:03:02 -0700, PerlFAQ Server wrote:


> > 3.3: Is there a Perl shell?
> > 
> >     The psh (Perl sh) is currently at version 1.8. The Perl Shell is a shell

> >     http://sourceforge.net/projects/psh/ .

> This seems a dead project.

Well, it hasn't had any activity in the past couple of years, but maybe
someone will read this and be interested enough to re-start it. :)

-- 
Posted via a free Usenet account from http://www.teranews.com



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

Date: Tue, 24 Oct 2006 23:22:46 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: File and directory permissions
Message-Id: <0tOdnbkRce5on6LYnZ2dnUVZ_tmdnZ2d@comcast.com>

ismael wrote:

> I have some problems to get the the permissions on windows with Perl code. I
> use a simple code that run perfectly in UNIX but give me wrong information
> on Windows.
> This code allways say that file is readable and writable except if is a read
> only file.

How, exactly, are you setting the permissions on the Windows files?
If they are set by using the chmod() function in ActivePerl, I see
the expected results.

C:\>perl -le "for (@ARGV){open X,'>',$_;close X;chmod 0111*$_,$_}" 0 1 2 3 4 5 6 7

C:\>perl -le "print $_,'=',(-r $_?'R':'r'),(-w $_?'W':'w'),(-x $_?'X':'x') for @ARGV" ?
0=rwx
1=rwX
2=rWx
3=rWX
4=Rwx
5=RwX
6=RWx
7=RWX

Since Windows file ACLs have many more possible combinations than
simply R+W+X, it is no surprise that many of them do not correspond
to the UNIX semantics.
	-Joe


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

Date: Tue, 24 Oct 2006 22:37:52 GMT
From: "Nospam" <nospam@home.com>
Subject: Getting session cookies to work with perl
Message-Id: <4Bw%g.2831$RR2.1965@newsfe2-win.ntli.net>

Is there something I need to do to allow session cookies to work with perl,
as I notice I am able to fill out a form successfully with firefox, but
can't with perl, even though all the fields were filled in properly, and
mechanize states it was successful.





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

Date: 24 Oct 2006 16:07:31 -0700
From: usenet@DavidFilmer.com
Subject: Re: Getting session cookies to work with perl
Message-Id: <1161731251.147091.294690@e3g2000cwe.googlegroups.com>

Nospam wrote:
> Is there something I need to do to allow session cookies to work with perl,

No, they are enabled by default in Mechanize.

But you may need to do something goofy to OBTAIN the proper cookie(s)
because of however the site is set up.

I have a script that grabs some mutual fund information. I need to be
able to grab this page:
   https://example.com/parts/nav/fund_performance.cfm

But, of course, I need a cookie.  So I log-in like this:

   $mech->get('https://example.com/parts/login_1.html');
      $mech->field('userid', 'myuserid');
      $mech->field('passwd', 'mypasswd');
      $mech->field('javascriptenabled', 'true');  #liar!
   $mech->submit;

And I thought that would have done the trick, but I found out that I
still didn't have the cookie I needed.  I looked at the site's HTML (or
I could have used the TamperData plug-in for Firefox) and discovered
that I needed to do this extra step:

   $mech->get('login_2.cfm');  #this sets a cookie or something

I don't know what that login_2.cfm does - I gather it drops the needed
cookie and then does a redirect or something.  But I needed to do that
in order to fully authenticate the session.  I just simply get() the
page; there's no form or anything on it, so I don't need to set fields
or submit anything.  The simple act of get()ting this one extra page
allowed me to obtain the needed cookie.

Then I can grab and parse the info, and be fat, dumb, and happy with
something like:

my $info =
$mech->get('https://example.com/parts/nav/fund_performance_print.cfm')
->content;

--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)



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

Date: 24 Oct 2006 20:26:55 -0700
From: "novostik@googlemail.com" <novostik@googlemail.com>
Subject: help needed
Message-Id: <1161746815.681105.111860@m7g2000cwm.googlegroups.com>

hi guys ,
             i m new to perl.i want to know how perl programming is
done to extract links etc from html pages using HTML:linkextor ,
LWP:useragent etc......so could u please provide me some links  from
where i can start.
It would be of great help.



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

Date: 24 Oct 2006 22:15:10 -0700
From: usenet@DavidFilmer.com
Subject: Re: help needed
Message-Id: <1161753310.885870.118920@m73g2000cwd.googlegroups.com>

novostik@googlemail.com wrote:
>              i m new to perl.i want to know how perl programming is
> done to extract links etc from html pages using HTML:linkextor ,
> LWP:useragent etc......so could u please provide me some links  from
> where i can start.

Hmmm. I first thought, "you gotta be kidding me" but then I noticed
that you only use one colon (doublepoint) in the module names, and that
won't resolve in CPAN.  The proper names of the modules are
HTML::LinkExtor and LWP::UserAgent (note '::').  CPAN likes that much
better:

   http://search.cpan.org/~gaas/HTML-Parser-3.55/lib/HTML/LinkExtor.pm
   http://search.cpan.org/~gaas/libwww-perl-5.805/lib/LWP/UserAgent.pm

-- 
David Filmer (http://DavidFilmer.com)



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

Date: Tue, 24 Oct 2006 23:46:19 +0200
From: Mirco Wahab <wahab@chemie.uni-halle.de>
Subject: Re: Help with reverse order number generation
Message-Id: <ehm3db$9r6$2@mlucom4.urz.uni-halle.de>

Thus spoke Deepu (on 2006-10-24 22:56):

> I am trying to take the below pattern as input from a file:
> 0xFF09   0x0819  0x0809
> 0x8695   0x4527   0xFFFF
> 0xFEFF  0x0203   0x1617
> 
> And need to print in another file in reverse order:
> 17 16 03 02 FF FE
> FF FF 27 45 95 86
> 09  08 19 08 09 FF

Looks like you have to read all your stuff
via a filehandle FH

   push @arr, [ map +(/(..)(..)$/), split ] while <FH>;

and then simply print it "reverse/reverse"

   print +(join ' ', reverse @$_), "\n" for reverse @arr;


But surely this problem can be solved with
clever one-liners too ;-)


Regards

Mirco


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

Date: 24 Oct 2006 15:35:44 -0700
From: "Xicheng Jia" <xicheng@gmail.com>
Subject: Re: Help with reverse order number generation
Message-Id: <1161729344.150220.207210@m7g2000cwm.googlegroups.com>

Deepu wrote:
> Hi All,
>
> I am trying to take the below pattern as input from a file:
> 0xFF09   0x0819  0x0809
> 0x8695   0x4527   0xFFFF
> 0xFEFF  0x0203   0x1617
>
> And need to print in another file in reverse order:
> 17 16 03 02 FF FE
> FF FF 27 45 95 86
> 09  08 19 08 09 FF
>
> Can somebody please help me on this giving some ideas.
>

Besides the suggestions you got from others, you might also try:

bash: ~$ echo '0xFF09   0x0819  0x0809
0x8695   0x4527   0xFFFF
0xFEFF  0x0203   0x1617' | perl -lne '
    push @arr, join" ", reverse /[0-9A-F]{2}/g
}{
    print for reverse @arr
'
17 16 03 02 FF FE
FF FF 27 45 95 86
09 08 19 08 09 FF

--
Xicheng



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

Date: 24 Oct 2006 21:49:55 -0700
From: hawk.alan@gmail.com
Subject: multiline
Message-Id: <1161751795.314351.49240@m73g2000cwd.googlegroups.com>

open(FILE,$ARGV[0]);

while(<FILE>){
 if (/falls mainly on.*l /s){ print"1";};
 print;
}


the rain in spain
falls mainly on the
plain

isn't matching across the line. plz help. The /s modifier doesn't seem
to be 
working.



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

Date: Wed, 25 Oct 2006 07:06:59 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: multiline
Message-Id: <453ef0eb$0$27612$9b4e6d93@newsspool2.arcor-online.net>

hawk.alan@gmail.com wrote:
> open(FILE,$ARGV[0]);
> 
> while(<FILE>){
>  if (/falls mainly on.*l /s){ print"1";};
>  print;
> }
> 
> 
> the rain in spain
> falls mainly on the
> plain
> 
> isn't matching across the line. plz help. The /s modifier doesn't seem
> to be working.

The /s modifier works just fine. But as you're reading in
your file line by line, you never have a line in $_ that
matches your pattern. If you want to read in more than
just one line at once, you should have a look at
  perldoc -q "How can I read in an entire file all at once"

And btw., you should always check the return code of open like
  open(FILE, $ARGV[0]) or die "Failed to open $ARGV[0]: $!";
and put "use strict;" and "use warnings;" on top of your script.
Even though it might be that an example for this groups seems
too trivial to need this, it might otherwise encourage other
readers to test and post their code without it as well.

HTH
-Chris


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

Date: 24 Oct 2006 22:32:37 -0700
From: hawk.alan@gmail.com
Subject: Re: multiline
Message-Id: <1161754357.327896.125540@m7g2000cwm.googlegroups.com>

:( .

At least I know now.

It does mean I'm gonna have to change the rest of my script to
accommadate for slurping(ie. $/="").



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

Date: Wed, 25 Oct 2006 04:42:00 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Oct 25 2006
Message-Id: <J7oD20.178F@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.

Acme-MetaSyntactic-0.97
http://search.cpan.org/~book/Acme-MetaSyntactic-0.97/
Themed metasyntactic variables names
----
Apache-DBI-1.04
http://search.cpan.org/~pgollucci/Apache-DBI-1.04/
Initiate a persistent database connection
----
Apache-Dispatch-0.10_01
http://search.cpan.org/~phred/Apache-Dispatch-0.10_01/
call PerlHandlers with the ease of Registry scripts
----
Archive-Zip-1.17_05
http://search.cpan.org/~adamk/Archive-Zip-1.17_05/
Provide an interface to ZIP archive files.
----
CPAN-1.88_57
http://search.cpan.org/~andk/CPAN-1.88_57/
query, download and build perl modules from CPAN sites
----
CPAN-Reporter-0.28_51
http://search.cpan.org/~dagolden/CPAN-Reporter-0.28_51/
Provides Test::Reporter support for CPAN.pm
----
Check-UnitCheck-0.10
http://search.cpan.org/~ajgough/Check-UnitCheck-0.10/
Use best of CHECK or UNITCHECK
----
Coro-2.0
http://search.cpan.org/~mlehmann/Coro-2.0/
coroutine process abstraction
----
DBD-LDAP-0.09
http://search.cpan.org/~turnerjw/DBD-LDAP-0.09/
Perl extension for DBI, providing an SQL/Perl DBI interface to Ldap databases. LDAP stands for the "Lightweight Directory Access Protocol". For more information, see: http://www.ogre.com/ldap/docs.htm
----
DBD-Sprite-0.59
http://search.cpan.org/~turnerjw/DBD-Sprite-0.59/
Perl extension for DBI, providing database emmulation via flat files.
----
DBIx-Class-EncodeColumns-0.01
http://search.cpan.org/~esskar/DBIx-Class-EncodeColumns-0.01/
Handle column encodings
----
DateTime-Natural-Parse-0.04
http://search.cpan.org/~schubiger/DateTime-Natural-Parse-0.04/
Create machine readable date/time with natural parsing logic
----
DateTime-TimeZone-0.53
http://search.cpan.org/~drolsky/DateTime-TimeZone-0.53/
Time zone object base class and factory
----
Encode-RAD50-0.004
http://search.cpan.org/~wyant/Encode-RAD50-0.004/
Convert to and from the Rad50 character set.
----
File-Remove-0.33
http://search.cpan.org/~adamk/File-Remove-0.33/
Remove files and directories
----
Graphics-ColorNames-2.0_04
http://search.cpan.org/~rrwo/Graphics-ColorNames-2.0_04/
defines RGB values for common color names
----
MessageBus-0.01
http://search.cpan.org/~audreyt/MessageBus-0.01/
Lightweight publish/subscribe messaging system
----
MessageBus-0.02
http://search.cpan.org/~audreyt/MessageBus-0.02/
Lightweight publish/subscribe messaging system
----
MessageBus-0.03
http://search.cpan.org/~audreyt/MessageBus-0.03/
Lightweight publish/subscribe messaging system
----
Module-ScanDeps-0.67
http://search.cpan.org/~smueller/Module-ScanDeps-0.67/
Recursively scan Perl code for dependencies
----
Module-Util-1.03
http://search.cpan.org/~mattlaw/Module-Util-1.03/
Module name tools and transformations
----
Net-CyanChat-0.04
http://search.cpan.org/~kirsle/Net-CyanChat-0.04/
Perl interface for connecting to Cyan Worlds' chat room.
----
PAR-0.957
http://search.cpan.org/~smueller/PAR-0.957/
Perl Archive Toolkit
----
POE-Component-IRC-5.09
http://search.cpan.org/~bingos/POE-Component-IRC-5.09/
a fully event-driven IRC client module.
----
POE-Component-IRC-5.10
http://search.cpan.org/~bingos/POE-Component-IRC-5.10/
a fully event-driven IRC client module.
----
POE-Filter-FSSocket-0.07
http://search.cpan.org/~ptinsley/POE-Filter-FSSocket-0.07/
a POE filter that parses FreeSWITCH events into hashes
----
SF_form_secure_v4.0
http://search.cpan.org/~sflex/SF_form_secure_v4.0/
Data integrity for forms, links, cookie or other things.
----
Sub-ForceEval-1.20
http://search.cpan.org/~lembark/Sub-ForceEval-1.20/
runtime cluck if a dying subrutine is not eval-ed.
----
Sys-SigAction-0.10
http://search.cpan.org/~lbaxter/Sys-SigAction-0.10/
Perl extension for Consistent Signal Handling
----
Tk-JBrowseEntry-4.65
http://search.cpan.org/~turnerjw/Tk-JBrowseEntry-4.65/
is a full-featured "Combo-box" (Text-entry combined with drop-down listbox.
----
UNIVERSAL-to_json-0.03
http://search.cpan.org/~kentaro/UNIVERSAL-to_json-0.03/
to_json() method for all objects
----
XML-Compile-0.10
http://search.cpan.org/~markov/XML-Compile-0.10/
Compilation based XML processing
----
Yahoo-Marketing-0.05
http://search.cpan.org/~jlavallee/Yahoo-Marketing-0.05/
an interface for Yahoo! Search Marketing's Web Services.


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/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: 24 Oct 2006 21:05:01 -0700
From: "gavino" <bootiack@yahoo.com>
Subject: Re: string substitution for a file, without replacing partial string?
Message-Id: <1161749100.977707.77710@i3g2000cwc.googlegroups.com>

I did not intend to offend you.  I tried your code and it didn't work.
 .....



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

Date: Tue, 24 Oct 2006 16:50:09 -0700
From: Matt Rohm <rohm@cisco.com>
Subject: using File::Find with big files on Linux
Message-Id: <1161733809.818287@sj-nntpcache-1.cisco.com>


I've noticed something peculiar with a script that
checks file sizes using the File::Find - finddepth
routine.  When it comes across really big files,
say >4GB it examines (or compares) the file twice.

Anyone seen this before?  Care to share the cause of
this problem, and some ideas for a solution?

thx.


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

Date: 24 Oct 2006 19:44:50 -0700
From: "DJ Stunks" <DJStunks@gmail.com>
Subject: Re: using File::Find with big files on Linux
Message-Id: <1161744290.576861.177870@i3g2000cwc.googlegroups.com>


Matt Rohm wrote:
> I've noticed something peculiar with a script that
> checks file sizes using the File::Find - finddepth
> routine.  When it comes across really big files,
> say >4GB it examines (or compares) the file twice.
>
> Anyone seen this before?  Care to share the cause of
> this problem, and some ideas for a solution?

I am highly suspicious.

Where's your "smallest _but complete_ code sample which demonstrates
the problem"?  Have you read the posting guidelines?

-jp



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

Date: Tue, 24 Oct 2006 20:55:50 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: using File::Find with big files on Linux
Message-Id: <o-KdnaFa748ZfaPYnZ2dnUVZ_radnZ2d@comcast.com>

Matt Rohm wrote:
> I've noticed something peculiar with a script that
> checks file sizes using the File::Find - finddepth
> routine.  When it comes across really big files,
> say >4GB it examines (or compares) the file twice.

I haven't seen that problem.

linux% ls -lR
 .:
total 16
drwxr-xr-x  4 jms jms 4096 Oct 24 20:47 one/
drwxr-xr-x  4 jms jms 4096 Oct 24 20:47 two/

 ./one:
total 36
drwxr-xr-x  2 jms jms       4096 Oct 24 20:45 1a/
drwxr-xr-x  2 jms jms       4096 Oct 24 20:46 1b/
-rw-r--r--  1 jms jms 5368709121 Oct 24 20:46 bar-1

 ./one/1a:
total 20
-rw-r--r--  1 jms jms 5368709121 Oct 24 20:44 foo-1a

 ./one/1b:
total 20
-rw-r--r--  1 jms jms 5368709121 Oct 24 20:44 foo-1b

 ./two:
total 36
drwxr-xr-x  2 jms jms       4096 Oct 24 20:46 2a/
drwxr-xr-x  2 jms jms       4096 Oct 24 20:46 2b/
-rw-r--r--  1 jms jms 5368709121 Oct 24 20:46 bar-2

 ./two/2a:
total 20
-rw-r--r--  1 jms jms 5368709121 Oct 24 20:44 foo-2a

 ./two/2b:
total 20
-rw-r--r--  1 jms jms 5368709121 Oct 24 20:44 foo-2b
linux%
linux% find . -depth -print
 ./one/1a/foo-1a
 ./one/1a
 ./one/1b/foo-1b
 ./one/1b
 ./one/bar-1
 ./one
 ./two/2a/foo-2a
 ./two/2a
 ./two/2b/foo-2b
 ./two/2b
 ./two/bar-2
 ./two
 .
linux% perl -MFile::Find -le 'finddepth(sub {print $File::Find::name},".")'
 ./one/bar-1
 ./one/1a/foo-1a
 ./one/1a
 ./one/1b/foo-1b
 ./one/1b
 ./one
 ./two/bar-2
 ./two/2a/foo-2a
 ./two/2a
 ./two/2b/foo-2b
 ./two/2b
 ./two
 .
linux% perl -MFile::Find -le 'find(sub {print $File::Find::name},".")'
 .
 ./one
 ./one/bar-1
 ./one/1a
 ./one/1a/foo-1a
 ./one/1b
 ./one/1b/foo-1b
 ./two
 ./two/bar-2
 ./two/2a
 ./two/2a/foo-2a
 ./two/2b
 ./two/2b/foo-2b
linux% uname -a
Linux mathras 2.6.15-1.1831_FC4 #1 Tue Feb 7 13:37:42 EST 2006 i686

You'll need to post some actual code that we can run to
duplicate the problem.
	-Joe


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

Date: Wed, 25 Oct 2006 00:27:10 GMT
From: "Alex" <dialectics@yahoo.com>
Subject: What's wrong
Message-Id: <yby%g.80689$073.31865@trnddc01>

Here is my perl script:

my %files;
my $filepath = "test.txt";
open (IN, $filepath);
while (<IN>) {
    chomp;
    my $file = $_;
    $files{$file} = $file;
}
close IN;

my $code = 10;
if (exists $files{$code}) {
    print "find key\n";
}
exit;

here is test.txt file:
10
20
30

When I run the script, there is no print "find key".  However, if I change
the scipt to:


my %files;
my $filepath = "test.txt";
open (IN, $filepath);
while (<IN>) {
    chomp;
    my $file = substr($_,0,2);
    $files{$file} = $file;
}
close IN;

my $code = 10;
if (exists $files{$code}) {
    print "find key\n";
}
exit;

It will print "find key".  I could find out what's wrong.  Why change

    my $file = $_;
to
    my $file = substr($_,0,2);

will work.

PS:  in test.txt file, after type 10 followed by Enter key.

Thanks in advance!





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

Date: Wed, 25 Oct 2006 02:42:02 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: What's wrong
Message-Id: <4q7q30Flhu8nU1@individual.net>

Alex wrote:
> Here is my perl script:
> 
> my %files;
> my $filepath = "test.txt";
> open (IN, $filepath);
> while (<IN>) {
>     chomp;
>     my $file = $_;
>     $files{$file} = $file;
> }
> close IN;
> 
> my $code = 10;
> if (exists $files{$code}) {
>     print "find key\n";
> }
> exit;
> 
> here is test.txt file:
> 10
> 20
> 30
> 
> When I run the script, there is no print "find key".

A wild guess: test.txt contains Windows newlines ( \015\012 ), while the 
script is run on *nix ( \012 ).

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


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

Date: Tue, 24 Oct 2006 20:26:40 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: What's wrong
Message-Id: <16-dnWipv7YzRKPYnZ2dnUVZ_oqdnZ2d@comcast.com>

Alex wrote:
> Why change
>     my $file = $_;
> to
>     my $file = substr($_,0,2);
> will work.

You should get perl to print out what it is actually working with.
Change
	chomp;
to
	print "Before: ",(unpack "H*",$_),"\n";
	chomp;
	print "After:  ",(unpack "H*",$_),"\n";
to see if there are more than two characters on the line after chomp().

	-Joe


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

Date: Tue, 24 Oct 2006 20:53:31 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: What's wrong
Message-Id: <slrnejtgsr.9bn.tadmc@tadmc30.august.net>

Alex <dialectics@yahoo.com> wrote:

> Subject: What's wrong


There is no subject in your Subject, that's what.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 24 Oct 2006 23:32:39 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: Why I no longer use Perl
Message-Id: <EYqdnZMzdcXYmKLYnZ2dnUVZ_r2dnZ2d@comcast.com>

strenholme.usenet@gmail.com wrote:
> I have been a Perl programmer for over ten years.  Recently, I found a
> bug in Perl which made me stop using Perl altogether.

It's not a bug.  It's a misunderstanding on the programmer's part.

> So, is there any way to work around this problem? Nope. You might think
> "use utf8" will fix this issue. It doesn't.

The 'use utf8' pragma is used to tell the perl interpreter that
the script itself is written in UTF8.  It affects things like
    $_ = "á";
where string literals inside the Perl program are encoded in UTF8.
It doe _not_ affect data being read or written.

If you are concerned about UTF8 versus non-UTF data in the input
stream, then you need to 'use locale' and/or use I/O layers.
See 'perldoc -q binmode' on the newer version of perl.

	-Joe


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

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 V10 Issue 9887
***************************************


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