[25105] in Perl-Users-Digest
Perl-Users Digest, Issue: 7355 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 3 14:05:50 2004
Date: Wed, 3 Nov 2004 11: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 Wed, 3 Nov 2004 Volume: 10 Number: 7355
Today's topics:
Best way to handle using a report template for non-prog <john_pataki@yahoo.com>
Re: Best way to handle using a report template for non- <john_pataki@yahoo.com>
Re: Best way to handle using a report template for non- <tadmc@augustmail.com>
Re: Check POP3 E-mail <1usa@llenroc.ude.invalid>
Re: Check POP3 E-mail <1usa@llenroc.ude.invalid>
FAQ 7.7: Why do Perl operators have different precedenc <comdog@panix.com>
Re: Indexing word documents with perl? <usenet_05_08_2004@stuartmoore.org.uk>
Re: Jumping to machine code <john@mailinator.com>
Re: Jumping to machine code <rwxr-xr-x@gmx.de>
Looking for C++ macro processing solution <newspost@coppit.org>
Re: Looking for C++ macro processing solution <bernard.el-haginDODGE_THIS@lido-tech.net>
Re: Newbie HTTP::Request->new(POST => URL); question <nobull@mail.com>
Re: number of characters in a string (Xevo)
Re: Partly OT: name suggestion <bik.mido@tiscalinet.it>
Re: Perl CGI project ideas <bik.mido@tiscalinet.it>
Re: Perl CGI project ideas <1usa@llenroc.ude.invalid>
Re: Perl CGI project ideas <peter@semantico.com>
Re: Perl CGI project ideas <spamtrap@dot-app.org>
Re: perl self generating program <tadmc@augustmail.com>
Re: Q: re Inline and Benchmark <bik.mido@tiscalinet.it>
Re: Q: re Inline and Benchmark <bik.mido@tiscalinet.it>
Rlogin client? <jll@soundobjectlogic.com>
The most perfect beginning (wana)
Re: The most perfect beginning <1usa@llenroc.ude.invalid>
Re: The most perfect beginning <todd@tdegruyl.com>
Re: The most perfect beginning <tadmc@augustmail.com>
Re: Win32 Advanced Properties <dontwannasay@home.com>
Re: Win32 Advanced Properties <1usa@llenroc.ude.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 3 Nov 2004 05:01:01 -0800
From: "Johnny Google" <john_pataki@yahoo.com>
Subject: Best way to handle using a report template for non-programmers..
Message-Id: <1099486861.769365.57030@z14g2000cwz.googlegroups.com>
I would like to create a report template and I am considering using one
of the modules already created to do this... I've been browsing through
the docs on CPAN and I see a few with different advantages. Here is my
specific case:
1) I don't really need the embedded portions to be actual perl because
I would rather it be more readable to someone who does not know perl.
2) I need to be able to handle looping (i.e. a parts list for an
assembly)
3) I need to be able to specifiy exact column position formatting ...
meaning I want to start info on at an exact position on a particular
line even after a variable on that same line has been resolved ...
For example:
012345678901234567890123456789012345678901234567890123456789
[DATE] [ENGINEER] [ASSEMBLY NAME]
I need [ASSEMBLY NAME] to start at the same position no matter
what the length of ENGINEER resolves to.
If I were to code this in perl -- I would just ust formatted printing
... but I want to make this format changeable by a non-programmer - and
have it living in a template file. I have only browsed the TEXT
TEMPLATE/MAGIC modules at this point but it looks to me that the
formatting would not handle starting a variable at a certain position
down-the-line from a previously resolved variable.
Any hints?
Thanks,
John
------------------------------
Date: 3 Nov 2004 05:17:48 -0800
From: "Johnny Google" <john_pataki@yahoo.com>
Subject: Re: Best way to handle using a report template for non-programmers..
Message-Id: <1099487868.225000.128430@c13g2000cwb.googlegroups.com>
Another note: when I use formatted printing in my code .. I use printf,
sprintf, %this and %that, etc.
I have never used the bult-in perl FORMAT mechanism .... so perhaps
this could be included as something I should compare to using a module?
Not sure.... will it handle looping? Thanks for sharing any hints...
------------------------------
Date: Wed, 3 Nov 2004 09:20:51 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Best way to handle using a report template for non-programmers..
Message-Id: <slrncohtqj.64m.tadmc@magna.augustmail.com>
Johnny Google <john_pataki@yahoo.com> wrote:
> I have never used the bult-in perl FORMAT mechanism
You won't be missing much if you keep it that way.
There are modules that are almost always better than formats anyway.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 3 Nov 2004 12:09:29 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Check POP3 E-mail
Message-Id: <Xns959648CF2E86asu1cornelledu@132.236.56.8>
krakle@visto.com (krakle) wrote in
news:237aaff8.0411022258.4b37ab88@posting.google.com:
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
> news:<Xns9595BC995A87asu1cornelledu@132.236.56.8>...
...
>> There is no need to explictly initialize my variables.
>
> How about for resetting purposes in mod_perl?
Care to show what you mean by giving us some code?
Please note that I have a pretty good idea what you might be referring to,
but it is your job to actually _make_ an argument (using code, since this
is a programming newsgroup) for the point you are trying to make.
Sinan
------------------------------
Date: 3 Nov 2004 12:12:11 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Check POP3 E-mail
Message-Id: <Xns959649442E0F3asu1cornelledu@132.236.56.8>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in
news:Xns9595BC995A87asu1cornelledu@132.236.56.8:
> if( $h =~ /^Subject:\s+Congratulation/ ) {
> print print "$h\n", join "\n", $pop->Body( $i );
Hmmmm ... clearly, the second 'print' should not be there. Arrrgh!
Sinan,
------------------------------
Date: Wed, 3 Nov 2004 17:03:07 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 7.7: Why do Perl operators have different precedence than C operators?
Message-Id: <cmb30b$lbk$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.
--------------------------------------------------------------------
7.7: Why do Perl operators have different precedence than C operators?
Actually, they don't. All C operators that Perl copies have the same
precedence in Perl as they do in C. The problem is with operators that C
doesn't have, especially functions that give a list context to
everything on their right, eg. print, chmod, exec, and so on. Such
functions are called "list operators" and appear as such in the
precedence table in perlop.
A common mistake is to write:
unlink $file || die "snafu";
This gets interpreted as:
unlink ($file || die "snafu");
To avoid this problem, either put in extra parentheses or use the super
low precedence "or" operator:
(unlink $file) || die "snafu";
unlink $file or die "snafu";
The "English" operators ("and", "or", "xor", and "not") deliberately
have precedence lower than that of list operators for just such
situations as the one above.
Another operator with surprising precedence is exponentiation. It binds
more tightly even than unary minus, making "-2**2" product a negative
not a positive four. It is also right-associating, meaning that
"2**3**2" is two raised to the ninth power, not eight squared.
Although it has the same precedence as in C, Perl's "?:" operator
produces an lvalue. This assigns $x to either $a or $b, depending on the
trueness of $maybe:
($maybe ? $a : $b) = $x;
--------------------------------------------------------------------
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: Wed, 03 Nov 2004 11:58:47 +0000
From: Stuart Moore <usenet_05_08_2004@stuartmoore.org.uk>
Subject: Re: Indexing word documents with perl?
Message-Id: <cmah5c$q3t$1@gemini.csx.cam.ac.uk>
Elhanan Maayan wrote:
> hi..
>
> is there a way (or a tutorial/article) that describes methods for perl
> to index word that more or less have the same structure(resume
> documents),
>
> each word documents should have a subject,description,author keywords
> that would be extracted and inserted into it's properties fields by
> perl.
Assuming you mean Microsoft Word, then Win32::OLE might be the way to go.
You might find it easier to do it as a Word macro.
------------------------------
Date: Wed, 03 Nov 2004 05:12:10 -0600
From: John <john@mailinator.com>
Subject: Re: Jumping to machine code
Message-Id: <S63id.11$PI2.1@fe25.usenetserver.com>
Derek Fountain wrote:
> Andrew Bryson wrote:
>
>>Have you considered putting the machine code into a .com file and just
>>running it with system() ?
>
>
> Yes, but the application doesn't easily allow disk access, plus I need
> speed. Is that all a .com file is - no headers or other confusing stuff I
> would need to generate?
First, there is no such thing as "cross platform machine code."
Second, a Perl script must do an awful lot of disk access to get
started, so what's the problem?
Third, if you are so concerned about speed, WTF are you doing running it
from within Perl?
Fourth, this sounds like an attempt at injecting a virus in Perl code.
Could you please tell us what this marvelous piece of machine code is
going to do, and given that Perl is SOOO slow compared to machine code,
what benefit you think you're going to get from this approach?
------------------------------
Date: 3 Nov 2004 17:46:13 GMT
From: Lukas Mai <rwxr-xr-x@gmx.de>
Subject: Re: Jumping to machine code
Message-Id: <cmb5h5$not$1@wsc10.lrz-muenchen.de>
Derek Fountain schrob:
> I have a string in my Perl which contains the machine code for a short
> program I want to run. I want Perl to jump to it. It's the last thing my
> script will do, so I don't care about returning safely, etc. Ideally the
> Perl will just exit neatly, but I really don't mind. I just need that
> machine code to execute. I'm on Win32, but a cross platform method would be
> good.
> How can I do that?
You could use Inline::ASM or Inline::C with something like:
void execute(char *code) {
((void (*)(void))code)();
}
HTH, Lukas
--
print+74.117.115.116,,qq.\c!..not::.her,Perl=>q$hacker,$,!($,=$")
------------------------------
Date: 03 Nov 2004 09:46:25 EST
From: David Coppit <newspost@coppit.org>
Subject: Looking for C++ macro processing solution
Message-Id: <Pine.BSF.4.61.0411030944460.95454@www.provisio.net>
Hi all,
I'm looking for a macro processor for C++ code. I can't use cpp because
I'd like *only* to do macro expansion. (i.e. No #include or other
directive processing.)
I can't just use s/\bFOO\b/BAR/g because FOO might appear within a
double-quoted string. (Are there other considerations?)
Can anyone point me in the right direction?
Thanks!
David
------------------------------
Date: Wed, 3 Nov 2004 16:12:36 +0100
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: Looking for C++ macro processing solution
Message-Id: <Xns9596A4E472EC7elhber1lidotechnet@62.89.127.66>
David Coppit <newspost@coppit.org> wrote:
> Hi all,
>
> I'm looking for a macro processor for C++ code. I can't use cpp
> because I'd like *only* to do macro expansion. (i.e. No #include
> or other directive processing.)
>
> I can't just use s/\bFOO\b/BAR/g because FOO might appear within a
> double-quoted string. (Are there other considerations?)
>
> Can anyone point me in the right direction?
What is your Perl question?
--
Cheers,
Bernard
------------------------------
Date: Wed, 03 Nov 2004 15:07:21 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Newbie HTTP::Request->new(POST => URL); question
Message-Id: <cmaruf$f7i$1@sun3.bham.ac.uk>
qa4ever wrote:
> Perl gurus,
BTW, this has nothing to do with Perl.
> use constant URL => 'http://10.0.0.6/sd/init';
> my $request = HTTP::Request->new(POST => URL);
> View source of 'http://10.0.0.6/sd/init' >>>>>>>>>>>>>>>>>>>>>>>>>>><
> <FORM NAME="pwdenter" ACTION="login" METHOD="POST">
Look! ^^^^^^^^^^^^^^
If that hint isn't sufficient for you to see what you've done wrong then
you need to step back and get a basic grounding in HTTP and HTML before
trying to do any web client automation.
------------------------------
Date: 3 Nov 2004 10:03:58 -0800
From: x3v0-usenet@yahoo.com (Xevo)
Subject: Re: number of characters in a string
Message-Id: <359b5621.0411031003.306966b1@posting.google.com>
spamsaket@yahoo.com (machoq) wrote in message news:<e715de76.0411011551.3fb201c7@posting.google.com>...
> I have reading a line from a text file
> the line is like
>
> abc\"123
> I need to find the number of characters in this string... (which
> should be 8, however if i do a
>
> $var = $line;
> print length($var); i get 7
>
> How do i workaround it ?
> regards
> -Machoq !
Well if the line is "abc\"123", then the \ would be counted as a
backreference for the " character. Therefore, \" is only counted as
one character. This is only a guess though since you didn't post the
exact code.
------------------------------
Date: Wed, 03 Nov 2004 13:56:04 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Partly OT: name suggestion
Message-Id: <h9jho059uqp3vqitsgn39bo5iacrljo82m@4ax.com>
On Wed, 03 Nov 2004 10:13:42 +0100, "Vetle Roeim" <vetro@online.no>
wrote:
>> [2] Be ready to expect puns on 'Perl-Do' too! ;-)
>
> PerlKwonDo? I.e. the way of Perl and the fist? Hm.
Not really. I was thinking of Jujitsu and Judo. Now this is getting
really OT, so we may continue by mail, if you like. You can write me
at <ti tod nfni tod im tod mcl ta razalb>.
However for completeness, when Mr. Kano founded his own school, in
1882, even if it was inspired by many jujutsu schools, especially Kito
ryu and Tenshin Shin'yo ryu (hope to have spelled them correctly!), He
decided to break with tradition adopting the name of Judo, to reflect
the passage from the stress on 'art', or 'skill', 'technique' to that
on the 'way', i.e. 'do' (Chinese: 'tao'). The term had already been
used occasionally and in fact, to distinguish it from another existing
school the full name was, and is, Judo Kodokan. Quite similarly, in
the same cultural transition phase, many traditional activities began
to be called with names ending with 'do': aikido, kendo, etc.
Of course all this is very loosely speaking and with no claim of
completeness or accuracy.
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: Wed, 03 Nov 2004 13:56:05 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Perl CGI project ideas
Message-Id: <jeiho054o0kfl0299o0i72u9m8ovo0fdd1@4ax.com>
On 3 Nov 2004 02:25:08 GMT, "A. Sinan Unur" <1usa@llenroc.ude.invalid>
wrote:
>> We have a project to develop a simple application on Linux using Perl
>> and CGI. I have been totally devoid of ideas for my project becuase
>
>That's your problem, not ours. This is a programming forum. Please go ahead
>and read the posting guidelines for this group (they are posted here
>regularly and you can also Google for the document).
>
>> I dont have too much time left,
>
>That's your problem.
Dear Sinan,
for once I have to agree with those claiming that sometimes
newbies/newcomers are treated too harshly here. In particular this one
has asked gently and has *not* asked a question about
webserver/html/whatever having little to nothing to do with perl, as
many others do. So indeed IMHO it may be sensible to direct him to a
better resource, but I don't see the point in being rude to him,
especially since he has not been particularly rude to the group, for
the question may well be partly OT, but it is also likely to find good
answers from people subscribing clpmisc.
>> really K I S S ideas are requested.
>
>Do we have to exchange fluids?
"Keep It Simple, Stupid!" or also "Keep It Straight and Simple".
Just my 2 Eurocents,
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: 3 Nov 2004 13:50:08 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Perl CGI project ideas
Message-Id: <Xns959659E30355Basu1cornelledu@132.236.56.8>
Michele Dondi <bik.mido@tiscalinet.it> wrote in
news:jeiho054o0kfl0299o0i72u9m8ovo0fdd1@4ax.com:
> On 3 Nov 2004 02:25:08 GMT, "A. Sinan Unur" <1usa@llenroc.ude.invalid>
> wrote:
>
>>> We have a project to develop a simple application on Linux using
>>> Perl and CGI. I have been totally devoid of ideas for my project
>>> becuase
>>
>>That's your problem, not ours. This is a programming forum. Please go
>>ahead and read the posting guidelines for this group (they are posted
>>here regularly and you can also Google for the document).
>>
>>> I dont have too much time left,
>>
>>That's your problem.
...
> for once I have to agree with those claiming that sometimes
> newbies/newcomers are treated too harshly here. In particular this one
> has asked gently and has *not* asked a question about
> webserver/html/whatever having little to nothing to do with perl,
That is definitely true.
On the other hand, this would be a perfect trolling article.
> So indeed IMHO it may be sensible to direct him to a better
> resource, but I don't see the point in being rude to him,
http://www.google.com/, maybe?
Sinan.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Wed, 03 Nov 2004 13:53:10 +0000
From: Peter Hickman <peter@semantico.com>
Subject: Re: Perl CGI project ideas
Message-Id: <4188e2cb$0$26287$afc38c87@news.easynet.co.uk>
bharat.shetty@gmail.com wrote:
> Hi all,
>
> We have a project to develop a simple application on Linux using Perl
> and CGI. I have been totally devoid of ideas for my project becuase
> whatever I thought is being done . Could anyone provide me with gist of
> ideas for my project. I would appreciate if someone points me to a
> necessary application that doesnt exist on Linux but on windoze. Since
> I dont have too much time left , really K I S S ideas are requested.
> Also which books should i read as i am relatively a Perl / CGI newbie
> .......
>
> T I A
>
> ~cryptonewbie
>
Let me get this straight. You want someone to give you an idea for a project
that has never been done before but is easy to do because you are a newbie?
There is little that is available on windows that is not available on Linux
especially if it is a CGI based application. Infact I would go as far as saying
that there is nothing inherently windows or Linux about a CGI application in the
first place.
I would settle for something that you understand and is within your abilities.
Look at various applications on the web and see which one strikes you as 'I
could do that, only better!' and go with it.
------------------------------
Date: Wed, 03 Nov 2004 13:51:48 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Perl CGI project ideas
Message-Id: <MrSdnScXsoNYtRTcRVn-vg@adelphia.com>
bharat.shetty@gmail.com wrote:
> I have been totally devoid of ideas for my project becuase
> whatever I thought is being done.
Keep in mind that the *real* purpose of this script is to pass the
assignment. Whatever else it does is incidental. Just pick any of the
classic stereotype CGIs - form to email is a good one - and run with it.
You *really* don't want to release a class project to the world anyway.
If you do, you could easily find yourself stuck spending the next ten
years supporting that code and asking yourself "wtf was I thinking".
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Wed, 3 Nov 2004 06:41:17 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: perl self generating program
Message-Id: <slrncohkfd.5f2.tadmc@magna.augustmail.com>
Yahav Bar yosef <yahavbaryosef@hotmail.com> wrote:
> what excactly do you mean by "empty file" ?
A file with zero bytes in it.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 03 Nov 2004 13:56:06 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Q: re Inline and Benchmark
Message-Id: <u1kho01bhtc5l13cjibcunahbdi4kiu8oe@4ax.com>
On Wed, 03 Nov 2004 06:21:14 +0000, Sisyphus
<kalinaubears@iinet.net.au> wrote:
>> more on-topic: is there any caveat with benchmarks carried on
>> Inline::C subs? I don't think so, but just to be sure...
>
>I've benchmarked hundreds of Inline::C subs and never struck any.
So, since you've been so gentle answering this particular question of
mine, could you please be so kind and answer the other ones too? I am
aware that my OP was probably too verbose...
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: Wed, 03 Nov 2004 13:56:08 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Q: re Inline and Benchmark
Message-Id: <o4lho0tmiinq1ee8fpg7enb4ma1qvdqcp3@4ax.com>
On 03 Nov 2004 00:22:54 GMT, Abigail <abigail@abigail.nl> wrote:
> use Inline C => <<'--';
[snip code]
> cmpthese 500 => {
> C => 'r_string',
> Loop1 => \&Loop1,
> Loop2 => \&Loop2,
> ...
> }
TY! However... I apologize for my fussiness, but would this be fair?
Some quick tests showed that, in a general situation, there are
different performance responses with coderefs and strings: I think
that in one case dereferencing and sub calls are involved whereas in
the other an eval() takes place:
# perl -MBenchmark=:all -e 'sub a { $|++ }\
cmpthese 20_000_000, { str => "a", code => \&a }'
Rate str code
str 922084/s -- -46%
code 1693480/s 84% --
I don't know if things are different with Inline subs, but I doubt
that...
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: Wed, 03 Nov 2004 16:31:59 GMT
From: Jean-Louis Leroy <jll@soundobjectlogic.com>
Subject: Rlogin client?
Message-Id: <lzk6t2sxl4.fsf@toots.sol>
Anybody knows of a rlogin client-in-a-module? Surprisingly I don't
find one on CPAN.
N.B. 1: I'm aware of the security issues - that's no the issue ;-)
N.B. 2: I'd like to avoid Expect and spawning a rlogin process.
TIA...
--
Jean-Louis Leroy
Sound Object Logic
http://www.soundobjectlogic.com
------------------------------
Date: 3 Nov 2004 08:27:32 -0800
From: ioneabu@yahoo.com (wana)
Subject: The most perfect beginning
Message-Id: <bf0b47ca.0411030827.68ff80de@posting.google.com>
I was looking at the Perl t-shirts at
http://www.thinkgeek.com/tshirts/coder/321a/ and I noticed that the
shirt says:
#!/usr/bin/perl -w
use strict;
I was told that:
#!/usr/bin/perl
use strict;
use warnings;
is better. Also, I was told that I should use -T, especially in cases
like CGI where many users may run a program, which I found out was not
as simple as adding the -T to the first line.
I was wondering what people think is the most perfect general
beginning to a Perl program that could be used in most or all
programs. This would include whatever flags, pragmas and modules
might be useful and important.
Thanks for any responses!
wana
------------------------------
Date: 3 Nov 2004 16:56:36 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: The most perfect beginning
Message-Id: <Xns9596797E5940Easu1cornelledu@132.236.56.8>
ioneabu@yahoo.com (wana) wrote in
news:bf0b47ca.0411030827.68ff80de@posting.google.com:
> I was wondering what people think is the most perfect general
> beginning to a Perl program that could be used in most or all
> programs. This would include whatever flags, pragmas and modules
> might be useful and important.
Depends.
At a minimum, you should have
use strict;
use warnings;
At your level, you should also consider
use diagnostics;
As for -w vs warnings, these days the latter is preferable because it
allows you to fine tune what warnings you receive etc based on the scope.
Sinan,
------------------------------
Date: Wed, 03 Nov 2004 12:00:56 -0500
From: Todd de Gruyl <todd@tdegruyl.com>
Subject: Re: The most perfect beginning
Message-Id: <9OGdnRpRw_FUkxTcRVn-jg@comcast.com>
On 11/3/04 11:27, wana wrote:
> I was looking at the Perl t-shirts at
> http://www.thinkgeek.com/tshirts/coder/321a/ and I noticed that the
> shirt says:
>
> #!/usr/bin/perl -w
> use strict;
>
> I was told that:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> is better.
Yes. use warnings was added in Perl 5.6. The camel code on the shirt
dates from about the same time as 5.6 was introduced, as far as I can tell.
> Also, I was told that I should use -T, especially in cases
> like CGI where many users may run a program, which I found out was not
> as simple as adding the -T to the first line.
If you are running a script where you cannot guarantee the input, always
use the -T flag.
To find out more:
perldoc perlsec
perldoc perlrun
> I was wondering what people think is the most perfect general
> beginning to a Perl program that could be used in most or all
> programs. This would include whatever flags, pragmas and modules
> might be useful and important.
I always start with:
#!/usr/bin/perl
use warnings;
use strict;
and then add on to that as I need to. That's really the only 'perfect
general beginning' in my opinion.
--
Todd de Gruyl
todd@tdegruyl.com
http://www.tdegruyl.com
------------------------------
Date: Wed, 3 Nov 2004 10:46:18 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: The most perfect beginning
Message-Id: <slrncoi2qq.6d4.tadmc@magna.augustmail.com>
Todd de Gruyl <todd@tdegruyl.com> wrote:
> On 11/3/04 11:27, wana wrote:
>> I was wondering what people think is the most perfect general
>> beginning to a Perl program that could be used in most or all
>> programs.
> I always start with:
[snip]
I always start with this "skeleton" program:
--------------------------
#!/usr/bin/perl
# progname - one-line description of what progname does
use warnings;
use strict;
while ( <> ) {
print;
}
--------------------------
Most of my programs are "rip through a file and do something with each line".
I've adopted the convention on the 2nd line so that I can use File::Find
to identify and list every Perl program that I've ever written.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 03 Nov 2004 15:45:52 GMT
From: Mike <dontwannasay@home.com>
Subject: Re: Win32 Advanced Properties
Message-Id: <Xns95964EFC3733dontwannasaycom@204.127.204.17>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in
news:Xns95956B262E964asu1cornelledu@132.236.56.8:
> "Jürgen Exner" <jurgenex@hotmail.com> wrote in
> news:n%Mhd.2934$cA4.2291@trnddc01:
>
>
> Fundamentally, you are correct. EXIF information should be preferred
> rather than OS specific methods.
>
> NTFS does have these alternative streams that can be associated with
> files. The OP might want to look at:
>
> http://tinyurl.com/5ub5n
>
> However, as another poster has also mentioned, I would urge the OP to
> manipulate EXIF information than NTFS alternative streams
>
Hmmm...
<DisplayOfIgnorance>
when I right-click on an image file, and select 'Properties', am I looking
at the EXIF information or NTFS information?
The properties sheet (under the summary tab) shows elements like 'Width',
'Height', 'Horizontal Resolution', 'Frame Count', 'Camera Model', 'Focal
Length', 'ISO Speed' and more. WHose properties are these?
</DisplayOfIgnorance>
Thanks for the pointers...
Mike
------------------------------
Date: 3 Nov 2004 17:15:34 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Win32 Advanced Properties
Message-Id: <Xns95967CB5B6777asu1cornelledu@132.236.56.8>
Mike <dontwannasay@home.com> wrote in
news:Xns95964EFC3733dontwannasaycom@204.127.204.17:
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in
> news:Xns95956B262E964asu1cornelledu@132.236.56.8:
>
>> "Jürgen Exner" <jurgenex@hotmail.com> wrote in
>> news:n%Mhd.2934$cA4.2291@trnddc01:
>>
>>
>> Fundamentally, you are correct. EXIF information should be preferred
>> rather than OS specific methods.
>>
>> NTFS does have these alternative streams that can be associated with
>> files. The OP might want to look at:
>>
>> http://tinyurl.com/5ub5n
>>
>> However, as another poster has also mentioned, I would urge the OP to
>> manipulate EXIF information than NTFS alternative streams
>>
>
> Hmmm...
> <DisplayOfIgnorance>
> when I right-click on an image file, and select 'Properties', am I
> looking at the EXIF information or NTFS information?
> The properties sheet (under the summary tab) shows elements like
> 'Width', 'Height', 'Horizontal Resolution', 'Frame Count', 'Camera
> Model', 'Focal Length', 'ISO Speed' and more. WHose properties are
> these? </DisplayOfIgnorance>
Those properties are set based on the EXIF information in the file as well
as simple image header info so on and so forth. So, I do not know if
Windows then copies that information to the alternative stream of the file.
But that is irrelevant.
Incidentally, you only asked about 'Author' and 'Copyright' fields
initially. Looking at the MS documentation (a link to which available in
the post I referred you, it turns out 'Author' is a default field in the
summary information property set). But that is irrelevant also.
What is relevant for your issue is to use modules made for dealing with
EXIF or IPTC information to have something that is not tied to the specific
file system you are using.
Sinan.
------------------------------
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 7355
***************************************