[29093] in Perl-Users-Digest
Perl-Users Digest, Issue: 337 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 14 21:09:57 2007
Date: Sat, 14 Apr 2007 18: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 Apr 2007 Volume: 11 Number: 337
Today's topics:
Re: How to decoding a file handle? <hjp-usenet2@hjp.at>
Re: How to transparently download multiple files? <purlgurl@purlgurl.net>
Re: How to transparently download multiple files? <foobarbazqux@hotmail.com>
Re: How to transparently download multiple files? <purlgurl@purlgurl.net>
Re: How to transparently download multiple files? <foobarbazqux@hotmail.com>
Re: How to transparently download multiple files? <foobarbazqux@hotmail.com>
Re: How to transparently download multiple files? <edMbj@aes-intl.com>
Re: How to transparently download multiple files? <uri@stemsystems.com>
Re: How to transparently download multiple files? <edMbj@aes-intl.com>
Re: How to transparently download multiple files? <uri@stemsystems.com>
Running perl scripts on the fly jrosik@gmail.com
Re: Running perl scripts on the fly <purlgurl@purlgurl.net>
Re: Running perl scripts on the fly <bik.mido@tiscalinet.it>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 14 Apr 2007 23:11:51 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: How to decoding a file handle?
Message-Id: <slrnf22gsn.bg9.hjp-usenet2@zeno.hjp.at>
On 2007-04-10 05:02, happierbee <wenbinye@gmail.com> wrote:
> If input is a file, function `open' can use encoding in module Encode
> to decode the input file. But is input is a file handle, STDIN, how to
> decode it if I don't want to decode it line by line? More important,
> utf-16 can't decode line by line.
perldoc -f binmode
hp
--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Sam in "Freefall"
------------------------------
Date: Sat, 14 Apr 2007 11:11:51 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: How to transparently download multiple files?
Message-Id: <AKOdnR8L0uH2hLzbnZ2dnUVZ_jGdnZ2d@giganews.com>
Tad McClellan wrote:
> grocery_stocker wrote:
>>>>> $imgPath = "http://localhost/~test/";
>>> PG makes no attempt to correct the misuse of double quotes.
>> How does moronzilla misuse the double quotes in this case?
> It is merely a style issue, and calling it a misuse is perhaps going
> too far, though I would have suggested changing it in a code review.
A personal style issue is all this is. You have your style,
I have my style. Attempting to arrogantly force your personal
style upon others is stupid, but not as stupid as childish
name calling, a persistent habit displayed in this group
by you equally childish boys.
I cannot understand why you boys expect readers to take you
seriously while you display such childish behavior.
Purl Gurl
------------------------------
Date: 14 Apr 2007 11:18:41 -0700
From: "foo bar baz qux" <foobarbazqux@hotmail.com>
Subject: Re: How to transparently download multiple files?
Message-Id: <1176574721.352105.178280@e65g2000hsc.googlegroups.com>
On 14 Apr, 17:37, "grocery_stocker" <cdal...@gmail.com> wrote:
>
>> PG makes no attempt to write standards compliant HTML or XHTML. The
>> quality of the resultant HTML is pretty poor.
>
> Can you clarify this? I'm lost.
>
PG's code will emit HTML something like the following (but all on one
line)
<HTML>
<img src = "http://localhost/~test/Threeimages0404070"><BR>
<img src = "http://localhost/~test/Threeimages0404071"><BR>
<img src = "http://localhost/~test/Threeimages0404072"><BR>
<img src = "http://localhost/~test/Threeimages0404073"><BR>
<BR><H2> Download Successful </H2>
</HTML>
If you cut that out and paste it into the form at http://validator.w3.org/
you'll see what I mean.
------------------------------
Date: Sat, 14 Apr 2007 11:28:58 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: How to transparently download multiple files?
Message-Id: <g6ydnVJv-rLzgLzbnZ2dnUVZ_tKjnZ2d@giganews.com>
foo bar baz qux wrote:
> grocery_stocker wrote:
>>> PG makes no attempt to write standards compliant HTML or XHTML. The
>>> quality of the resultant HTML is pretty poor.
>> Can you clarify this? I'm lost.
> PG's code will emit HTML something like the following (but all on one
> line)
> <HTML>
> <img src = "http://localhost/~test/Threeimages0404070"><BR>
> <img src = "http://localhost/~test/Threeimages0404071"><BR>
> <img src = "http://localhost/~test/Threeimages0404072"><BR>
> <img src = "http://localhost/~test/Threeimages0404073"><BR>
> <BR><H2> Download Successful </H2>
> </HTML>
> If you cut that out and paste it into the form at http://validator.w3.org/
> you'll see what I mean.
I will be succinct. You are as much of a childish idiot as Uri Guttman
and many other boys here.
How idiotic of you to expect a simple example answer to a question
to be a full blown perfect program which produces fully compliant
html code.
You are a troll. You are an exceptionally stupid troll.
You, like many other childish boys around here, are an
embarrassment to the Perl community.
Purl Gurl
------------------------------
Date: 14 Apr 2007 11:30:54 -0700
From: "foo bar baz qux" <foobarbazqux@hotmail.com>
Subject: Re: How to transparently download multiple files?
Message-Id: <1176575454.866147.221840@p77g2000hsh.googlegroups.com>
On 14 Apr, 16:39, Ed Jay <e...@aes-intl.com> wrote:
> foo bar baz qux scribed:
>
>> You're too polite. PG writes code worse than I did in the Perl4 days.
>
> For the record, I've asked for help on two or three occasions. On each
> occasion I walked away offended by several responses I received
> (with no help), except for hints and direction from Purl Gurl that led
> to both solutions to my programming issues, and to my better
> understanding of Perl.
I think you overlooked Mumia's reply at least. You thanked him for his
help. I expect others replied that you thanked too at the time?
------------------------------
Date: 14 Apr 2007 11:49:55 -0700
From: "foo bar baz qux" <foobarbazqux@hotmail.com>
Subject: Re: How to transparently download multiple files?
Message-Id: <1176576595.620672.158820@n76g2000hsh.googlegroups.com>
On 14 Apr, 19:28, Purl Gurl <purlg...@purlgurl.net> wrote:
> foo bar baz qux wrote:
>> grocery_stocker wrote:
>>> PG makes no attempt to write standards compliant HTML or
>>> XHTML. The quality of the resultant HTML is pretty poor.
>>>
>>> Can you clarify this? I'm lost.
>>
>> PG's code will emit HTML something like the following
<snip>
>> If you cut that out and paste it into the form at
>> http://validator.w3.org/ you'll see what I mean.
(PG childish rant deleted)
> How idiotic of you to expect a simple example answer to a question
> to be a full blown perfect program which produces fully compliant
> html code.
Clearly you're incapable of either.
How about your flagship, you've had years to polish that:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.purlgurl.net%2F
"Failed validation, 11 errors"
As I said, PG makes no attempt to write standards compliant HTML or
XHTML.
------------------------------
Date: Sat, 14 Apr 2007 11:55:24 -0700
From: Ed Jay <edMbj@aes-intl.com>
Subject: Re: How to transparently download multiple files?
Message-Id: <jr8223lj4fr00jhtof90a3k1kp6mploeo0@4ax.com>
foo bar baz qux scribed:
>On 14 Apr, 16:39, Ed Jay <e...@aes-intl.com> wrote:
>> foo bar baz qux scribed:
>>
>>> You're too polite. PG writes code worse than I did in the Perl4 days.
>>
>> For the record, I've asked for help on two or three occasions. On each
>> occasion I walked away offended by several responses I received
>> (with no help), except for hints and direction from Purl Gurl that led
>> to both solutions to my programming issues, and to my better
>> understanding of Perl.
>
>I think you overlooked Mumia's reply at least. You thanked him for his
>help. I expect others replied that you thanked too at the time?
>
I thought I covered that when I wrote 'several responses' instead of 'all
responses.' ;-)
--
Ed Jay (remove 'M' to respond by email)
------------------------------
Date: Sat, 14 Apr 2007 18:53:06 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How to transparently download multiple files?
Message-Id: <x7647yeffx.fsf@mail.sysarch.com>
>>>>> "EJ" == Ed Jay <edMbj@aes-intl.com> writes:
<massive snip of quoted emails>
EJ> For the record, I've asked for help on two or three occasions. On
EJ> each occasion I walked away offended by several responses I
EJ> received (with no help), except for hints and direction from Purl
EJ> Gurl that led to both solutions to my programming issues, and to
EJ> my better understanding of Perl.
then you deserve moronzilla's advice all the time. please ask her
questions in email and not here. it is not wanted here and you can
choose what you want. by saying what you did, you just lost any help
from most of the regulars here. bye bye.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Sat, 14 Apr 2007 17:12:40 -0700
From: Ed Jay <edMbj@aes-intl.com>
Subject: Re: How to transparently download multiple files?
Message-Id: <99o2239570caf8vkvbr5am2m60onp05cf0@4ax.com>
Uri Guttman scribed:
>>>>>> "EJ" == Ed Jay <edMbj@aes-intl.com> writes:
>
><massive snip of quoted emails>
Emails? This is Usenet, sir. Or, do you think I'm conspiring in the dark
about what to post here? Is paranoia the root of your problem?
>
> EJ> For the record, I've asked for help on two or three occasions. On
> EJ> each occasion I walked away offended by several responses I
> EJ> received (with no help), except for hints and direction from Purl
> EJ> Gurl that led to both solutions to my programming issues, and to
> EJ> my better understanding of Perl.
>
>then you deserve moronzilla's advice all the time. please ask her
>questions in email and not here.
I'll continue to feel free to ask them wherever I see fit to ask them, and
that includes this NG. Hopefully, I'll be lucky enough to attract the
attention of people like PG and get some assistance.
>it is not wanted here
Let's see...I asked a question and took the advice of PG. For whatever your
reason(s), you have ill feelings toward PG. Therefore, I should ask my
questions elsewhere. Interesting logic, eh.
I know that in your own mind you believe you own this NG and speak for all
of its regular participants. I have bad news for you.
>and you can
>choose what you want. by saying what you did, you just lost any help
>from most of the regulars here. bye bye.
>
I'm sure I'll miss the help, but not much if I have to pay for it by
subjecting myself to ill manners and hostile behavior simply because I took
someone's (good) advice.
I don't know what your issue is with PG. I don't care. I don't have a dog in
the fight, and I won't. But, you gotta know that after lurking here a couple
of months, I view your little cabal as looking the serious loser in your
seemingly one-sided battle with PG.
I came to this NG with a legit Perl question. I didn't come here for a
flamefest. I also didn't come here to offer lessons on manners. New
participants and participants 'outside' of your little cabal seem to agree
that your behavior is errant, so I find it difficult to apologize for
anything I've written (except, for my error in posting code).
--
Ed Jay (remove 'M' to respond by email)
------------------------------
Date: Sat, 14 Apr 2007 20:37:10 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How to transparently download multiple files?
Message-Id: <x77isecw21.fsf@mail.sysarch.com>
>>>>> "EJ" == Ed Jay <edMbj@aes-intl.com> writes:
EJ> Uri Guttman scribed:
>>>>>>> "EJ" == Ed Jay <edMbj@aes-intl.com> writes:
>>
>> <massive snip of quoted emails>
EJ> Emails? This is Usenet, sir. Or, do you think I'm conspiring in the dark
EJ> about what to post here? Is paranoia the root of your problem?
s/email/posts/
either way you quoted too much for the little you added. wahtever. if
you want to join moronzilla in locating the wrong bugs, go ahead.
>> then you deserve moronzilla's advice all the time. please ask her
>> questions in email and not here.
EJ> I'll continue to feel free to ask them wherever I see fit to ask
EJ> them, and that includes this NG. Hopefully, I'll be lucky enough
EJ> to attract the attention of people like PG and get some
EJ> assistance.
you are deluded as it is. amazing how you really think it knows perl or
actually cares about helping. please do youself a favor and google its
posting history. if you still think it knows perl and is also as nice as
you think, then go form your own perl circle of hell. but don't claim
moronzilla knows perl or is nice here. do you want help in anything
beyond what substr can do? try asking it a question about refs, objects,
data structures, etc. notice it never joins those threads. that might be
a clue that you need.
>> it is not wanted here
EJ> Let's see...I asked a question and took the advice of PG. For
EJ> whatever your reason(s), you have ill feelings toward
EJ> PG. Therefore, I should ask my questions elsewhere. Interesting
EJ> logic, eh.
no, factual logic. you don't know enough perl to judge whether it knows
perl. that is something communities do and it has long ago decided
moronzilla is delusional. you can take many experts' opinions on that or
your own. but you have decided yourself already.
EJ> I know that in your own mind you believe you own this NG and speak
EJ> for all of its regular participants. I have bad news for you.
i don't own shit here. i own my reputation as a perl hacker and someone
who gets paid to teach, support, recruit, lecture and other things about
perl. try to find any credentials about moronzilla. compare her cpan
code (oops, none), published articles (oops none other than on her
site), books (oops none nor edited any), talks at conferences (oops,
none). these are the things you look for in a perl expert. not some
blithering about my being slow or substr is better than a regex or
answering the wrong questions. have you noticed not ONE other person
her regularly supports moronzilla. you can pcik your side but you will
lose out. feel free but don't ever ask me for help.
EJ> I'm sure I'll miss the help, but not much if I have to pay for it
EJ> by subjecting myself to ill manners and hostile behavior simply
EJ> because I took someone's (good) advice.
you would choose the nice idiot over the curmudgeonly expert. i would
want dr house curing me vs your choosing major burns from mash.
EJ> I don't know what your issue is with PG. I don't care. I don't
EJ> have a dog in the fight, and I won't. But, you gotta know that
EJ> after lurking here a couple of months, I view your little cabal as
EJ> looking the serious loser in your seemingly one-sided battle with
EJ> PG.
issue? you haven't even looked at its posting history. have fun for a change.
EJ> I came to this NG with a legit Perl question. I didn't come here
EJ> for a flamefest. I also didn't come here to offer lessons on
EJ> manners. New participants and participants 'outside' of your
EJ> little cabal seem to agree that your behavior is errant, so I find
EJ> it difficult to apologize for anything I've written (except, for
EJ> my error in posting code). -- Ed Jay (remove 'M' to respond by
EJ> email)
not really. most newbies are fine here. just those that refuse to open
their eyes or the docs seem to have issues. you seem to be in that
camp. i recruit perl hackers as part of my perl business and i am sure i
will never seek you out for employment. i don't want to place people who
can't see or think for themselves.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 14 Apr 2007 15:42:10 -0700
From: jrosik@gmail.com
Subject: Running perl scripts on the fly
Message-Id: <1176590530.887556.94850@y80g2000hsf.googlegroups.com>
Hi all,
I would like to run perl scripts as in the following scenario:
1. I open a text editor - for example Notepad, Wordpad, Word.
2. I paste some text into this text editor.
3. I press a magic key - let's say I double press the Shift key.
4. A magic window appears and I enter the following script:
while (<>) {
s/you/You/;
print;
}
5. I execute the script.
6. Now there are two text editor windows - one with the source text
and another with the output text.
Is this possible?
One note: I have not saved any document during my scenario!
Regards,
Jiri Rosicky
------------------------------
Date: Sat, 14 Apr 2007 16:37:24 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Running perl scripts on the fly
Message-Id: <8_CdndHjtowl-LzbnZ2dnUVZ_rWnnZ2d@giganews.com>
jrosik wrote:
> I would like to run perl scripts as in the following scenario:
> 1. I open a text editor - for example Notepad, Wordpad, Word.
Notepad is ok for editing programs but not your best choice.
Do not use Wordpad nor Word. Both programs add metacharacters
into saved files which will render your scripts useless. Wordpad
does have a feature to save your scripts as plaintext or as DOS
text, but you have to carefully select this save feature and
"ok" through a warning message.
> 2. I paste some text into this text editor.
> 3. I press a magic key - let's say I double press the Shift key.
> 4. A magic window appears and I enter the following script:
> while (<>) {
> s/you/You/;
> print;
> }
> 5. I execute the script.
> 6. Now there are two text editor windows - one with the source text
> and another with the output text.
I use a very old program editor, Programmer's File Editor, 32 bit
more commonly known as PFE32 on the web. This editor dates back
to the early Nineties and is an excellent editor. I like PFE because
there are not a lot of whistles and bells yet is a configurable
program editor. This editor has a feature for popping up a command
line window for running programs. However, you have to "save" your
program first, which works well for me. PFE is a straight forward
no-nonsense program editor for professionals. PFE32 is free.
Reads you need a Visual Basic style editor which affords running
programming without saving. Chances are you will have to lay out
money for this type of editor. Look for free "lite" versions if
you do not want to spend money.
Look around through Google. You are bound to find what you want.
http://www.google.com/search?hl=en&safe=off&q=program+editor+perl&btnG=Search
Purl Gurl
------------------------------
Date: Sun, 15 Apr 2007 01:49:19 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Running perl scripts on the fly
Message-Id: <7rp223dha0jv89eofqdhlqti2sgfqmmn8s@4ax.com>
On 14 Apr 2007 15:42:10 -0700, jrosik@gmail.com wrote:
>I would like to run perl scripts as in the following scenario:
>
>1. I open a text editor - for example Notepad, Wordpad, Word.
The latter two are *not* text editors. They can be used as such, but
in most cases, not only would this be a waste of resources, but it
could even have unpleasant side effects, or be difficult to manage.
>2. I paste some text into this text editor.
>3. I press a magic key - let's say I double press the Shift key.
That doesn't sound like a reasonable keybinding in most editors, let
alone generic app. But I get the point.
>4. A magic window appears and I enter the following script:
> while (<>) {
> s/you/You/;
> print;
> }
>5. I execute the script.
>6. Now there are two text editor windows - one with the source text
>and another with the output text.
>
>Is this possible?
Yes, I see no reason why it shouldn't. Indeed it may be already
implemented in some text editors. It surely can, and not with too many
difficulties, in those that have an extension language built in.
>One note: I have not saved any document during my scenario!
No need to. (But it could be done to temp files behind the curtains,
anyway.)
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: 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 337
**************************************