[15481] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2891 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 28 11:10:25 2000

Date: Fri, 28 Apr 2000 08:10:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <956934615-v9-i2891@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 28 Apr 2000     Volume: 9 Number: 2891

Today's topics:
        RESULT: comp.lang.ruby passes 200:16 <dave@dogwood.com>
    Re: running Windows program from perl script (Bart Lateur)
    Re: script help! <gellyfish@gellyfish.com>
    Re: Thread programming <rootbeer@redcat.com>
        URI-1.06 broken under Perl 5.6.0 on NT ajmayo@my-deja.com
    Re: use strict; isn't good enough <rootbeer@redcat.com>
    Re: using unix grep in a perl prog <andersen+@rchland.ibm.com>
    Re: what does this do? <tony_curtis32@yahoo.com>
    Re: what does this do? (Bart Lateur)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 28 Apr 2000 13:43:33 GMT
From: Dave Cornejo <dave@dogwood.com>
Subject: RESULT: comp.lang.ruby passes 200:16
Message-Id: <956929413.9394@isc.org>

                                RESULT
            unmoderated group comp.lang.ruby passes 200:16

There were 200 YES votes and 16 NO votes, for a total of 216 valid
votes.  There were 5 abstentions and 2 invalid ballots.

For a group to pass, YES votes must be at least 2/3 of all valid
(YES and NO) votes.  There must also be at least 100 more YES votes
than NO votes.

A five day discussion period follows this announcement.  If no
serious allegations of voting irregularities are raised, the
moderator of news.announce.newgroups will create the group shortly
thereafter.

Newsgroups line:
comp.lang.ruby		The Ruby dynamic OO programming language.

Voting closed at 23:59:59 UTC, 20 Apr 2000.

This vote was conducted by a neutral third party.  Questions
about the proposed group should be directed to the proponent.

Proponent: Conrad Schneiker <schneiker@jump.net>
Votetaker: Dave Cornejo <dave@dogwood.com>

RATIONALE: comp.lang.ruby

Ruby is a very-high-level, dynamic object oriented programming language.
Ruby provides many of the best-liked power and convenience features of Perl
and Python on one hand, with an elegantly simple and powerful syntax that
was partly inspired by Eiffel and Ada on the other hand.  Ruby is a more
thoroughly objected oriented language than Python, and some Ruby features
were inspired by Smalltalk. Ruby is an open source language.

There are over 1000 members of 4 Japanese Ruby mail lists (general,
developers, math, extension writers), with a peak volume topping 100
messages per day. At present, there is one English Ruby mail list with
about 175 members, with a recent volume often exceeding 10 messages per
day and growing.  Many users of the Japanese Ruby mail lists have some
understanding of English and are also prospective comp.lang.ruby users
as well.

Much of 1999's newsgroup discussion of Ruby took place on comp.lang.python,
which is not optimal, since comp.lang.python is dedicated to the Python
language. For obvious reasons, Ruby users do not post there frequently. In
2000, most Ruby discussion has occurred in comp.lang.misc. This again is not
ideal since other comp.lang.misc regulars are typically more interested in
issues that transcend Ruby, and have said as much.

In Japan, Ruby has overtaken Python in terms of popular usage. During 1999
and into early 2000, Ruby has been featured in several articles in the
English language software trade press, indicating it is at the takeoff
threshold that Perl and Python attained years ago.  (Please see
http://www-4.ibm.com/software/developer/library/ruby.html for the latest
example.) The English language Ruby home page is
http://www.ruby-lang.org/en/, which provides links to documentation and
download pages for Ruby.

CHARTER: comp.lang.ruby

The comp.lang.ruby newsgroup is devoted to discussions of the Ruby
programming language and related issues.

Examples of relevant postings include, but are not be limited to,
the following subjects:

- Bug reports
- Announcements of software written with Ruby
- Examples of Ruby code
- Suggestions for Ruby developers
- Requests for help from new Ruby programmers

The newsgroup is not moderated.  Binaries are prohibited (except the
small PGP type). Advertising is prohibited (except for announcements
of new Ruby-related products).

END CHARTER.


comp.lang.ruby Final Voter list

Voted YES
-------------------------------------------------------------------------------
andy#research.canon.com.au                                          Andy Newman
joandvan#ihug.com.au                                                   joandvan
alxx#tig.com.au                                                              al
jim_g#tig.com.au                                                            Jim
p.fuller#student.murdoch.edu.au                                     Paul Fuller
geldridg#progsoc.uts.edu.au                                      Geoff Eldridge
toivo#ucs.uwa.edu.au                                              Toivo Pedaste
gcross#netspace.net.au                                             Graeme Cross
doctor#doctor.nl2k.ab.ca                                          Dave Yadallee
trevort#vianet.on.ca                                             Trevor Tymchuk
MSteed#altiris.com                                                   Mike Steed
ml#au.com                                                       Mike Linksvayer
kimdv#best.com                                                     Kim DeVaughn
dgoodger#bigfoot.com                                              David Goodger
jcm#bigskytel.com                                                  David Porter
Eric.Peterson2#PSS.Boeing.com                                     Eric Peterson
Makoto.Nakagawa#jp.compaq.com                                   Nakagawa Makoto
fenghou#erols.com                                         Jack Hou</FONT></DIV>
julesd#erols.com                                                   Jules Dubois
smlucas#famvid.com                                                 Steven Lucas
emile#fenx.com                                                Emile van Sebille
mzadka#geocities.com                                                Moshe Zadka
Henry#hdsSystems.com                                            Henry Schneiker
SchaeferFFM#hotmail.com                                         Oliver Schaefer
thucdat#hotmail.com                                                  Dat Nguyen
tetsu#jpn.hp.com                                               Tetsuya WATANABE
gnhurst#hurstlinks.com                                             Guy N. Hurst
sullivan#Mathcom.COM                                             Steve Sullivan
petelyons#mindspring.com                                             Pete Lyons
Taka.Adachi#msdw.com                                            Takanori Adachi
tim_one#email.msn.com                                                Tim Peters
jolomo#netcom.com                                                   Joey Morris
tgm#netcom.com                                             Thomas G. McWilliams
Ralph.Amissah#operamail.com                                       Ralph Amissah
tseaver#palladion.com                                               Tres Seaver
apter#panix.com                                                    stevan apter
Tbone#pimpdaddy.com                                               Tushar Samant
jimrtex#pipeline.com                                                  Jim Riley
wknaka#pobox.com                                                   Wes Nakamura
wang#rjka.com                                                       Huayin Wang
jbauer#rubic.com                                                     Jeff Bauer
chris.browne#sabre.com                                       Christopher Browne
takaaki.higuchi#Japan.Sun.COM                                   Takaaki Higuchi
peter#taronga.com                                                Peter da Silva
Dave#Thomases.com                                                   Dave Thomas
juliet#thomases.com                                               Juliet Thomas
andy#Toolshed.Com                                                   Andrew Hunt
ellie#Toolshed.Com                                               Ellie Callahan
joe31416#voicenet.com                                                 Joe Myers
Abhay.Natu#wcom.com                                                  Abhay Natu
xanthian#well.com                                               Kent Paul Dolan
rascproponents#yahoo.com                                       Brian P. Sweeney
wpostma#ztr.com                                 <SPAN class=485464314-31032000>
mrilu#ale.cx                                                              mrilu
mertz#gnosis.cx                                                     David Mertz
Juergen.Cohrs#alcatel.de                                          Juergen Cohrs
Ekkehard.Uthke#gmx.de                                            Ekkehard Uthke
peter.sommerfeld#gmx.de                                        Peter Sommerfeld
burow#ifh.de                                      Burkhard D. Steinmacher-Burow
sn#neopoly.de                                                      Sven Neuhaus
vote-de#kholdan.snafu.de                                            Tobias Erle
Walter.Zettel#t-online.de                                         Walter Zettel
bouvin#daimi.au.dk                                            Niels Olof Bouvin
jpsecher#diku.dk                                              Jens Peter Secher
quinn#groat.ugcs.caltech.edu                                       Quinn Dunkan
cjc26#cornell.edu                                                Cliff Crawford
adam#mlug.missouri.edu                                             Adam Procter
neelk#alum.mit.edu                                            Neel Krishnaswami
behrends#cse.msu.edu                                            Reimer Behrends
shippy#cs.nmt.edu                                                  Jeff Shipman
rcl211#is9.nyu.edu                                             Robert C Linwood
graham#ccs.ucsb.edu                                               Graham Hughes
reic0024#d.umn.edu                                              Aaron J Reichow
uscfadsl#ds.cesga.es                                             David S de Lis
hcjake#cs.hut.fi                                                Jaakko Vayrynen
decoux#moulon.inra.fr                                                Guy Decoux
dcalvelo#pharion.univ-lille2.fr                                  Daniel Calvelo
drew.mcdowell#msfc.nasa.gov                                  Andrew D. McDowell
legradi#alpha1.obuda.kando.hu                                     Gabor Legradi
ariels#compugen.co.il                                           Ariel Scolnicov
masato#csys.ce.hiroshima-cu.ac.jp                                 Masato KIYAMA
gotoken#math.sci.hokudai.ac.jp                                     GOTO Kentaro
masa#koala.astro.isas.ac.jp                                     Masahiro Tanaka
thitoshi#ne.scphys.kyoto-u.ac.jp                              TAKAHASHI Hitoshi
nagai#ai.kyutech.ac.jp                                          Hidetoshi NAGAI
sinara#blade.nagaokaut.ac.jp                                   Shin-ichiro HARA
ogino#coop.nagoya-u.ac.jp                                         Mitsuru Ogino
naosone#naruto-u.ac.jp                                               Naoto SONE
ohdachi#nifs.ac.jp                                              Satoshi Ohdachi
washizu#kkc1.c.u-tokyo.ac.jp                                    Hitoshi Washizu
fukusima#goto.info.waseda.ac.jp                                Masaki Fukushima
igarashi#ueda.info.waseda.ac.jp                                Hiroshi Igarashi
os#iij.ad.jp                                                      OHARA Shigeki
ksasaki#kddnet.ad.jp                                                 Kan Sasaki
Taiji.Can#atesoft.advantest.co.jp                                     Taiji Kan
suenaga#birds.co.jp                                            SUENAGA Tomohiro
p95#brain-tokyo.co.jp                                             Taku Nakajima
kimura#sqa.canon.co.jp                                            KIMURA Koichi
fit0298#fitec.co.jp                                              ARIMA Yasuhiro
inoue#ftv.co.jp                                                    Hirosi Inoue
ogi#open.nm.fujitsu.co.jp                                      Takayuki Ogihara
tachino#open.nm.fujitsu.co.jp                                  Tachino Nobuhiro
uno#open.nm.fujitsu.co.jp                                            Shunji Uno
ito#htk.hitachi-cable.co.jp                                       Ito Kazumitsu
kyamada#hitachi-densa.co.jp                                        Yamada Kenji
agawa#tir.hitachi-sk.co.jp                                          Norio Agawa
mt#izu.co.jp                                                   Masato Toyoshima
taca#kyoto.jepro.co.jp                                           Takahiro Kambe
Shinichi_Hiramoto#justsystem.co.jp                           HIRAMOTO Shin-ichi
kitamura#jzf.co.jp                                              Mikiya Kitamura
sa-sakamoto#kddwinstar.co.jp                                  Sadayuki Sakamoto
hide#lisa.co.jp                                                  Hideyuki Ezaki
inouesin#pic.melco.co.jp                                         Shinichi Inoue
kima#np.bs1.fc.nec.co.jp                                            KIMATA Isao
h_inoue#netlab.co.jp                                              Hiroshi Inoue
matz#netlab.co.jp                                            Yukihiro Matsumoto
shugo#netlab.co.jp                                                  Shugo Maeda
kondo#nik-prt.co.jp                                             Mitsuhiro Kondo
hmorita#ohmsha.co.jp                                             Hisashi Morita
adachi#tpegasus.lab.okidata.co.jp                                    Jun Adachi
miyagawa#sanritz.co.jp                                         Seiichi Miyagawa
komatsu#sarion.co.jp                                          Katsuyuki Komatsu
thata#net.sony.co.jp                                         Takashi Hatakeyama
tamori#sm.sony.co.jp                                            Hirofumi Tamori
kanematu#sra.co.jp                                              Daiji KANEMATSU
aoki#technoa.co.jp                                                Hirotaka AOKI
kawata#titan.co.jp                                              Masahiro Kawata
anakata#vector.co.jp                                               Ataru NAKATA
hengsu#winningrun.co.jp                                              HengSu Kim
takagi#etl.go.jp                                               Hiromitsu Takagi
irie#hri.pref.hokkaido.jp                                                  Yuji
simtak#mua.biglobe.ne.jp                                        Takashi Shimizu
junji999#mud.biglobe.ne.jp                                      Junzi TAKAHASHI
kyano#mva.biglobe.ne.jp                                              YANO Kyoji
ikarashi#d3.dion.ne.jp                                           IKARASHI Akira
marutomo#jade.dti.ne.jp                                          INOUE Tomoichi
masao-k#a-net.email.ne.jp                                        金光雅夫
kai#star.email.ne.jp                                             Kazuhiko IZAWA
ymsd#ns.m-net.ne.jp                                               Yuichi Masuda
nnakamur#mxq.mesh.ne.jp                                      Noritsugu Nakamura
nobu.nakada#nifty.ne.jp                                        Nobuyoshi Nakada
felio#peanet.ne.jp                                           YAMASHIRO Shunsuke
greentea#fa2.so-net.ne.jp                                     Tomoyuki Kosimizu
tomokazu#pc4.so-net.ne.jp                                   MATSUSHIMA Tomokazu
toshirok#yb3.so-net.ne.jp                                      Toshiro Kuwabara
ozawa#mba.sphere.ne.jp                                             Makoto Ozawa
wakou#fsinet.or.jp                                                 Wakou Aoyama
earth#hokuto7.or.jp                                        Hisashi Wakai(earth)
shoch#jsdi.or.jp                                                  Shoichi OZAWA
ogochan#linux.or.jp
platypus#a1.mbn.or.jp                                          Yoshinori Tahara
kaneoka#grn.mmtr.or.jp                                           KANEOKA Shinji
noroi#mob.or.jp                                                     IKEDA Kenji
aygoofy#kt.rim.or.jp                                           Akihiro Yamauchi
hisashim#kt.rim.or.jp                                         hisashi y. morita
tadf#kt.rim.or.jp                                              Tadayoshi Funaba
inaba#st.rim.or.jp                                                 Inaba Hiroto
hattori#ppp.upload.or.jp                                        Masashi Hattori
Suketa<CQN02273#nifty.ne.jp>                                      Masaki Suketa
h.fulton#att.net                                                     Hal Fulton
jaredr#bellsouth.net                                           jared richardson
n8gray#earthlink.net                                             Nathaniel Gray
rzimmerle#earthlink.net                                         Robert Zimmerle
kikutani#galaxy.net                                            Kikutani, Makoto
c.hintze#gmx.net                                                 Clemens Hintze
d.hintze#gmx.net                                                    Dirk Hintze
jmh#gmx.net                                                            Jan Haar
shrogers#ionet.net                                             Steven H. Rogers
schneiker#jump.net                                             Conrad Schneiker
MAP2303#mapletown.net                                             Daisuke Kanda
franke#meso.net                                                   Stefan Franke
cartisan#pacwestracing.net                                          Neal Cappel
edwards#rahul.net                                               Gregory Edwards
evert#royal.net                                                Evert Meulie esq
cind0revs#toadmail.toad.net                                     Arthur J Mongan
scarblac-rt#pino.selwerd.nl                                       Remco Gerlich
boud#rempt.xs4all.nl                                            Boudewijn Rempt
kai.andresen#chello.no                                             Kai Andresen
jaj39#student.canterbury.ac.nz                                   J Alan Jackson
John_David_Galt#acm.org                                         John David Galt
perin#acm.org                                                       Lewis Perin
sferris#acm.org                                                 Scott M. Ferris
darkskyz#cyberspace.org                                           Tomer Brisker
crouton#duelists.org                                               OZAWA Sakuro
quinet#gamers.org                                                Raphael Quinet
imain#gtk.org                                                          Ian Main
h_inoue#hi-fun.org                                                   Hiro Inoue
koyama#hoge.org                                                  KOYAMA Tetsuji
jc#joerch.org                                                    Jvrg Czeranski
t#kondara.org                                                      Toru Hoshina
mentifex#scn.org                                               Arthur T. Murray
larry#smith-house.org                                               Larry Smith
dave#technopagan.org                                             David E. Smith
ysjj#unixuser.org                                               Junji Yamashita
wormboyslim#wiggly.org                                             Nigel Rantor
mak#mikroplan.com.pl                                        Grzegorz Makarewicz
qrczak#knm.org.pl                                     Marcin 'Qrczak' Kowalczyk
hgs#dmu.ac.uk                                                        Hugh Sasse
james#obeah.demon.co.uk                                             James Coupe
bill#xencat.co.uk                                              William Boughton

Voted NO
-------------------------------------------------------------------------------
yan#storm.ca                                                  Yves Bellefeuille
ru#cls.usask.ca                                                     Ru Igarashi
stainles#bga.com                                                   Dwight Brown
mcclenon#erols.com                                                 Bob McClenon
gprrspw#mindspring.com                                                G.P. Ryan
rootbeer#redcat.com                                                 Tom Phoenix
pimentel#ultranet.com                                                J Pimentel
Thilo.Ernst#gmd.de                                                  Thilo Ernst
naddy#mips.rhein-neckar.de                                 Christian Weisgerber
rick#bcm.tmc.edu                                              Richard H. Miller
4ws#gibsoncounty.net                                                 Kurt Weber
mmontcha#OregonVOS.net                                       Matthew Montchalin
denebeim#deepthot.org                                              Jay Denebeim
sthoenna#efn.org                                        Yitzchak Scott-Thoennes
phd#sun.med.ru                                                   Oleg Broytmann
chriseb#ukshells.co.uk                                           Chris Ebenezer

Abstained
-------------------------------------------------------------------------------
chris#kzim.com                                      Christopher Robin Zimmerman
sleepy#os.com                                                 Alexander Pennace
r.vanette#pink.nl                                           Robert-Jan van Ette
james#sfgiants22.freeserve.co.uk                                   James Farrar
merlin#netlink.co.uk                                            Darren Wyn Rees

Invalid ballots
-------------------------------------------------------------------------------
mntsui#netvigator.com                                             tsui man ngar
    ! No vote statement in message
mjd#plover.com
    ! No vote statement in message


To restore the email addresses above, pipe the ack list through the
following command:

    sed -e 's/#/@/g'

-- 
Voting question & problems: Dave Cornejo <dave@dogwood.com>
Voting address: vote@dogwood.com


------------------------------

Date: Fri, 28 Apr 2000 14:12:12 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: running Windows program from perl script
Message-Id: <390c9b7b.2578399@news.skynet.be>

colardelle@my-deja.com wrote:

>I would like to run Windows
>programs (ie NOTEPAD) from a Perl script.

various ways:

	system 'notepad';
	exec 'notepad';	# Perl script stops here
	system 'start', 'somefile.txt';

The last one is cute. It will use the 'start' program to launch a file
as if it was doubleclicked. Cuter still: if the argument for 'start' is
a directory, this will open a window for this directory.

Happy experimenting.

-- 
	Bart.


------------------------------

Date: Fri, 28 Apr 2000 13:47:12 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: script help!
Message-Id: <ADgO4.1503$fT4.151190@news.dircon.co.uk>

On Fri, 28 Apr 2000 13:02:02 GMT, Someone Special Wrote:
> On Thu, 27 Apr 2000 16:21:07 -0400, tadmc@metronet.com (Tad McClellan)
> wrote:
> 
>>On Wed, 26 Apr 2000 12:41:35 GMT, Someone Special <info@nowhere.com> wrote:
>>>On Tue, 25 Apr 2000 14:52:04 -0700, Tom Phoenix <rootbeer@redcat.com>
>>>wrote:
>>>
>>>>On Tue, 25 Apr 2000 dreiger@rnci.com wrote:
>>>>
>>>>> Subject: script help!
>>>>
>>>>> I am NOT any kind of programmer
>>>>
>>>>So, do you want to become a programmer, or to hire one? If you're looking
>>>>to become one, perhaps you should search for an introductory course on
>>>>programming. If you'd like to hire one, there are many newsgroups with
>>>>'jobs' in their names, or you could just visit your local Perl Mongers.
>>>>
>>>I think you missed the point - 
>>
>>
>>No, *you* have missed the point!
>>
>>If we do your work for you, then you should send us your paycheck.
>>
> 	Please don't take this as a personal attack, or flame, but...
> 
> 	Rant mode on:
> 
> 	Ok, fine.  Show me the exact line that askes the group to
> rewrite this script.

Er.

>>>>>                           I can't figure out how to get this to loop,
>>>>> so it generates my report for all "clients" instead of the last one on
>>>>> the list....

Then you posted the whole program.

/J\


------------------------------

Date: Fri, 28 Apr 2000 06:46:18 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Thread programming
Message-Id: <Pine.GSO.4.10.10004280644000.21722-100000@user2.teleport.com>

On Fri, 28 Apr 2000, Doe wrote:

> I'm developing a spider and would like to launch concurrent processes
> fetching web pages from the internet, 

Sounds as if you could use LWP::ParallelUA, which would let you avoid the
worries of threading and the worries of forking at the same time.

    http://search.cpan.org/search?dist=ParallelUserAgent

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: Fri, 28 Apr 2000 14:28:01 GMT
From: ajmayo@my-deja.com
Subject: URI-1.06 broken under Perl 5.6.0 on NT
Message-Id: <8ec74q$tkm$1@nnrp1.deja.com>

Building URI-1.06 (latest version) having built Perl 5.6.0 cleanly on
WinNT4 SP6,

nmake test fails with

bless( do{\(my $o = 'file://C:/TEMP/')}, 'URI::file' )], 'URI::URL' );
Test Failed at t\old-base.t line 22
        URI::URL::_expect('file://C:/TEMP/', 'as_string',
 'file:C%3A/TEMP/') called at t\old-base.t line 675

This looks worryingly like something to do with the new Unicode stuff.
Last version of Perl I built URI on was 5.005_03, where there were no
problems. This has brought my mod_perl install on NT to a screeching
halt.

I could probably patch this problem but it worries me that this is
failing now under the supposedly latest 'stable' perl release. I am
wondering what else is gonna break in the various modules I normally
compile to build a full mod_perl. At the point of failure I had already
built HTML-Parser,CGI.pm,Mime::Base64 without any obvious problems. URI
is next on my normal sequence - I've done this several times before and
this is the first failure I've had.


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Fri, 28 Apr 2000 08:04:34 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: use strict; isn't good enough
Message-Id: <Pine.GSO.4.10.10004280757180.21722-100000@user2.teleport.com>

[ Courtesy copy sent by e-mail. ]

On Wed, 26 Apr 2000 dwb1@home.com wrote:

> Is there a way to get perl to validate function calls on execution?

There's some support for doing this with the B::Lint module, if your perl
is recent enough:

    perl -MB::Lint -e '$x = lenght($y);'
    Undefined subroutine &main::lenght called at -e line 1.

But a pragma to help facilitate this check could be useful, too, although
it would probably cause a small delay at the start of runtime. (Interested
parties: Yes, AUTOLOADed subs would be an issue. :-)

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: Fri, 28 Apr 2000 07:59:55 -0500
From: "Paul R. Andersen" <andersen+@rchland.ibm.com>
Subject: Re: using unix grep in a perl prog
Message-Id: <39098B4B.2CC1A53A@rchland.ibm.com>

borg wrote:

> Is it possible to get the line breaks when using UNIX grep in a perl
> program?  I have this in a program but I cannot seem to get the line
> breaks when returned through a CGI:
>
> $result=`grep -l $variable_name *.txt `;
>
> Is there a way I can use this and return to a variable or an array so
> that there are line breaks after each positive match?
>
> thanks,
> Peter

Since you are doing this in a cgi, I assume you plan to display $result
by embeding it in a page you are creating.  Recall that HTML doe not
give a hoot about new line characters (\n).  Something along the lines
of $result =~ s/\n/<br>/; will be needed to change the newlines in
$result to something usefull in HTML.

--
Paul Andersen
-- I can please only ONE person per day.
-- Today is NOT your day.
-- Tomorrow isn't looking good either.





------------------------------

Date: 28 Apr 2000 08:21:55 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: what does this do?
Message-Id: <87vh12mkcs.fsf@shleppie.uh.edu>

>> On Fri, 28 Apr 2000 13:13:48 +0100,
>> rich <R.C.Home@ncl.ac.uk> said:

> Can anyone give me some info on this instuction..?
> $value =~ s/%(..)/pack("C", hex($1))/eg;

It decodes URL-encoded characters, e.g. %20, to whatever
character that represents (SPACE in this case).

Using the CGI.pm module (perldoc CGI) saves you having to
bother with putting stuff like this into your code.
Hand-coding of such CGI decoding usually brings in
potential buffer-overflows and security problems, not to
mention cluttering the solution with the problem.

hth
t


------------------------------

Date: Fri, 28 Apr 2000 14:08:47 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: what does this do?
Message-Id: <390b99ac.2115051@news.skynet.be>

rich wrote:

>Can anyone give me some info on this instuction..?
>
>$value =~ s/%(..)/pack("C", hex($1))/eg;

This will match all occurences of "%" followed by two hex digits
(actually, it will match anything. We just hope it's two hex digits.)
For each match, $1 will be set to this string of two characters. And
then:

	hex($1) 	will attempt to interpret it as a hexadecimal
			number

	pack "C", $number	is Perl4-ism for chr($number)
				i.e. convert number to character

Now, the options:

	//e	execute the right side as perl code
	//g	don't stop at one, but repeat for all matches

Example: matching "%2F"
  * $1 is set to "2F"
  * hex('2F') will turn this into the number 47,
  * pack("C", 47) turns this into the character "/".

-- 
	Bart.


------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 2891
**************************************


home help back first fref pref prev next nref lref last post