[30180] in Perl-Users-Digest
Perl-Users Digest, Issue: 1423 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 6 00:09:48 2008
Date: Sat, 5 Apr 2008 21:09:06 -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, 5 Apr 2008 Volume: 11 Number: 1423
Today's topics:
=?KOI8-R?B?89DP0tTJ187ZxSDUz9fB0tkgU2hvcCBCb2R5?= <zolotoiklo@mail.ru>
About perl closure. <lofenee@gmail.com>
Re: Is substr only way of getting nth character of stri <spamtrap@dot-app.org>
Newbie wants a simple script in perl <FW3006@sbcglobal.net>
Re: Newbie wants a simple script in perl <rui.maciel@gmail.com>
Re: Newbie wants a simple script in perl <FW3006@sbcglobal.net>
Re: Newbie wants a simple script in perl <jurgenex@hotmail.com>
Re: Newbie wants a simple script in perl <FW3006@sbcglobal.net>
Re: Newbie wants a simple script in perl <rui.maciel@gmail.com>
Re: Newbie wants a simple script in perl <1usa@llenroc.ude.invalid>
Re: Newbie wants a simple script in perl <jurgenex@hotmail.com>
Re: perl should be improved and perl6 <rvtol+news@isolution.nl>
Re: perl should be improved and perl6 <v_r@spamless.and.happy>
Re: perl should be improved and perl6 xhoster@gmail.com
Re: perl should be improved and perl6 <v_r@spamless.and.happy>
Re: perl should be improved and perl6 <uri@stemsystems.com>
Re: perl should be improved and perl6 <john@castleamber.com>
Re: perl should be improved and perl6 <john@castleamber.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 5 Apr 2008 01:49:52 -0700 (PDT)
From: =?KOI8-R?B?+s/Mz9TPyiDrzM/O?= <zolotoiklo@mail.ru>
Subject: =?KOI8-R?B?89DP0tTJ187ZxSDUz9fB0tkgU2hvcCBCb2R5?=
Message-Id: <5ac22835-4ab5-41e3-9b01-1a6fb6166880@x41g2000hsb.googlegroups.com>
U2hvcCBCb2R5IC0gyc7UxdLOxdQtzcHHwdrJziDUz9fB0s/XIMTM0SDL0sHTz9TZIMkg2sTP0s/X
2NEuIO3ZINLBxNkNCtDSxcTMz9bJ1Ngg98Hbxc3VINfOyc3BzsnAINTP18HS2SDEzNEg2sTP0s/X
2NEg08HN2cUgy8HexdPU18XOztnFIMkNCtzGxsXL1MnXztnFINTP18HS2SDXxcTV3cnIINDSz8na
18/EydTFzMXKIM3J0sE6INDP0dPBLCDCwc7EwdbJLA0Ky8/S08XU2Swgy8/S0sXL1M/S2SDP08HO
y8ksIMnaxMXMydEgxMzRINDPyNXExc7J0SDJIMzF3sXOydEgw8XMzMDMydTBLA0KzcHT08HWxdLZ
IMkgzcnP09TJzdXM0dTP0tksIMHQ0MHSwdTZIMbJ2snP1MXSwdDJySDJIM3FxNTFyM7Jy9UsIM7B
ws/S2Q0KxMzRINXIz8TBINrBINLVy8HNySwgwSDUwcvWxTog1MXSzc/CxczYxSDJIMfSxczLySwg
xsnL08HUz9LZINPV09TB18/XLA0Ky8/TzcXUycvVIMTM0SDVyM/EINrBIMzJw8/NIMkg18/Mz9PB
zcksINDSyc7BxMzF1s7P09TJIMkg1MXIzsnLwSDEzNENCsTPzSDJIMTB3sksINTFyM7Jy8EgySDQ
0snT0M/Tz8LMxc7J0SDEzNEgy9XIzsksIMTPzcHbzsnFINTSxc7B1sXS2SDJDQrT0M/S1MnXztnF
INTP18HS2Swgz9LUz9DFxMnexdPLycUg0M/E1dvLySDJIM3B1NLB09kgySDNzs/Hz8UgxNLVx8/F
Lg0KDQrz0M/S1MnXztnFINTP18HS2SBodHRwOi8vc2hvcGJvZHkucnUv
------------------------------
Date: Sun, 6 Apr 2008 11:59:26 +0800
From: "pswd" <lofenee@gmail.com>
Subject: About perl closure.
Message-Id: <ft9nh7$7oo$1@news.cn99.com>
I have little idea about what are closures for perl?
Is it just a function maker that returns a reference of subroutine?
Could anybody tell me what it is and show me some examples?
Thanks in advance!
------------------------------
Date: Sat, 05 Apr 2008 07:31:46 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Is substr only way of getting nth character of string?
Message-Id: <m1sky0edwd.fsf@dot-app.org>
Tad J McClellan <tadmc@seesig.invalid> writes:
> sheinrich@my-deja.com <sheinrich@my-deja.com> wrote:
>
>
>> This one is my favourite shuffling algo. It's called a 'fisher yates
>> shuffle'
>
>
> That algorithm is given in the answer to this Frequently Asked Question:
>
> perldoc -q shuffle
Also, in the Perl Cookbook.
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Sat, 5 Apr 2008 12:41:33 -0700 (PDT)
From: 2007 <FW3006@sbcglobal.net>
Subject: Newbie wants a simple script in perl
Message-Id: <aff27cc9-5271-4c3b-b20b-bd19e1674b8d@x19g2000prg.googlegroups.com>
Hi
I have a file called "list1" - its got about 80 rows - each row is
alpha numeric name w/ ".txt" extension - each name refers to a file in
the dir.
The script reads the list - for each name in the list, it will perform
an operation (an executable of a "C-program" and writes to same name
with a different extension, say ".mp3".
Thanks
------------------------------
Date: 05 Apr 2008 20:09:10 GMT
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: Newbie wants a simple script in perl
Message-Id: <47f7dc66$0$16535$a729d347@news.telepac.pt>
On Sat, 05 Apr 2008 12:41:33 -0700, 2007 wrote:
> Hi
>
> I have a file called "list1" - its got about 80 rows - each row is alpha
> numeric name w/ ".txt" extension - each name refers to a file in the
> dir.
>
> The script reads the list - for each name in the list, it will perform
> an operation (an executable of a "C-program" and writes to same name
> with a different extension, say ".mp3".
Nice. What have you written so far? And why didn't you opted for bash?
Rui Maciel
------------------------------
Date: Sat, 5 Apr 2008 15:22:40 -0700 (PDT)
From: 2007 <FW3006@sbcglobal.net>
Subject: Re: Newbie wants a simple script in perl
Message-Id: <aa3d71a8-181e-4075-908f-13472b2f3591@z24g2000prf.googlegroups.com>
On Apr 5, 1:09 pm, Rui Maciel <rui.mac...@gmail.com> wrote:
> On Sat, 05 Apr 2008 12:41:33 -0700, 2007 wrote:
> > Hi
>
> > I have a file called "list1" - its got about 80 rows - each row is alpha
> > numeric name w/ ".txt" extension - each name refers to a file in the
> > dir.
>
> > The script reads the list - for each name in the list, it will perform
> > an operation (an executable of a "C-program" and writes to same name
> > with a different extension, say ".mp3".
>
> Nice. What have you written so far? And why didn't you opted for bash?
>
> Rui Maciel
I changed it to bash but the code didn't work
THis is what I really need:
In a summary:
1) say about 80 files (but varies) in a dir with filenameX.txt
extension.
2) CONV1 runs one at a time and gives output w/ a fixed name, CONV.out
3) CONV2 takes CONV.out as well as the final output file (which is
filenameX.mp3). Ideally it puts them in a specified directly.
I really appreciate your help - I want something that works - I
started off with t shell - I am open to change to bash or perl. I
prefer a simpler looking program
------------------------------
Date: Sat, 05 Apr 2008 22:24:02 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Newbie wants a simple script in perl
Message-Id: <82vfv3teke4scivsou6hgie351di2avong@4ax.com>
2007 <FW3006@sbcglobal.net> wrote:
>I have a file called "list1" - its got about 80 rows - each row is
>alpha numeric name w/ ".txt" extension - each name refers to a file in
>the dir.
>
>The script reads the list - for each name in the list, it will perform
>an operation (an executable of a "C-program" and writes to same name
>with a different extension, say ".mp3".
Ok.
What is your question (if you got any) or the point of your posting?
jue
------------------------------
Date: Sat, 5 Apr 2008 15:47:52 -0700 (PDT)
From: 2007 <FW3006@sbcglobal.net>
Subject: Re: Newbie wants a simple script in perl
Message-Id: <720e7bce-09bc-4870-8877-607b3ea28afe@p39g2000prm.googlegroups.com>
On Apr 5, 3:24 pm, J=FCrgen Exner <jurge...@hotmail.com> wrote:
> 2007 <FW3...@sbcglobal.net> wrote:
> >I have a file called "list1" - its got about 80 rows - each row is
> >alpha numeric name w/ ".txt" extension - each name refers to a file in
> >the dir.
>
> >The script reads the list - for each name in the list, it will perform
> >an operation (an executable of a "C-program" and writes to same name
> >with a different extension, say ".mp3".
>
> Ok.
> What is your question (if you got any) or the point of your posting?
>
> jue
I need help in writing please
Also, if I use "print" within perl to the dump a executable command to
the monitor, will the process be executed and the perl will wait
before it throws the next one to screen?
------------------------------
Date: 05 Apr 2008 23:52:47 GMT
From: Rui Maciel <rui.maciel@gmail.com>
Subject: Re: Newbie wants a simple script in perl
Message-Id: <47f810ce$0$16520$a729d347@news.telepac.pt>
On Sat, 05 Apr 2008 15:48:16 -0700, Andrew DeFaria wrote:
> Based on your sketchy requirements I'd say (in bash):
>
> $ cat list1 | while read filename; do
> > CONV1 $filename
> > CONV2 CONV.out
> > done
>
> Am I missing something?
Yes, he was trying to get someone to do his work. He obviously never even
gave it a try, not in perl and obviously not in bash. After all, it's one
of the recurring examples in each and every bash tutorial on the web.
Rui Maciel
------------------------------
Date: Sun, 06 Apr 2008 01:09:15 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Newbie wants a simple script in perl
Message-Id: <Xns9A77D73032F0Basu1cornelledu@127.0.0.1>
2007 <FW3006@sbcglobal.net> wrote in
news:720e7bce-09bc-4870-8877-
607b3ea28afe@p39g2000prm.googlegroups.co
m:
> On Apr 5, 3:24 pm, Jürgen Exner <jurge...@hotmail.com> wrote:
...
>> What is your question (if you got any) or the point of your
>> posting?
...
>
> I need help in writing please
>
First, try to help yourself.
If you want the script written for you, I am sure there will be a
few people who'd do it for $500. If you want tech support to go with
that, maybe $750. If you would like me to write it, the rate goes up
to $2500.
If you are willing to pay for the job, then post an announcement at
http://jobs.perl.org/
Otherwise, try to solve your problem first on your own (make sure to
consult the various resources available to you) and then post
concrete questions here.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Sun, 06 Apr 2008 01:36:36 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Newbie wants a simple script in perl
Message-Id: <c5agv3dcq0kfqs42k9sj21h8c93otq4n60@4ax.com>
2007 <FW3006@sbcglobal.net> wrote:
>> >I have a file called "list1" - its got about 80 rows - each row is
>> >alpha numeric name w/ ".txt" extension - each name refers to a file in
>> >the dir.
>>
>> >The script reads the list - for each name in the list, it will perform
>> >an operation (an executable of a "C-program" and writes to same name
>> >with a different extension, say ".mp3".
>>
>I need help in writing please
Ok, what do you have so far? Show us your current code, explain what it
is supposed to do (you got that part already), what it is actually
doing, or where you are stuck. I am sure someone will be happy to show
you how to get unstuck.
>Also, if I use "print" within perl to the dump a executable command to
>the monitor,
This sentence doesn't compute. I have absolutely no idea what you are
talking about.
>will the process be executed and the perl will wait
>before it throws the next one to screen?
print() has nothing to do with process control. Where did you get that
idea?
jue
------------------------------
Date: Sat, 5 Apr 2008 18:03:00 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: perl should be improved and perl6
Message-Id: <ft8f09.1ds.1@news.isolution.nl>
jm schreef:
> perl [...] is poorly typed
By you? (Did you mean Perl by the way?)
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Sat, 5 Apr 2008 14:55:43 -0700
From: "V.Ronans" <v_r@spamless.and.happy>
Subject: Re: perl should be improved and perl6
Message-Id: <B4Kdna9QT83_aGranZ2dnUVZ_quhnZ2d@wavecable.com>
Dr.Ruud wrote:
> jm schreef:
>
>> perl [...] is poorly typed
>
> By you? (Did you mean Perl by the way?)
Honestly, you know full well he was talking about the programming
language that pertains to this here news group, so feign ignorance? I
mean why is this even such an issue? Other places where people talk
about programming languages don't seem to care if it's all caps, first
only capitalized, or all lowercase, or what have you. I've seen Java,
java, and JAVA, cpp, C++, c++, c, C, python, PYTHON, cobol, Cobol,
COBOL, and the list goes on.
So why make such a stink about something so damn trivial? Does it make
you feel special? Perl is great, but I've always thought some of it's
backers (at least in this group) could use a dose of reality and stop
behaving like such self-important elitists and come back down to Earth.
This BS just keeps on repeating and it serves no one any good
whatsoever.
------------------------------
Date: 05 Apr 2008 22:34:41 GMT
From: xhoster@gmail.com
Subject: Re: perl should be improved and perl6
Message-Id: <20080405183444.486$pI@newsreader.com>
"V.Ronans" <v_r@spamless.and.happy> wrote:
> Dr.Ruud wrote:
> > jm schreef:
> >
> >> perl [...] is poorly typed
> >
> > By you? (Did you mean Perl by the way?)
>
> Honestly, you know full well he was talking about the programming
> language that pertains to this here news group, so feign ignorance? I
> mean why is this even such an issue? Other places where people talk
> about programming languages don't seem to care if it's all caps, first
> only capitalized, or all lowercase, or what have you. I've seen Java,
> java, and JAVA, cpp, C++, c++, c, C, python, PYTHON, cobol, Cobol,
> COBOL, and the list goes on.
>
> So why make such a stink about something so damn trivial?
Programming requires attention to detail. Well, good programming does,
anyway.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Sat, 5 Apr 2008 18:25:12 -0700
From: "V.Ronans" <v_r@spamless.and.happy>
Subject: Re: perl should be improved and perl6
Message-Id: <MaqdnZOYY9jku2XanZ2dnUVZ_sOrnZ2d@wavecable.com>
xhoster@gmail.com wrote:
> "V.Ronans" <v_r@spamless.and.happy> wrote:
>> Dr.Ruud wrote:
>>> jm schreef:
>>>
>>>> perl [...] is poorly typed
>>>
>>> By you? (Did you mean Perl by the way?)
>>
>> Honestly, you know full well he was talking about the programming
>> language that pertains to this here news group, so feign ignorance? I
>> mean why is this even such an issue? Other places where people talk
>> about programming languages don't seem to care if it's all caps,
>> first only capitalized, or all lowercase, or what have you. I've
>> seen Java, java, and JAVA, cpp, C++, c++, c, C, python, PYTHON,
>> cobol, Cobol, COBOL, and the list goes on.
>>
>> So why make such a stink about something so damn trivial?
>
> Programming requires attention to detail. Well, good programming
> does, anyway.
Yes, when _programming_, not with geenral petty conversations, such
responses as "it's Perl not perl or PERL" serve NO PURPOSE. Arguably
neither does this leg of the thread, but that because people like you
refuse to pull out your heads for some fresh air.
------------------------------
Date: Sun, 06 Apr 2008 02:12:14 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: perl should be improved and perl6
Message-Id: <x7iqyvn342.fsf@mail.sysarch.com>
>>>>> "VR" == V Ronans <v_r@spamless.and.happy> writes:
VR> xhoster@gmail.com wrote:
>> "V.Ronans" <v_r@spamless.and.happy> wrote:
>>> Dr.Ruud wrote:
>>>> jm schreef:
>>>>
>>>>> perl [...] is poorly typed
>>>>
>>>> By you? (Did you mean Perl by the way?)
>>>
>>> Honestly, you know full well he was talking about the programming
>>> language that pertains to this here news group, so feign ignorance? I
>>> mean why is this even such an issue? Other places where people talk
>>> about programming languages don't seem to care if it's all caps,
>>> first only capitalized, or all lowercase, or what have you. I've
>>> seen Java, java, and JAVA, cpp, C++, c++, c, C, python, PYTHON,
>>> cobol, Cobol, COBOL, and the list goes on.
>>>
>>> So why make such a stink about something so damn trivial?
>>
>> Programming requires attention to detail. Well, good programming
>> does, anyway.
VR> Yes, when _programming_, not with geenral petty conversations, such
VR> responses as "it's Perl not perl or PERL" serve NO PURPOSE. Arguably
VR> neither does this leg of the thread, but that because people like you
VR> refuse to pull out your heads for some fresh air.
oh please remove your own cranium from your rectum first. you don't seem
to be a regular here and misspelling perl is a common thing among
posters who also don't post according to this group's guidelines. it is
even covered in an FAQ why perl is not an acronym. yes, colloquially
perl and other langs can be in whatever case but seeing it wrong when it
can be corrected is not the crime you make it out to be. so get yourself
off this flame war now and shut up about it until you are someone who
regularly answers questions here. the rule is no bitching about how
others help here until you help regularly and well.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: 6 Apr 2008 03:28:50 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: perl should be improved and perl6
Message-Id: <Xns9A77DA829B319castleamber@130.133.1.4>
"V.Ronans" <v_r@spamless.and.happy> wrote:
> Dr.Ruud wrote:
>> jm schreef:
>>
>>> perl [...] is poorly typed
>>
>> By you? (Did you mean Perl by the way?)
>
> Honestly, you know full well he was talking about the programming
> language that pertains to this here news group, so feign ignorance? I
> mean why is this even such an issue? Other places where people talk
> about programming languages don't seem to care if it's all caps,
There are already plenty of people who think PERL is an acronym (it's
not), so "we" like to avoid PERL.
Moreover, Perl is the programming language, and perl is the executable,
hence there is a good reason to be case sensitive. Hence, perl [...] is
poorly typed seems to refer to the executable, hence Dr. Ruud's question.
--
John
http://johnbokma.com/perl/
------------------------------
Date: 6 Apr 2008 03:32:19 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: perl should be improved and perl6
Message-Id: <Xns9A77DB19CA0CFcastleamber@130.133.1.4>
"V.Ronans" <v_r@spamless.and.happy> wrote:
> Yes, when _programming_, not with geenral petty conversations, such
> responses as "it's Perl not perl or PERL" serve NO PURPOSE.
Yes they do:
A perl programmer is not the same as a Perl programmer.
A perl hacker is not the same as a Perl hacker.
And as I already wrote, PERL misleads people, they see PERL, and they
think it's an acronym.
I also use it as a quick way to see if someone knows what he/she is
talking about. Someone who claims to be a PERL programmer tells me that I
probably never want to maintain his/her code.
--
John
http://johnbokma.com/perl/
------------------------------
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 1423
***************************************