[25206] in Perl-Users-Digest
Perl-Users Digest, Issue: 7452 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 26 18:06:13 2004
Date: Fri, 26 Nov 2004 15:05:08 -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 Fri, 26 Nov 2004 Volume: 10 Number: 7452
Today's topics:
Re: [OT] Difference between XHTML and HTTP (WAS: charac <tadmc@augustmail.com>
Re: [OT] Difference between XHTML and HTTP (WAS: charac <bik.mido@tiscalinet.it>
Re: [OT] Difference between XHTML and HTTP (WAS: charac <shawn.corey@sympatico.ca>
Re: counting words in a file (Anno Siegel)
Re: counting words in a file <jwillmore@fastmail.us>
Re: counting words in a file <bastard@uni-koblenz.de>
Re: counting words in a file <segraves_f13@mindspring.com>
Re: Dat files help "Att James" hope@hope.com
Re: Dat files help "Att James" <spamtrap@dot-app.org>
Re: Dat files help "Att James" <tadmc@augustmail.com>
FAQ 4.20: How do I unescape a string? <comdog@panix.com>
FAQ 8.7: How do I clear the screen? <comdog@panix.com>
Re: for Richard Gration <nospam@nospam.com>
Re: for Richard Gration <bik.mido@tiscalinet.it>
Re: for Richard Gration <nospam@nospam.com>
Re: IO object version 1.21 does not match bootstrap par <spamtrap@dot-app.org>
Re: looking for a better regexp <tadmc@augustmail.com>
Re: perl script <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 26 Nov 2004 12:58:05 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: [OT] Difference between XHTML and HTTP (WAS: character encoding in CGI.pm)
Message-Id: <slrncqev5t.45v.tadmc@magna.augustmail.com>
Shawn Corey <shawn.corey@sympatico.ca> wrote:
> BTW Tad, I thought I was on your permanent kill file.
I went "slumming".
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 26 Nov 2004 22:16:47 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: [OT] Difference between XHTML and HTTP (WAS: character encoding in CGI.pm)
Message-Id: <h44fq05cjdhhk6lh4kevmltimcn3mda1f7@4ax.com>
On Fri, 26 Nov 2004 07:08:09 -0500, Shawn Corey
<shawn.corey@sympatico.ca> wrote:
>> [I'm trimming the comprehensive quote down to what I suppose you must
>> have interpreted as the significant part. There's no extra charge for
>> doing this yourself, you know...]
>
>[Yes, now the whole world knows what a hero you are.]
I don't think so. OTOH *most* clpmisc users will thank him anyway.
Now, if you could be so gentle and avoid wasting your energies writing
irrelevant cmts with that attitude I, for one, will thank you too, and
I think many others will as well.
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, 26 Nov 2004 12:17:11 -0500
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: [OT] Difference between XHTML and HTTP (WAS: character encoding in CGI.pm)
Message-Id: <iyJpd.59529$Ro.2235264@news20.bellglobal.com>
Tad McClellan wrote:
> And now the whole world knows what an inconsiderate type of
> poster you are. You shift work from yourself to others.
If you don't like these types of comments you should criticize the first
one.
BTW Tad, I thought I was on your permanent kill file.
--- Shawn
------------------------------
Date: 26 Nov 2004 16:13:00 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: counting words in a file
Message-Id: <co7kmc$14i$2@mamenchi.zrz.TU-Berlin.DE>
wana <ioneabu@yahoo.com> wrote in comp.lang.perl.misc:
> This morning, I wrote a little script to count words in a file. I did
> this one on my pda, which happened to have 'Moby Dick' saved on the
> storage card. Writing Perl scripts on the pda is a little like
> playing video games... I wanted to print to a file the list of words
> and the number of occurrence in descending order of occurrence. The
> following seemed to work, although I initially did my counting loops
> wrong and only counted the first occurrence per line. I was wondering
> if I got it right and if there is a better way to do it. 'Programming
> Perl' mentions the Schwartzian map-sort-map technique which I thought
A Schwartzian won't gain much here. Once you get the sorting right
(see below), access the sort key through a hash. With a Schwartzian
you'd access it through an array built only for that purpose.
> might apply. Also, the loop that does the counting below; I tried it
> this way:
>
> $words{lc $1}++ while /(\w+)/gi for (<INF>);
>
> but it did not work.
No. Statement modifiers only work on simple statements, not ones
already modified.
> #!/usr/bin/perl
>
> use strict;
No warnings?
> my $fn = "/textucation/moby10b.txt";
> open (INF, $fn) or die "error: $!";
> my %words;
> for (<INF>)
> {
> $words{lc $1}++ while /(\w+)/gi;
The /i modifier does nothing and shouldn't be there.
I'd use split without arguments for that. You break "gable-ended
Spouter-Inn" into "gable" and "ended" plus "Spouter" and "Inn", split
keeps the hyphenated words.
> }
Okay so far, you have a hash of words and their count now. What follows
is wrong.
> my @n = %words;
> @n = reverse @n;
> %words = @n;
%words = reverse %words;
That would do the same, but it would be equally wrong. You can only
reverse a hash without loss of information when the values are unique,
but your word counts aren't. Looking at your output, have you noticed
that there appears to be only one word Melville used exactly once?
Every other word he must have used at least twice. That is unlikely,
and is indeed an artifact of this hash reversal.
> my @k = keys %words;
> sub num {$b <=> $a}
> @k = sort num @k;
Scratch everything after the counting loop and simply do
my @k = sort { %words{ $b} <=> %words{ $a} } keys %words;
That's your sort.
> open (OUTF, ">file count.txt") or die "error: $!";
> print OUTF "$_ $words{$_}\r\n" for (@k);
Code untested.
Anno
------------------------------
Date: Fri, 26 Nov 2004 11:21:28 -0500
From: James Willmore <jwillmore@fastmail.us>
Subject: Re: counting words in a file
Message-Id: <pan.2004.11.26.16.21.28.726312@fastmail.us>
On Fri, 26 Nov 2004 17:34:16 +0100, Dimitri Papoutsis wrote:
> I didn't test it, and maybe it isn't the most efficient solution...
> So what about:
>
> while(<IN>){
> chomp;
> s/\W/ /g;
> $file.=' '.$_;
> }
>
> @words=split(/\s+/,$file);
> $wordCount=@words;
No reverse or sort in your example - like the OP wanted :-(
Also, the OP is working with a PDA. PDA's have a limited amount of
memory. I wrote what I wrote to take this into account. Your example may
work fine on a "real" system, but not likely to work as kindly on a system
with limited resources (like a PDA). And ... you're counting *all* the
words equally, instead of each occurence of the word like the OP had in
their example (the total was my idea). And ... there are far easier ways
to read a whole file into a scalar value (think 'undef $/').
Jim
------------------------------
Date: Fri, 26 Nov 2004 18:08:12 +0100
From: Dimitri Papoutsis <bastard@uni-koblenz.de>
Subject: Re: counting words in a file
Message-Id: <co7lev$nnh$1@news.uni-koblenz.de>
James Willmore wrote:
> On Fri, 26 Nov 2004 17:34:16 +0100, Dimitri Papoutsis wrote:
>
>> I didn't test it, and maybe it isn't the most efficient solution...
>> So what about:
>>
>> while(<IN>){
>> chomp;
>> s/\W/ /g;
>> $file.=' '.$_;
>> }
>>
>> @words=split(/\s+/,$file);
>> $wordCount=@words;
>
> No reverse or sort in your example - like the OP wanted :-(
> Also, the OP is working with a PDA. PDA's have a limited amount of
> memory. I wrote what I wrote to take this into account. Your example may
> work fine on a "real" system, but not likely to work as kindly on a system
> with limited resources (like a PDA). And ... you're counting *all* the
> words equally, instead of each occurence of the word like the OP had in
> their example (the total was my idea). And ... there are far easier ways
> to read a whole file into a scalar value (think 'undef $/').
>
> Jim
Ok, next time i'll read more carefully what the OP wants ... I just answered
on base of the headline ...
:o)
dnp
------------------------------
Date: Fri, 26 Nov 2004 19:00:52 GMT
From: "Bill Segraves" <segraves_f13@mindspring.com>
Subject: Re: counting words in a file
Message-Id: <E3Lpd.159$6K5.97@newsread2.news.atl.earthlink.net>
"wana" <ioneabu@yahoo.com> wrote in message
news:bf0b47ca.0411260627.763f0888@posting.google.com...
<snip>
I wanted to print to a file the list of words
> and the number of occurrence in descending order of occurrence.
<snip>
See Learning Perl Appendix A, Exercise 17.2 (answers) for an example of what
you're trying to do.
Cheers.
--
Bill Segraves
------------------------------
Date: Fri, 26 Nov 2004 20:04:32 GMT
From: hope@hope.com
Subject: Re: Dat files help "Att James"
Message-Id: <cc1fq095fmh9ao88l4bl4uavfmt3cjmmgb@4ax.com>
On Fri, 26 Nov 2004 09:09:44 -0600, Tad McClellan <tadmc@augustmail.com>
wrote:
>
>[ Please learn the proper way to compose a followup very soon.
> You have the interleaving part down, that's good. Now add:
>
> 1) trim the quoted text to just enough to establish the context
> for the comment that you are going to add.
Ok now we are getting to different ideas again
I have been told NOT to cut a post as other people who are going to read
it cannot follow what the first post was all about and hence do not know
what was going on.
So what should I do one person says one thing and another says something
different
>
> 2) limit your line lengths to the conventional 70-72 characters.
> (you can probably set your newsreader to handle this for you)
Yes you are correct , It was set to 180 characters. NOW set to 72 is
that ok for you?
>> Ok take your point, Have you looked at something time and time
>> again and cannot spot the mistake ?
>
>
>Yes. Many (too many) times.
Hmmm I'm glad I'm not the only one then, I thought it was my age getting
at me (64)
>
>
>While _I_ could look at and not see it, a machine will surely see
>it the very first time.
>Perl spews error messages for that misspelling.
Oh yes I agree BUT it was correct in the script and was me doing the
silly typing, will NOT do that again
>
>I think what really happened to you is that you ran your program
>in a CGI environment where the error messages end up in your
>server's error log.
>
>Have you been looking in there?
Well yes and no
First I run it in a Program called Perl Builder
I can do all sorts of things from this and this is where I see the
errors.
Then I run it from Netscape
Then looked in the server error_log file
Then from the command Prompt
>
>
>
>It is best to get the program working *from the command line*
>before moving it into a CGI environment.
>
>Do you have command line access either on your web server or on
>your computer at home/work?
Yes I have both I have WinXp Pro with Active Perl and Apache all setup
>But what I was referring to earlier was "malicious" code, a
>much much worse type of thing.
Hmmm so you are saying that there is people who are in here would send
you that type stuff
>Try using /slashes/ in a path in any GUI Windows application (which will
>open the file without the command interpreter's involvement). It ought
>to work just fine.
So if I'm using the Perl Builder OR Netscape from within WinXp and
apache I would use the / slash like "c:/tom/fred"
BTW that gets me confused some have a " in front and others have '
like
"c:/tom/fred"
'c:/tom/fred'
I have done a search for this BUT not knowing what it is called came up
with nothing.
>
>
>
>2) Windows paths like this $path = "\\foo\\bar\\baz";
>
> should have been:
> Windows paths like this $path = "C:\\foo\\bar\\baz"
So if I'm going to use from the command prompt I would use the back
slash like above
Fine now I have had a telling off and a lesson on all of this my
original problem still is with me
The script does not work still.
If you missed my first post that I asked and James sent me the script to
do it here it is for you
########################################
Hi
First I'm new to perl
I have done a load of searches on the net to find out how to do this but
came up with nothing
What I have is this
1....I have a load of dat files in a folder called users this is in the
cgi folder like
c:\apache\apache2\cgi-bin\data\users\1234.dat 5678.dat etc
2.....Inside each of these dat files I have information like
password
email
FullName
Street Address
City
Country
Zip
Phone
3.....Now what I want to do is fetch the above info out of the dat files
and do one of two things
1......Put in a excel l file OR
2......Make a text/csv file with information all on one line with
it separated by a "," I then can import that into a excel my self
If you could give me some pointers on how to do this OR point me in the
right direction to where I could get some examples please
My Os is
Win XP Pro
Apache
Perl
Thank you
------------------------------
Date: Fri, 26 Nov 2004 16:54:16 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Dat files help "Att James"
Message-Id: <ytedneweeJaUOzrcRVn-gg@adelphia.com>
hope@hope.com wrote:
> On Fri, 26 Nov 2004 09:09:44 -0600, Tad McClellan <tadmc@augustmail.com>
> wrote:
>
>> 1) trim the quoted text to just enough to establish the context
>> for the comment that you are going to add.
>
> Ok now we are getting to different ideas again
> I have been told NOT to cut a post as other people who are going to read
> it cannot follow what the first post was all about and hence do not know
> what was going on.
Not different ideas, just two sides of the same coin. You shouldn't cut
so much out that it's hard to tell what you're replying to. On the other
paw, you *should* cut out the parts that aren't relevant to your reply.
It's not a black vs. white issue; it's about finding a happy medium,
which can take practice.
> Yes you are correct , It was set to 180 characters. NOW set to 72 is
> that ok for you?
Tad's not trying to be a dictator - he's just pointing out an old USENET
tradition that dates back to 80-column paper terminals, meaning that
it's older than a lot of the people who post here.
> Oh yes I agree BUT it was correct in the script and was me doing the
> silly typing
That's basically the reason why the group guidelines ask you to copy and
paste your script, rather than trying to retype it. Typos in the message
that aren't in the real script can be red herrings that interfere with
finding the real problem in the script.
>>But what I was referring to earlier was "malicious" code
>
> Hmmm so you are saying that there is people who are in here would send
> you that type stuff
Yep. It's a shame that some people have to be like that, but they are.
> BTW that gets me confused some have a " in front and others have '
> like
> "c:/tom/fred"
> 'c:/tom/fred'
The difference is variable interpolation. When you use double quotes,
variables and escape sequences inside the quotes are expanded. When you
use single quotes, they are not. So this code:
my $cat = 'tom';
print "$cat\n";
print '$cat', "\n";
Produces this output:
tom
$cat
The above is *very* simplified. Have a look in "perldoc perlop" for more
(much more) in the section titled "Quote and Quote-like Operators".
> Fine now I have had a telling off
I don't think Tad intended to tell you off. The group guidelines are
here for everyone's benefit, including yours. He's not trying to be mean
by pointing them out to you, he's trying to help.
> If you missed my first post
I replied to that, asking for clarification on some points - did your
news provider pick up the reply? If not, I'll repost it.
And thank you, by the way, for moving this from a.c.p.freelance and into
this group. Like Tad, I was intended to be helpful, not mean - you'll
get more and better answers when you ask the right group.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Fri, 26 Nov 2004 16:34:59 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Dat files help "Att James"
Message-Id: <slrncqfbsj.4cr.tadmc@magna.augustmail.com>
hope@hope.com <hope@hope.com> wrote:
> On Fri, 26 Nov 2004 09:09:44 -0600, Tad McClellan <tadmc@augustmail.com>
> wrote:
>
>>
>>[ Please learn the proper way to compose a followup very soon.
>
>> You have the interleaving part down, that's good. Now add:
>>
>> 1) trim the quoted text to just enough to establish the context
>> for the comment that you are going to add.
>
> Ok now we are getting to different ideas again
> I have been told NOT to cut a post as other people who are going to read
> it cannot follow what the first post was all about and hence do not know
> what was going on.
If you do the "just enough" thingy I mentioned, then they *will*
know what is going on.
> So what should I do one person says one thing and another says something
> different
Lurk for a while and take note of how the frequent-answerers do it.
Then do it that way.
>> 2) limit your line lengths to the conventional 70-72 characters.
>> (you can probably set your newsreader to handle this for you)
>
> Yes you are correct , It was set to 180 characters. NOW set to 72 is
> that ok for you?
Lookin' good!
> Hmmm so you are saying that there is people who are in here would send
> you that type stuff
What does "send" mean there?
If you mean would they post malicious code here? Maybe, but probably
not. Someone will surely spot it (so be sure to follow threads that
you take code from to see if any followups find problems in the code).
If you mean email you malicious code, then you betcha that's what
I'm talking about.
> BTW that gets me confused some have a " in front and others have '
> like
> "c:/tom/fred"
> 'c:/tom/fred'
>
> I have done a search for this BUT not knowing what it is called came up
> with nothing.
See the "Quote and Quote-like Operators" section in:
perldoc perlop
(you should read it (and several others) end-to-end as soon as possible.)
The short version of the difference is:
Double quotes give you two things above and beyond what single
quotes give you: backslash escapes and variable interpolation.
If you need one of those 2 things, use "double" quotes, if not
then use 'single' quotes.
> Fine now I have had a telling off and a lesson on all of this my
> original problem still is with me
You seem to display a good attitude, people are likely to keep
helping you until you "get it". Hang in there.
> The script does not work still.
^^^^^^^^^^^^^
Have you read the Posting Guidelines yet?
That is worthless information for us. It does not help us diagnose
the problem.
Tell us what you want it to do, and what it is doing instead.
> If you missed my first post that I asked and James sent me the script to
> do it here it is for you
> What I have is this
> 1....I have a load of dat files in a folder called users this is in the
> cgi folder like
> c:\apache\apache2\cgi-bin\data\users\1234.dat 5678.dat etc
my @dat_files = glob 'c:/apache/apache2/cgi-bin/data/users/*.dat';
> 2.....Inside each of these dat files
foreach my $fname ( @dat_files ) { # untested
print "found '$fname'\n"; # for debugging
open DAT, $fname or die "could not open '$fname' $!";
while ( <DAT> ) {
# do something with the line in the $_ variable
}
close DAT;
}
> I have information like
^^^^
We do not have enough information about the details of your data
to help you with actual code. You should have posted some sample data.
> 3.....Now what I want to do is fetch the above info out of the dat files
> and do one of two things
> 2......Make a text/csv file
> If you could give me some pointers on how to do this OR point me in the
> right direction to where I could get some examples please
The very first stop whenever you find your self wanting to
do "whatever" is to see if there is a module that already
does that "whatever".
If you can find one, you get all of that coding for free!
http://search.cpan.org/search?query=CSV
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 26 Nov 2004 17:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 4.20: How do I unescape a string?
Message-Id: <co7nk5$b0s$1@reader1.panix.com>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with Perl.
--------------------------------------------------------------------
4.20: How do I unescape a string?
It depends just what you mean by ``escape''. URL escapes are dealt with
in perlfaq9. Shell escapes with the backslash ("\") character are
removed with
s/\\(.)/$1/g;
This won't expand "\n" or "\t" or any other special escapes.
--------------------------------------------------------------------
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.
If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile. If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-2002 Tom Christiansen and Nathan
Torkington, and other contributors as noted. All rights
reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
------------------------------
Date: Fri, 26 Nov 2004 23:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 8.7: How do I clear the screen?
Message-Id: <co8cn5$hhd$1@reader1.panix.com>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with Perl.
--------------------------------------------------------------------
8.7: How do I clear the screen?
If you only have do so infrequently, use "system":
system("clear");
If you have to do this a lot, save the clear string so you can print it
100 times without calling a program 100 times:
$clear_string = `clear`;
print $clear_string;
If you're planning on doing other screen manipulations, like cursor
positions, etc, you might wish to use Term::Cap module:
use Term::Cap;
$terminal = Term::Cap->Tgetent( {OSPEED => 9600} );
$clear_string = $terminal->Tputs('cl');
--------------------------------------------------------------------
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.
If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile. If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-2002 Tom Christiansen and Nathan
Torkington, and other contributors as noted. All rights
reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
------------------------------
Date: Fri, 26 Nov 2004 11:09:20 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: for Richard Gration
Message-Id: <1101485444.477307@nntp.acecape.com>
"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
news:r4ecq0pe96gl50bq2akb5k13h5ledtcote@4ax.com...
> However notwithstanding the fact that I fully afree on your cmt about
> OE, the problem you had probably has nothing to do with it. That is
> how USENET is supposed to work. I'm afraid you'll have to live with
> it...
sorry to make this go on, am a little confused about what exeactly you mean
here. do you mean that not all posts make it out there? to every newserver?
daniel
------------------------------
Date: Fri, 26 Nov 2004 22:16:46 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: for Richard Gration
Message-Id: <g04fq0lsffchuitogvbmdnsm6dgf0opufo@4ax.com>
On Fri, 26 Nov 2004 11:09:20 -0500, "daniel kaplan"
<nospam@nospam.com> wrote:
>sorry to make this go on, am a little confused about what exeactly you mean
>here. do you mean that not all posts make it out there? to every newserver?
^^^^^
^^^^^
Yep! No guarantee in this sense...
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, 26 Nov 2004 16:34:10 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: for Richard Gration
Message-Id: <1101504936.340354@nntp.acecape.com>
"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
news:g04fq0lsffchuitogvbmdnsm6dgf0opufo@4ax.com...
> On Fri, 26 Nov 2004 11:09:20 -0500, "daniel kaplan"
do you mean that not all posts make it out there? to every newserver?
> ^^^^^
> ^^^^^
>
> Yep! No guarantee in this sense...
ok, if i may follow-up with one more question then? is there one newsserver
that is more relieable than the others? for instance, google? although i
would love one i can log into with OE...but beggers can't be chosers.
------------------------------
Date: Fri, 26 Nov 2004 16:23:16 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: IO object version 1.21 does not match bootstrap parameter 1.18
Message-Id: <oeydneTRQfdYAzrcRVn-qA@adelphia.com>
Eugene Borukhovich wrote:
> Yep the full boat perl Makefile.PL;make;make install. I dont have
> problems with the default modules that came with Perl, only the newly
> compiled ones - maybe should start using CPAN shell
The CPAN shell does the same thing.
>>>IO object version 1.21 does not match bootstrap parameter 1.18 at
>>>/usr/lib/perl5/5.8.3/i386-linux-thread-multi/DynaLoader.pm line 249.
>>
> So why is DynaLoader referenced?
DynaLoader is *reporting* the problem, not *causing* it.
Besides - the reported version numbers don't make sense for DynaLoader.
For 5.8.1, it's at 1.04, for 5.8.4 it's 1.05.
For 5.8.1, IO is at 1.20, with 5.8.4, IO is 1.21. That's more in line
with the version number's you're seeing above. (An interesting note is
that the older version you're seeing - 5.18 - predates the Perl version
you're using. That fact could be helpful in diagnosing the cause.)
So you have the latest IO.pm, which is reporting version 1.21, but when
DynaLoader tries to load IO.so, that reports version 1.18. This is a
fatal problem, so DynaLoader complains about it and dies.
Perl has separate directories for version-specific modules specifically
to prevent this sort of problem. The fact that it's happening usually
indicates either a module install gone very wrong, or a very badly
misconfigured perl.
The first problem listed is the one you need to diagnose and fix first -
the others are a result of the first. When IO fails to load, the module
that tried to use it (IO::Handle) fails. Then the module that tried to
use IO::Handle fails. And so on, until the main script fails at the end.
So the key to solving the problem is figuring out *why* your Perl is
loading the latest IO.pm, but an older IO.so.
That's why I asked about how it was installed - I've often seen folks
skip the final "make install" step and manually copy .pm files into
place. Naturally that results in the newer .pm trying to load the older .so.
Another common problem is issuing 'make install' when 'make' failed with
compilation errors. Since the .so failed to build, the only thing that
gets installed in that case is the newer .pm; the older .so is left in
place.
The *very* old IO.so that's being reported is interesting - it indicates
that libraries from a much older Perl are being found. That can happen
in any number of ways.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Fri, 26 Nov 2004 09:32:46 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: looking for a better regexp
Message-Id: <slrncqej4u.3rp.tadmc@magna.augustmail.com>
Leon <eon@hotmail.com> wrote:
> $line =~ s/[\t ]//g;
This will do the same thing, only faster:
$line =~ tr/\t //d;
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 26 Nov 2004 13:00:55 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: perl script
Message-Id: <slrncqevb7.45v.tadmc@magna.augustmail.com>
seema <seema_coma@yahoo.co.in> wrote:
> Subject: perl script
Please put the subject of your article in the Subject of your article.
> Is it possible to write a script in perl
> that searches functions in all the *.h
> files in the Linux box and write the output
> to a file.
Yes.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
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 7452
***************************************