[30398] in Perl-Users-Digest
Perl-Users Digest, Issue: 1641 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 14 03:09:46 2008
Date: Sat, 14 Jun 2008 00:09: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 Sat, 14 Jun 2008 Volume: 11 Number: 1641
Today's topics:
Checking if an object inherits from class T <koszalekopalek@interia.pl>
Deleting old files using stat <bill@ts1000.us>
Re: Deleting old files using stat <ben@morrow.me.uk>
Re: discover invisible characters <hjp-usenet2@hjp.at>
Re: How to close all started Internet Explorer from per <veatchla@yahoo.com>
Re: How to close all started Internet Explorer from per <jurgenex@hotmail.com>
Idle thought about bless <BLOCKSPAMfishfry@your-mailbox.com>
Re: Idle thought about bless <ben@morrow.me.uk>
Re: Learning Perl <elizabethbarnwell@gmail.com>
Re: Learning Perl <benkasminbullock@gmail.com>
Re: Learning Perl <elizabethbarnwell@gmail.com>
LWP::Simple getstore with absolute path not working <dksleung@hotmail.com>
new CPAN modules on Sat Jun 14 2008 (Randal Schwartz)
Re: Reading a line from a CVS file into an array. <bill@ts1000.us>
Re: Reading a line from a CVS file into an array. <ben@morrow.me.uk>
Re: Reading a line from a CVS file into an array. <hjp-usenet2@hjp.at>
Re: Time and again <hjp-usenet2@hjp.at>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 13 Jun 2008 22:45:55 -0700 (PDT)
From: Koszalek Opalek <koszalekopalek@interia.pl>
Subject: Checking if an object inherits from class T
Message-Id: <30dcdf9c-330a-4aff-a0dd-33318fc674d3@56g2000hsm.googlegroups.com>
I am using objects of class T and objects of
other classes that inherit from T. Somewhere
in my code I need to check if an object is of
class T or of any other class that inherits
from T.
The following
if( ref $obj eq 'T' )
(obviously) works only for objects of class T but
not for objects blessed to other classes that
inherit from T.
I have come up with two solutions:
1) add the following method to T:
sub isT {};
and then check
if ( $obj->can( 'isT' )
This works except that it is two times slower
that checking the ref (i.e. if (ref $obj eq 'T'. )
2) add a field isT to the object in the constructor
and than check
if ( $obj->{isT} )
This is as fast as checking the ref but it looks
ugly and duplicates the field across all objects.
Is there a more elegant way that would be as fast
as checking the ref?
Koszalek
------------------------------
Date: Fri, 13 Jun 2008 18:57:54 -0700 (PDT)
From: Bill H <bill@ts1000.us>
Subject: Deleting old files using stat
Message-Id: <58aef125-b1fe-4949-a87f-f9ef3a70ffa5@a1g2000hsb.googlegroups.com>
I am thinking of using the "atime" (last access time in seconds since
the epoch) value returned by stat($filename) to find files (session
ids created by my program) that have not been accessed in 24 hours and
delete them.
But before I do this I thought I would ask if there was a better way
than itterating over all the files in a folder (could be 1000's of
them if the site is busy) and running stat on each and determining if
24 hours has passed?
The other question I had, if I do end up doing this, I should be able
to determine if 24 hours has passed if I subtract the atime from time
to get the number of seconds passed since it was last accessed,
correct?
Bill H
------------------------------
Date: Sat, 14 Jun 2008 04:20:44 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Deleting old files using stat
Message-Id: <c1qbi5-8iv.ln1@osiris.mauzo.dyndns.org>
Quoth Bill H <bill@ts1000.us>:
> I am thinking of using the "atime" (last access time in seconds since
> the epoch) value returned by stat($filename) to find files (session
> ids created by my program) that have not been accessed in 24 hours and
> delete them.
>
> But before I do this I thought I would ask if there was a better way
> than itterating over all the files in a folder (could be 1000's of
> them if the site is busy) and running stat on each and determining if
> 24 hours has passed?
Nope. About the only other option would be running some daemon that used
FAM or some other change-notify system to keep track of which files were
opened, but that would almost certainly be more expensive.
> The other question I had, if I do end up doing this, I should be able
> to determine if 24 hours has passed if I subtract the atime from time
> to get the number of seconds passed since it was last accessed,
> correct?
The -A operator is provided for exactly this sort of job.
Ben
--
Although few may originate a policy, we are all able to judge it.
Pericles of Athens, c.430 B.C.
ben@morrow.me.uk
------------------------------
Date: Sat, 14 Jun 2008 08:01:10 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: discover invisible characters
Message-Id: <slrng56nl6.2gh.hjp-usenet2@hrunkner.hjp.at>
On 2008-06-10 20:29, Martijn Lievaart <m@rtij.nl.invlalid> wrote:
> On Tue, 10 Jun 2008 21:41:30 -0700, Ela wrote:
>> It's really weird.... I used vim to replace and it reported that
>> replacement did succeed...
>> Anyway, thanks a lot!!! It's most frustrated when you cannot see any
>> characters but the pattern matching keeps failing. Any editor works
>> better than vim in this case?
>
> Emacs can be set to highlight trailing spaces. I'm sure vim can do the
> same.
:set list
and
:set listchars=tab:»·,trail:·
looks a bit nicer than the default.
A feature that can occassionally get in your way if you are looking for
"hidden characters" is the automatic detection of line endings and
character encodings. If you load a file with a different line ending or
encoding it will usually look "normal", except for a briefly displayed
message in the status line.
hp
------------------------------
Date: Fri, 13 Jun 2008 21:50:58 -0500
From: l v <veatchla@yahoo.com>
Subject: Re: How to close all started Internet Explorer from perl scripts?
Message-Id: <JaednX2eOaaOr87VnZ2dnUVZ_o_inZ2d@supernews.com>
Pero wrote:
> How to close all started Internet Explorer from perl scripts?
>
> Tnx.
>
>
use Win32::Process::Info;
use Win32::Process;
--
Len
------------------------------
Date: Sat, 14 Jun 2008 03:09:54 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: How to close all started Internet Explorer from perl scripts?
Message-Id: <gdd6549o92oh8t5g43astpimuq5rc0sr9i@4ax.com>
dummy@phony.info wrote:
>On Fri, 13 Jun 2008 21:33:29 GMT, Jürgen Exner <jurgenex@hotmail.com>
>wrote:
>
>>dummy@phony.info wrote:
>>>On Thu, 12 Jun 2008 01:38:45 GMT, Jürgen Exner <jurgenex@hotmail.com>
>>>>Install the SFU kit (free from the MS website).
>>>>
>>>I tried, unsuccessfully, to find the download site for SFU. Went around
>I googled 'site: microsoft.com sfu download' no luck.
Well, maybe Google is not the answer to all questions.
www.microsoft.com => In the search box on the top right side enter "SFU"
=> second link is "Download details: Windows Services for UNIX Version
3.5"
jue
------------------------------
Date: Fri, 13 Jun 2008 19:48:03 -0700
From: fishfry <BLOCKSPAMfishfry@your-mailbox.com>
Subject: Idle thought about bless
Message-Id: <BLOCKSPAMfishfry-2E1483.19480313062008@comcast.dca.giganews.com>
perldoc -f bless says:
bless REF,CLASSNAME
...
This function tells the thingy referenced by REF that it is now
an object in the CLASSNAME package."
But that's not true! All bless does is associate an arbitrary string
with a variable; in such a way that the string can be recovered via ref.
The CLASSNAME does not even have to conform to the syntax of a valid
package name. The code
my $struct = {};
bless($struct, "text with embedded spaces");
works exactly like it should; yet that string is not a valid package
name.
In other words, objects are an application of bless, but bless really
has nothing to do with objects. It just maps a variable to a string.
I was wondering, has anyone ever found some clever use for bless, other
than for doing OO? It might be handy to put your variables into named
categories that don't correspond to packages, for example.
------------------------------
Date: Sat, 14 Jun 2008 04:27:27 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Idle thought about bless
Message-Id: <vdqbi5-8iv.ln1@osiris.mauzo.dyndns.org>
Quoth fishfry <BLOCKSPAMfishfry@your-mailbox.com>:
> perldoc -f bless says:
>
> bless REF,CLASSNAME
> ...
> This function tells the thingy referenced by REF that it is now
> an object in the CLASSNAME package."
>
> But that's not true! All bless does is associate an arbitrary string
> with a variable; in such a way that the string can be recovered via ref.
The *intended* use of bless is to construct objects. If the
implementation is flexible enough to allow other uses, that's just a
bonus. (This happens a lot in Perl :).)
> The CLASSNAME does not even have to conform to the syntax of a valid
> package name. The code
>
> my $struct = {};
> bless($struct, "text with embedded spaces");
>
> works exactly like it should; yet that string is not a valid package
> name.
It is, actually, it's just rather hard to create subs in that package.
> I was wondering, has anyone ever found some clever use for bless, other
> than for doing OO? It might be handy to put your variables into named
> categories that don't correspond to packages, for example.
See e.g. Text::Balanced.
Ben
--
'Deserve [death]? I daresay he did. Many live that deserve death. And some die
that deserve life. Can you give it to them? Then do not be too eager to deal
out death in judgement. For even the very wise cannot see all ends.'
ben@morrow.me.uk
------------------------------
Date: Fri, 13 Jun 2008 18:10:41 -0700 (PDT)
From: Elizabeth Barnwell <elizabethbarnwell@gmail.com>
Subject: Re: Learning Perl
Message-Id: <3594e2ed-f2b8-44e1-935e-0a0452504f9d@d1g2000hsg.googlegroups.com>
On Jun 13, 7:36 pm, Ben Bullock <benkasminbull...@gmail.com> wrote:
> On Fri, 13 Jun 2008 12:51:58 +0000, Uri Guttman wrote:
> > BB> The other problem is that the people who do know enough Perl seem
> to
> > BB> prefer writing incomprehensible gibberish ("Camel Books",
> "perldoc
> > BB> perlre", etc.) to writing something that normal people can
> understand.
>
> > and how much technical writing or editing have you done?
>
> About Perl, none, although I've done enough reading of Perl stuff to know
> how badly edited and badly written many of them are. A couple of years or
> more ago, I tried and failed to learn about Perl's references by reading
> the 3rd edition of the "Camel Book" and "perlreftut". I then went off and
> worked it out myself, basically by writing enough code, and by getting
> answers on this newsgroup from people like Tad McClellan and Peter
> Holzer, and looking at examples, and so on. Then, a few months ago, when
> I'd figured it out, I went back and read the "Camel Book" again, and
> found that I still couldn't make sense of it, even though I actually
> understood the use of Perl's references fairly well at that point.
>
> > >> there could be links to the docs, more info in each answer,
> > >> better grouping of questions, etc.
>
> > BB> Then they'd be completely inaccessible to beginners.
>
> > nope. you can do that very easily. links to the online docs at
> > perldoc.perl.org are trivial to make.
>
> I'm talking about whether it's readable or not, not the technical
> difficulty of doing it.
>
>
>
> > >> Syntax for looping through the values in a list
> > >> foreach $var @array {
> > >> }
>
> > >> that should be my $var.
>
> > BB> Why, though? Who's to say that $var isn't declared previously?
>
> > and then that would be a likely bug. foreach localizes its loop variable=
> > which would mask the my var. please learn perl before you critique a
> > critique of a tutorial
>
> > perl -le 'my $x =3D 1 ; for $x ( 1 .. 3 ) {print $x} print $x'
> > 1
> > 2
> > 3
> > 1
>
> If that's your point it's a good one, but that wasn't what you said above.=
>
>
>
> > >> Operators to add and remove items from the beginning of array
> > >> unshift(@array, new_item)
> > >> shift(@array)
>
> > >> what is new_item? unless that is a predeclared sub with a
> prototype it
> > >> is illegal. and it doesn't mention unshift takes a list.
>
> > BB> Oh, yes, that's right, people who are starting to learn something
> > BB> don't usually learn all the details at first.
>
> > but correct syntax is needed. or an explanation of what 'new_item' is.
>
> Why is correct syntax needed? Seriously - a lot of computer books use
> pseudo-code and italics to indicate something is not correct.
>
>
>
> > >> nor does it say
> > >> which function adds or removes (sure they are in the order
> mentioned in
> > >> the question but it should be pointed out. the same is true for the=
> > >> push/pop slide.
>
> > BB> Yes, if you don't add more and more details to the explanation, it=
> > BB> won't be confusing enough for a complete beginner, then they won't=
> > BB> feel frustrated, give up, and go and learn Python instead.
>
> > nope. they would be pissed at the teacher.
>
> I'll take back the above comment - re-reading it I agree with what you
> said above.
>
>
>
> > >> the slides always say operator for what most call functions. sure
> they
> > >> are operators in some sense (they don't always need parens) but it
> is
> > >> poor terminology to always say operator.
>
> > BB> Again, unless it's vitally important, tortured details like this
> don't
> > BB> really belong in explanations for beginners. People can learn the
> details
> > BB> once they've grasped the concepts more clearly.
>
> > nope. correct terminology makes it easier to understand and causes fewer=
> > problems later on.
>
> I'll take your word for it here, I'm not sure about this issue.
>
> > and you don't get teaching perl or programming languages. sure you start=
> > simple but the concept of alternate delims is a simple one.
>
> Is it? You're correct that I've never taught anybody Perl, but if I did
> I'd expect people to get confused if I just started babbling about
> alternate delimiters.
>
> > flash cards are a classic method to learn rote material. they rarely
> > require the need to think. as such they are used for tests covering
> > finite subject matter. perl is not a finite nor is even a small subset
> > that easy to rote learn.
>
> No-one has suggested that people try to learn Perl solely by looking at
> these cards, without writing any computer code. These cards are quiz
> questions for people who are learning, presumably learning by writing
> code.
>
> > programming is more about concepts than
> > details. again, you haven't done any training nor writing if you think
> > rote learning is a gohttp://library.thinkquest.org/16728/content/cgi/
>
> cplusplus.htmlod way to teach perl.
>
> Who has suggested that rote learning is a good way to teach Perl? Nobody.
>
>
>
>
>
> > >> What is the syntax for a list literal
> > >> ( value1, value2, ....)
>
> > >> huh? that is a list. literals are possible values in the list.
>
> > >> What is the effect of using negative number for an array index
> > >> it starts counting from the end of the array backwards
>
> > >> that is from the department of redundant answers department.
>
> > BB> Sorry, but I don't see why it is redundant. That seems like a
> useful
> > BB> piece of knowledge to me. C programmers who used a negative
> number in an
> > BB> array index would expect to get a crash and a "segmentation
> fault" error,
> > BB> so why is it redundant to point out that Perl is different from C
> here?
>
> > hmm, what other direction can you count from the end ot the array?
>
> I disagree. If it actually said "it starts counting from the end of the
> array" without the "backwards", that actually would be confusing for the
> beginner. A lot of people would imagine that it is going forwards - which
> is actually quite possible given that Perl doesn't declare array sizes.
>
> > 50 questions and answers and 1 typo. maybe 3 pages of text. if i saw a
> > book with such a ratio i would puke. i have tech edited 4 perl books and=
> > none had such a ratio of typos.
>
> Nonsense. I've edited stuff written by native speakers of English which
> had many more typos. About nine months ago I was working with a guy who
> used to brag what a great writer of English he was, and yet he even made
> mistakes in things like "it's" and "its". I recently read a John Grisham
> novel which had a spelling mistake on nearly every page.
>
> When we get into computer programming, in which it's not intuitively
> obvious to most people when there is an error, I'm pretty sure that we
> can expect many more small errors. Somewhere on the web there is a list
> of errata for Donald Knuth's books "The Art of Computer Programming". You
> might know Knuth as "the guy who takes an incredible amount of care over
> his books", so much so that he even created a computer typesetting system
> for them, and it might be instructive to have a gander at the list of
> errors that slipped through into his books before one starts proclaiming
> about how error-free most tech books are compared to these flashcards.
>
> > poor writing and little editing is
> > obvious here.
>
> There are some problems with the cards - let's see whether they get fixed
> or not.
>
> > and when you declare my @array or %hash, what does it contain initially?=
> > arrays and hashes are variables too. and should be covered as much if
> > not more than scalars
>
> But the beginner starts off with $x =3D "Hallo World".
>
>
>
> > BB> There are ways to phrase things so that they are easy to
> understand and
> > BB> also not incorrect.
>
> > >> Comparison operator for numbers
> > >> =3D=3D
>
> > >> hmm, i wonder what >, <, >=3D and <=3D have to say about that?
> > >> s/Comparison/Equality/
>
> > BB> As far as I know, the comparison operator for numbers is <=3D>.
>
> > so you think the q/a is wrong too!
>
> Yes, certainly - the comparison operator is <=3D>, so if the question says=
> "what is the comparison operator?" I would say "<=3D>" and then I'd be
> annoyed if it said "=3D=3D" was the correct answer.
>
> > >> How are all numbers stored interally by Perl
> > >> double-precision floating-point values
>
> > >> hmm, i wonder what IV's have to say about that?
>
> > BB> The question is a bit weird, I don't know how numbers are stored
> > BB> internally by Perl.
>
> > then why is it being asked? and why would you think it is important or
> > not? why did you comment?
>
> To correctly answer the question of how Perl's numbers are stored would
> involve a knowledge of Perl's internals which I wouldn't expect a
> beginner to have - thus the question is a bit weird. I don't know how the
> numbers are stored either - is it a C struct or a union or something
> else? I don't know the answer & I wouldn't expect beginners to either.
>
> > a few? this was 50 questions. i found 15+ mistakes or bad wording. that
> > is an awfully high ratio.
>
> It's good to work on improving the mistakes in this kind of tutorial, but
> a lot of the corrections you suggest involve cramming more information
> into the tutorial. If it's intended for complete beginners, I doubt that
> is going to work.
>
> > >> simple questions like these is not the
> > >> way to learn programming in any language.
>
> > BB> Hmm, I have no idea, but since there are millions of people out
> there,
> > BB> who knows, perhaps it is usefuhttp://library.thinkquest.org/16728/=
>
> content/cgi/cplusplus.htmll for someone. I don't think it's
> harmful.
>
>
>
> > you haven't seen enough bad perl tutorials.
>
> I've seen plenty of nearly incomprehensible Perl tutorials. I'd rather
> learn from a tutorial with errors than one I can't understand. To take an
> example from C++, since I know C++ better than Perl, here is a totally
> bogus tutorial on how to write a C++ CGI program:
>
> http://library.thinkquest.org/16728/content/cgi/cplusplus.html
>
> The code there doesn't even compile, and it contains a lot of stupid
> errors. However, I could understand it, so despite the errors it was
> enough for me to work out the basics of how to make a C++ CGI...
>
> read more =BB
Hi Everyone,
I think the key here that I've failed to communicate is that YoYoBrain
is a tool to learn information to help you work more efficiently. The
flashcards that I provided are an example of how to use the tool,
albeit I've come to understand from your feedback, a bad one. I should
have sent a link to a completely generic set of flashcards to get the
point across. These are an example of one person's learning materials-
they are not published in any way and do not aim to be definitive. If
you look at my original post, I was hoping that you would see how
YoYoBrain works, the advantages of using the Learning Wizard to be
drilled on information you want to get a better handle on, give some
feedback on the site as a tool for learning information, and maybe
even find it helpful to use the site for your own learning endeavors-
if that's your style. This is the "style" that I'm talking about, the
learning style of working with flashcards. Our developers have found
it useful, and I wanted to share it with you. Again, eventually, the
goal is to make a community piece that allows people to build
information and learning material together so people with your insight
can help people. Did not mean to offend anyone...
If anyone's interested, I will let you know when we have correction/
comment/editing features up and running.
Best,
Elizabeth
------------------------------
Date: Sat, 14 Jun 2008 01:52:14 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: Learning Perl
Message-Id: <g2v88e$rsg$2@ml.accsnet.ne.jp>
On Fri, 13 Jun 2008 18:10:41 -0700, Elizabeth Barnwell wrote:
> I think the key here that I've failed to communicate is that YoYoBrain
> is a tool to learn information to help you work more efficiently.
But this is a newsgroup about Perl.
> The flashcards that I provided are an example of how to use the tool,
> albeit I've come to understand from your feedback, a bad one.
So it was just spam for your flashcard program.
> I should
> have sent a link to a completely generic set of flashcards to get the
> point across.
No, you should not do that - this newsgroup is only about Perl.
> These are an example of one person's learning materials-
> they are not published in any way and do not aim to be definitive.
Yes, they are - they are published on the WWW, which is a kind of vanity
publishing, but it is publishing.
> If
> you look at my original post, I was hoping that you would see how
> YoYoBrain works, the advantages of using the Learning Wizard to be
> drilled on information you want to get a better handle on, give some
> feedback on the site as a tool for learning information, and maybe
> even find it helpful to use the site for your own learning endeavors-
> if that's your style.
It is not appropriate to post an advertisement for your system here
though.
> This is the "style" that I'm talking about, the
> learning style of working with flashcards. Our developers have found
> it useful, and I wanted to share it with you.
In case you have not noticed, there are many people who want to share
information with us on the internet, such as how to make some parts of
your body larger, or how to get $$$, etc. Because there are so many of
these people, the phenomenon of sharing unsolicitied information to
people at large has now acquired a name, "spam", and it's something that
many people object to.
> Again, eventually, the
> goal is to make a community piece that allows people to build
> information and learning material together so people with your insight
> can help people. Did not mean to offend anyone...
>
> If anyone's interested, I will let you know when we have correction/
> comment/editing features up and running.
If you're not the author of the Perl cards, I recommend that you don't.
------------------------------
Date: Fri, 13 Jun 2008 19:23:25 -0700 (PDT)
From: Elizabeth Barnwell <elizabethbarnwell@gmail.com>
Subject: Re: Learning Perl
Message-Id: <0ac93957-f491-442f-ba40-37bd3427aaeb@p25g2000hsf.googlegroups.com>
Ahhh, this is not meant to be spam. This is meant to be a resource to
help people, and I regret that it hasn't been received that way. If
you would like to make changes to the cards here you go,
http://www.yoyobrain.com/learner_subjects/accept/1458
Take care,
Elizabeth
------------------------------
Date: Fri, 13 Jun 2008 21:15:46 -0700 (PDT)
From: emrefan <dksleung@hotmail.com>
Subject: LWP::Simple getstore with absolute path not working
Message-Id: <51e261e6-7956-48a6-bd8c-7091311b5a46@g16g2000pri.googlegroups.com>
I am using the following line of sort in a batch file to fetch things
off the network quickly and mostly I have success but if I need to
indicate an absolute path in the URL, I always get a "not found"
error. I have perl 5.8.x, URI.pm 1.36 and URI::URL.pm 5.03 on the XP
system
where did the test. Help!
perl -MLWP::Simple -e "getstore( '%1', '%2' );"
Oh, the exact URL that I tested it was something like this:
ftp://user:password@some.computer.some.where//dir-under-the-root/some-dir/some-file
I thought the "//" before "dir-under-the-root" should have it working
for me, but no.
------------------------------
Date: Sat, 14 Jun 2008 04:42:20 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Jun 14 2008
Message-Id: <K2FrqK.2295@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.
Algorithm-Search-0.03
http://search.cpan.org/~arthur/Algorithm-Search-0.03/
Module for traversing an object.
----
Apache2-ASP-1.51
http://search.cpan.org/~johnd/Apache2-ASP-1.51/
Perl extension for ASP on mod_perl2.
----
Bundle-Thread-1.09
http://search.cpan.org/~jdhedden/Bundle-Thread-1.09/
A bundle of modules for supporting threads in Perl
----
CPU-Emulator-Z80-1.0
http://search.cpan.org/~dcantrell/CPU-Emulator-Z80-1.0/
a Z80 emulator
----
CPU-Z80-Assembler-1.0
http://search.cpan.org/~dcantrell/CPU-Z80-Assembler-1.0/
a Z80 assembler
----
CatalystX-CRUD-View-Excel-0.05
http://search.cpan.org/~karman/CatalystX-CRUD-View-Excel-0.05/
view CRUD search/list results in Excel format
----
Class-MOP-0.61
http://search.cpan.org/~stevan/Class-MOP-0.61/
A Meta Object Protocol for Perl 5
----
ClearPress-165
http://search.cpan.org/~rpettett/ClearPress-165/
Simple, fresh & fruity MVC framework
----
Convert-UUlib-1.10
http://search.cpan.org/~mlehmann/Convert-UUlib-1.10/
Perl interface to the uulib library (a.k.a. uudeview/uuenview).
----
Convert-UUlib-1.11
http://search.cpan.org/~mlehmann/Convert-UUlib-1.11/
Perl interface to the uulib library (a.k.a. uudeview/uuenview).
----
Data-Cloud-0.02
http://search.cpan.org/~nyarla/Data-Cloud-0.02/
Utility for word cloud.
----
Devel-StackTrace-1.19
http://search.cpan.org/~drolsky/Devel-StackTrace-1.19/
Stack trace and stack trace frame objects
----
Devel-StackTrace-1.1901
http://search.cpan.org/~drolsky/Devel-StackTrace-1.1901/
Stack trace and stack trace frame objects
----
Email-Public-0.05
http://search.cpan.org/~jeteve/Email-Public-0.05/
Quickly find if an email address is from a public email provider
----
Enbugger-2.003
http://search.cpan.org/~jjore/Enbugger-2.003/
Enables the debugger at runtime.
----
Graphics-GnuplotIF-Shortcut-0.01
http://search.cpan.org/~borisz/Graphics-GnuplotIF-Shortcut-0.01/
Alternate interface to Graphics::GnuplotIF
----
Language-Befunge-Debugger-0.3.5
http://search.cpan.org/~jquelin/Language-Befunge-Debugger-0.3.5/
a graphical debugger for Language::Befunge
----
Language-Lisp-ECLs-0.26
http://search.cpan.org/~vkon/Language-Lisp-ECLs-0.26/
Perl extension for ECL lisp
----
List-Enumerator-0.03
http://search.cpan.org/~satoh/List-Enumerator-0.03/
list construct library
----
Module-Versions-Report-1.05
http://search.cpan.org/~jesse/Module-Versions-Report-1.05/
report versions of all modules in memory
----
Muldis-D-0.34.0
http://search.cpan.org/~duncand/Muldis-D-0.34.0/
Formal spec of Muldis D relational DBMS lang
----
Net-Abuse-Utils-0.08
http://search.cpan.org/~mikegrb/Net-Abuse-Utils-0.08/
Routines useful for processing network abuse
----
Object-InsideOut-3.42
http://search.cpan.org/~jdhedden/Object-InsideOut-3.42/
Comprehensive inside-out object support module
----
Object-eBay-0.1.0
http://search.cpan.org/~mndrix/Object-eBay-0.1.0/
Object-oriented interface to the eBay API
----
POE-Component-CPAN-Reporter-0.01_06
http://search.cpan.org/~bingos/POE-Component-CPAN-Reporter-0.01_06/
Bringing the power of POE to CPAN smoke testing.
----
POE-Component-Supervisor-0.03
http://search.cpan.org/~nuffin/POE-Component-Supervisor-0.03/
Erlang inspired babysitting
----
Parallel-Performing-0.01
http://search.cpan.org/~pearl/Parallel-Performing-0.01/
Perl extension for the safe performance of the tasks in the queue.
----
Parse-Stallion-0.02
http://search.cpan.org/~arthur/Parse-Stallion-0.02/
Perl backtracking parser and resultant tree evaluator
----
Pretty-0.2
http://search.cpan.org/~leiguang/Pretty-0.2/
modules to print something pretty.
----
RPC-JSON-0.13
http://search.cpan.org/~jshirley/RPC-JSON-0.13/
JSON-RPC Client Library
----
Rose-DBx-Garden-Catalyst-0.09_01
http://search.cpan.org/~karman/Rose-DBx-Garden-Catalyst-0.09_01/
plant Roses in your Catalyst garden
----
Rose-DBx-Object-Renderer-0.11
http://search.cpan.org/~danny/Rose-DBx-Object-Renderer-0.11/
Web UI Rendering for Rose::DB::Object
----
SOAP-Lite-0.710.07
http://search.cpan.org/~mkutter/SOAP-Lite-0.710.07/
Perl's Web Services Toolkit
----
Socket-GetAddrInfo-0.10
http://search.cpan.org/~pevans/Socket-GetAddrInfo-0.10/
RFC 2553's getaddrinfo and getnameinfo functions.
----
Thread-Queue-2.11
http://search.cpan.org/~jdhedden/Thread-Queue-2.11/
Thread-safe queues
----
Thread-Semaphore-2.09
http://search.cpan.org/~jdhedden/Thread-Semaphore-2.09/
Thread-safe semaphores
----
URI-SmartURI-0.023
http://search.cpan.org/~rkitover/URI-SmartURI-0.023/
URIs with extra sugar
----
W3C-XHTML-HTMLCompatChecker-0.10
http://search.cpan.org/~oliviert/W3C-XHTML-HTMLCompatChecker-0.10/
The W3C XHTML/HTML Compatibility Checker
----
Win32-Console-0.09
http://search.cpan.org/~jdb/Win32-Console-0.09/
Win32 Console and Character Mode Functions
----
Win32-FileSecurity-1.06
http://search.cpan.org/~jdb/Win32-FileSecurity-1.06/
Manage FileSecurity Discretionary Access Control Lists in Perl
----
Win32-Internet-0.084
http://search.cpan.org/~jdb/Win32-Internet-0.084/
Access to WININET.DLL functions
----
Win32-Job-0.03
http://search.cpan.org/~jdb/Win32-Job-0.03/
Run sub-processes in a "job" environment
----
Win32-NetResource-0.055
http://search.cpan.org/~jdb/Win32-NetResource-0.055/
Manage network resources in Perl
----
Win32-ODBC-0.034
http://search.cpan.org/~jdb/Win32-ODBC-0.034/
ODBC Extension for Win32
----
Win32-Pipe-0.024
http://search.cpan.org/~jdb/Win32-Pipe-0.024/
Win32 Named Pipe
----
Win32-Process-0.13
http://search.cpan.org/~jdb/Win32-Process-0.13/
Create and manipulate processes.
----
Win32-Registry-0.09
http://search.cpan.org/~jdb/Win32-Registry-0.09/
accessing the Windows registry [obsolete, use Win32::TieRegistry]
----
Win32-Shortcut-0.07
http://search.cpan.org/~jdb/Win32-Shortcut-0.07/
Perl Module to deal with Windows Shortcuts
----
Win32-Sound-0.49
http://search.cpan.org/~jdb/Win32-Sound-0.49/
An extension to play with Windows sounds
----
Win32-WinError-0.03
http://search.cpan.org/~jdb/Win32-WinError-0.03/
----
go-perl-0.09
http://search.cpan.org/~cmungall/go-perl-0.09/
----
iTunes-Sid-0.02_01
http://search.cpan.org/~billh/iTunes-Sid-0.02_01/
----
threads-1.71
http://search.cpan.org/~jdhedden/threads-1.71/
Perl interpreter-based threads
----
threads-shared-1.22
http://search.cpan.org/~jdhedden/threads-shared-1.22/
Perl extension for sharing data structures between threads
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: Fri, 13 Jun 2008 19:01:12 -0700 (PDT)
From: Bill H <bill@ts1000.us>
Subject: Re: Reading a line from a CVS file into an array.
Message-Id: <be4a4e19-b05b-4f83-8af8-6c1885d49947@t54g2000hsg.googlegroups.com>
On Jun 12, 2:34=A0pm, coffeevictim <co...@yoursupport.biz> wrote:
> Hi,
>
> I have the fairly simply task of manipulating a CSV file containing
> marketing data (name, address, business description etc.) so it can be
> imported into a CRM system.
>
> The problem is that some of the text fields also contain commas so I
> am a bit stumped as to how to construct a command that will accurately
> split the line at the actual separators. The text containing commas
> that are not separators is quoted so Excel does not have a problem
> understanding it but I can not think how to get my script to ignore
> the ones in quotes.
>
> My standard attempt to split the line looks like...
>
> @LEAD =3D split (/\,/, $SOURCELINE);
>
> but this of course treats any comma as a separator and so the result
> is unpredictable.
>
> A sample of the source data follows.
>
> Sort Id,Company Name,Address 1,Address 2,City,Description
> 5,Aploda,"C/ San Romualdo, 43, 5=BA planta",Local A4,Madrid,=94Some text,
> maybe.=94
> 27,Degna Solutions,"Mallorca, 182, Principal 2a",,Barcelona,=94Some more
> text, probably.=94
>
> Any help would be greatly appreciated.
>
> coffeevictim
If you dont have to do this alot the fastest way is to load the csv
file into excel and save it as a tab delimited. That way you dont
worry about embedded commas and split your line on \t instead of ,. If
you are doing it reguraly then the advice given by the others is best.
Bill H
------------------------------
Date: Sat, 14 Jun 2008 04:23:06 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Reading a line from a CVS file into an array.
Message-Id: <q5qbi5-8iv.ln1@osiris.mauzo.dyndns.org>
Quoth Bill H <bill@ts1000.us>:
>
[CSV files]
>
> If you dont have to do this alot the fastest way is to load the csv
> file into excel and save it as a tab delimited. That way you dont
> worry about embedded commas and split your line on \t instead of ,. If
> you are doing it reguraly then the advice given by the others is best.
This is bad advice. Tab-delimited still suffers from exactly the same
problem as comma-delimited: what if the values contain embedded tabs or
newlines? The best (easiest, fastest, safest) way of loading
tab-delimited data is still Text::CSV_XS.
Ben
--
Musica Dei donum optimi, trahit homines, trahit deos. |
Musica truces mollit animos, tristesque mentes erigit. | ben@morrow.me.uk
Musica vel ipsas arbores et horridas movet feras. |
------------------------------
Date: Sat, 14 Jun 2008 08:50:42 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Reading a line from a CVS file into an array.
Message-Id: <slrng56qi3.2gh.hjp-usenet2@hrunkner.hjp.at>
On 2008-06-12 19:51, Dan Rumney <danrumney@warpmail.net> wrote:
> coffeevictim wrote:
>> CSV. My mistake.
>>
>> Since I wish to execute the script at the Windows command line and
>> make it as portable as possible, I was hoping to to use just perl.exe.
>
> Run perl -h
>
> You'll see that there is a parameter:
>
> -M
>
> Which allows you to pull in Modules via the command line
Karlheinz Zöchling recently presented a module which basically does the
same as -a for CSV files. It doesn't seem to be on CPAN (yet), but you
can reach him via http://ibeatgarry.com/
hp
------------------------------
Date: Sat, 14 Jun 2008 08:40:34 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Time and again
Message-Id: <slrng56pv3.2gh.hjp-usenet2@hrunkner.hjp.at>
On 2008-06-10 21:22, Jürgen Exner <jurgenex@hotmail.com> wrote:
> "Peter J. Holzer" <hjp-usenet2@hjp.at> wrote:
>>On 2008-06-10 11:30, Jürgen Exner <jurgenex@hotmail.com> wrote:
>>> markdibley <markdibley@gmail.com> wrote:
>>>>I write that to a file and later I read it in
>>>
>>> Why are you dumping the data into a file and then reading it back in?
>>
>>That's what files are for. Why would you write something into a file if
>>you didn't plan to read it at some time?
>
> Well, why would you write something to a file and then read it back into
> the program if you already have the information in the program to begin
> with?
Because you usually don't have it already in this process. Either
because it was written by a different process (that's the common case
for files - one process writes it, some other process reads it - maybe
only milliseconds later, maybe years later), or because your data
doesn't fit into memory all at once.
> It all depends on what the OP meant with "later".
Is there some reason why you would think that the most stupid
possibility is the most likely?
> I have seen code like
>
> system ("myprog > temp.txt");
> open (TMP, '<', 'temp.txt');
> @result = <TMP>;
>
> Here the programmer writes information to a file and later reads it back
> into the program, but unless there are very special circumstances
> probably nobody would call this good code.
However, the problem "how do I print a timestamp so that I can parse it
again" does not become easier if you replace the above code with
open(my $fh, '-|', 'myprog');
@result = <$fh>;
close($fh);
in both cases 'myprog' needs to write the timestamps in a defined
format, and your script needs to know how to parse that. Whether the
data between the two processes is exchanged via a temporary file or a
pipe (or a socket, or shared memory, or ...) is irrelevant to the
question.
A case where it was relevant would be something like this:
my $now = time();
print $fh localtime($now), "\n";
seek($fh, 0, 0);
$line = <$fh>;
$now = parse($line);
That's clearly stupid, but there is no reason to assume the OP would be
doing that, even if he wrote exactly that code into his demo script.
Because a demo script is there to illustrate the problem in the shortest
possible manner.
> The OP already clarified that this is not what he was doing but that he
> was dealing with log files. But that detail was missing in the original
> post.
It was probably missing because the way he intended to use the file
(some process writes a file, some other process reads it) is the most
common case by far. Why should he mention that he wasn't going to do
something unlikely and stupid? Especially if that is completely
unrelated to the question?
hp
------------------------------
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 1641
***************************************