[22914] in Perl-Users-Digest
Perl-Users Digest, Issue: 5134 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 25 09:10:44 2003
Date: Wed, 25 Jun 2003 06: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)
Perl-Users Digest Wed, 25 Jun 2003 Volume: 10 Number: 5134
Today's topics:
RESULT: comp.databases.berkeley-db passes 266:4 <dave@technopagan.org>
Re: search for messages in large files <mgjv@tradingpost.com.au>
Re: serial input _and_ time of day based tasks? <tzz@lifelogs.com>
Re: soap::lite hellp needed with sms <mike_solomon@lineone.net>
Re: soap::lite hellp needed with sms <mike_solomon@lineone.net>
Re: Surprised by read() (Jay Tilton)
Re: Too greedy, my "\d+" (MF)
Re: Too greedy, my "\d+" (Sam Holden)
Using Formats and stopping between pages (Crixx)
Re: Using Formats and stopping between pages (Sam Holden)
Re: using SOAP::Lite to call other services. (Bryan Castillo)
Re: Win32::OLE, Excel, and coloring (Jay Tilton)
Re: Win32::OLE, Excel, and coloring <bwalton@rochester.rr.com>
Re: Write line at beginning of file? (Tad McClellan)
Re: Write line at beginning of file? <nobull@mail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 24 Jun 2003 22:47:50 -0700
From: David E. Smith <dave@technopagan.org>
Subject: RESULT: comp.databases.berkeley-db passes 266:4
Message-Id: <1056520070.15568@isc.org>
RESULT
unmoderated group comp.databases.berkeley-db passes 266:4
There were 266 YES votes and 4 NO votes, for a total of 270 valid votes.
There were 5 abstains and 7 invalid ballots.
For group passage, YES votes must be at least 2/3 of all valid (YES and
NO) votes. There also must be at least 100 more YES votes than NO votes.
There is a five day discussion period after these results are posted. If
no serious allegations of voting irregularities are raised, the moderator
of news.announce.newgroups will create the group shortly thereafter.
Newsgroups line:
comp.databases.berkeley-db The Berkeley DB libraries.
Voting closed at 23:59:59 UTC, 24 Jun 2003.
This vote was conducted by a neutral third party. Questions about the
proposed group should be directed to the proponent.
Proponent: Philip Greer <philip@tildesoftware.com>
Proponent: Dave Segleau <dave@sleepycat.com>
Votetaker: David E. Smith <dave@technopagan.org>
RATIONALE: comp.databases.berkeley-db
There is not a specific Usenet location for discussions on berkeley
database management software (from this point forward I'll refer to as
just 'berkeley-db'). Discussion pertaining to the library occurs on
many other other Usenet forums. Often writings are specific to
berkeley-db itself and does not pertain to the subject matter of the
group the discussion falls within. Not only would a berkeley-db
specific forum provide a central location for todays frequent Usenet
users, it would also provide an on-line research tool for those
seeking on-line issue assistance with the library. Entities such as
Google will provide archives of group postings, and search tools for
those seeking answers to berkeley-db questions - drawing those on-line
that were not aware of the Usenet group (or of net news as a whole).
>From the "Berkeley DB Reference Guide: Introduction": '[berkeley-db]
runs under almost all UNIX and Linux variants, Windows, and a number
of embedded real-time operating systems. It runs on both 32-bit and
64-bit systems. It has been deployed on high-end Internet servers,
desktop machines, and on palmtop computers, set-top boxes, in network
switches, and elsewhere.' As well, berkeley-db has been a tool
available to the programming community for over ten years and
is used on a global scale with over 200 million installations. The
need for an on-line, central location for community discussions has
been long standing. Usenet is the best tool to fulfill this need and
allows addressing this need on a global scale.
CHARTER: comp.databases.berkeley-db
The newsgroup comp.databases.berkeley-db is a news forum devoted to
the discussion of the berkeley database management library. Discussion
entails, but is not limited to: its usage in all programming languages
that can utilize it, bugs, patches, tricks, techniques, support,
announcements; all in a free and open atmosphere.
All postings should be in ordinary text format only. Postings of
binaries (or encoding thereof) is highly discouraged. Cross-posting of
articles irrelevant to the berkeley database library is also
discouraged. The berkeley-db newsgroup is not moderated. Therefore it
is up to the global user base to police its usage.
END CHARTER.
comp.databases.berkeley-db Final Vote Ack
Voted Yes
------------------------------------------------------------------------------
a.w~quirxi.com arno
a~totic.org Aleksandar Totic
aahz~pythoncraft.com Aahz
ab~pact.srf.ac.uk Andrea Barbieri
acarter24~hotmail.com Andrew Carter
acbell~iastate.edu Andrew Bell
adalke~mindspring.com Andrew Dalke
aj~dungeon.inka.de Andreas Jellinghaus
akeller~inform.ch Alfred Keller
akuchlin~amk.ca A.M. Kuchling
alan_ralph~ntlworld.com Alan Ralph
alazarov~trudipravo.bg Asen Lazarov
alexbradley~btinternet.com Alex
allison~shasta.stanford.edu Dennis Allison
anthony~interlink.com.au Anthony Baxter
astjean~positron911.com Andre St-Jean
asu1~cornell.edu A. Sinan Unur
baker~netwe.st Mark Baker
bammi~memento-inc.com Jwahar Raju Bammi
barry~python.org Barry Warsaw
bas.driessen~xobas.com Bas Driessen
belal~sco.com Bela Lubkin
bgusenet~bacchae.f9.co.uk Bill Godfrey
bill~zettabyte.net Bill McGonigle
billfischer~visi.com Bill Fischer
bob~cave.org Robert Wilkins
bobjones666~supanet.com Bob Jones
bouvin~daimi.au.dk Niels Olof Bouvin
bryanb~webbtide.com Bryan Buchanan
buff~pobox.com William Denton
bv~wjv.com William J. Vermillion
bwhipple~prosrm.com Brian Whipple
c.d.b-db~lelandwoodbury.com Leland Woodbury
carol~sleepycat.com Carol Sandstrom
carp~theworld.com Bill Carpenter
casterln~nature.Berkeley.EDU Gary Casterline
cavery~averyweb.net Chris Avery
charbel.haddad~jinny.ie Charbel
chetan_narsude~yahoo.com Chetan Narsude
Chris.Webb~services.fujitsu.com C J Webb
chris~mainecoon.com Chris Kennedy
ChrisN~valvesoftware.com Chris Newcombe
christopher.small~sun.com Christopher Small
chris_song~yahoo.com Chris Song
cimarron~taylors.org Cimarron Taylor
cjs2~cam.ac.uk Chris Sendall
ckarasinir~yahoo.com Cihan Karasinir
cochranb~speakeasy.net Robert Cochran
colin~colina.demon.co.uk Colin Adams
condit~isri.unlv.edu Allen Condit
crv004~email.mot.com Ray Van Tassle
CWorkman~laserdyneprima.com Conrad Zero
dacostamartins~agere.com Iolanda da Costa Martins
dale.dasker~esolpartners.com Dale Dasker
dan.hatfield~eds.com Dan Hatfield
daniel.dudley~chello.no Daniel L. Dudley
Daniel~lrt.be Daniel Drabkin
dave~mindreef.com Dave Seidel
dave~sleepycat.com David Segleau
davep~davep.org Dave Pearson
david~farrar.com David Farrar
dc~panix.com David W. Crawford
dc~samizdat.org David=20
dcamp~ufl.edu Christian Campbell
dda~world.std.com Donald Anderson
Debroux~sri.ucl.ac.be Philippe Debroux
demme~pobox.com David Emme
devin~thecabal.org Devin L. Ganger
devnull~vianet.ca Trevor Tymchuk
dfrost~maths.tcd.ie Dermot Frost
dgerard~lakedalelink.net Duane D.
dmh~dmh.org.uk Dave H
dmlloyd~tds.net David M. Lloyd
downbythesea~yahoo.com Bill Parrott
dradul~yahoo.com A. Lopez-Valencia
dviner~yahoo-inc.com Dave Viner
eeb~binary.com Ed Buchwalter
egleston~yahoo.com Brian T. Egleston
ego~kc.chance.cz Egon Eckert
Ekkehard~Uthke.de Ekkehard Uthke
ellis~spinics.net Rick Ellis
ericz~indigod.com Zidovec, Eric
fabrice.bacchella~synaptique.com Fabrice Bacchella
fedorova~eecs.harvard.edu Alexandra Fedorova
ferric~xanthia.com Thomas H Jones II
fluffy~inpharmatica.co.uk Martyn J. Pearce
franck.thales~wanadoo.fr Franck T.
francus~yossi.com Francus
fred~mail.bytesforall.org Frederick Noronha
fromzero2002~sohu.com Shihui Luo
fungus~OCF.Berkeley.EDU Hank Fung
fwbrown~bellsouth.net Wayne Brown
gbs~k9haven.com George B. Smith
gdb~dbSystems.com G. David Butler
gerard.nicol~tapetrack.com Gerard Nicol
gerry~pathtech.org G. Singleton
ggw~wolves.durham.nc.us Gregory Woodbury
ghutchis~wso.williams.edu Geoffrey Hutchison
gknowles~Centor.com Glen Knowles
glouis~dynamicro.on.ca Greg Louis
gmills~library.berkeley.edu Garey Mills
goody_wang~tornado.com.tw Goody Wang
gp~familiehaase.de Gerrit P. Haase
harder~ifa.au.dk Jesper Harder
henry~perftech.com Henry Donzis
henry~spsystems.net Henry Spencer
HighestPub~BTInternet.com John Marquess
hparker~homershut.net Homer Parker
hunger~hitech.com Henry P. Unger
i-am-sergey~mail.ru Sergey Kornuhin
i.thierack~iwt-promotion.net Ingo Thierack
iddog~actimize.com Iddo =
igor.bujna~maxi-tip.cz Bujna Igor
jbritain~cox.net Jim Britain
jcea~argo.es Jesus Cea Avion
jeffh~chartermi.net Jeffrey Horn
Jenda~Krynicky.cz Jenda Krynicky
jgd~lanl.gov Jerry DeLapp
jleffler~earthlink.net Jonathan Leffler
jmacd~google.com Joshua P. MacDonald
jnews~prbh.org Jacob News
joe+usenet~sunstarsys.com Joe Schaefer
joe~jolomo.net Joe Morris
john~iastate.edu John Hascall
john~mitre.org John Burger
John_Ciarlante~nmss.com John Ciarlante
johs~copyleft.no Johannes Grødem
jonah.spam~schwartzdev.com Jonah
jorge.martin-de-nicolas~voxpath.com Jorge Martin-de-Nicolas
jscheib~Insight.com Jeffrey P. Scheib
jschueler~tqis.com Jim Schueler
julesd~erols.com Jules Dubois
Justin.Zaglio~morganstanley.com Justin Zaglio
jwin~onlinehome.de 1596-356~onlinehome.de
kai-vote-cdb~khms.westfalen.de Kai Henningsen
karl~freefriends.org Karl Berry
ken~globalremit.com Ken Lalonde
kkrueger~whoi.edu Karl A. Krueger
kmb1~hellespont.com Michael B. Kennedy
krisztian.litkey~multixfin.fi Krisztian Litkey
larson~geminimobile.com Jim Larson
Lee.Stiles~marconi.com Lee Stiles
lew~perftech.com Lewis Donzis
lewart~uiuc.edu Daniel S. Lewart
lizzy~soggytrousers.net Elizabeth Barham
lmorris~servergraph.com Mr. Lindsay Morris
lneumann~webct.com Lance Neumann
lothar~netpioneer.de Lothar Märkle
lrjohns1106~msn.com Leighton Johnson
luke~tokensoft.net Luke Matkins
maltchevski~yahoo.com Maxim Maltchevski
manoel_sa~yahoo.com Manoel Sá
mao~sleepycat.com Michael A. Olson
marc~mit.edu Marc Horowitz
mark~greybird.com Mark Hayes
martin~v.loewis.de Martin v. Löwis
matsc~sics.se Mats Carlsson
matt.cownie~coppereye.com Matt Cownie
matthias.andree~gmx.de Matthias Andree
mcrump~leadscope.com Crump, Michael
mench~mench.com Paul J. Menchini
merengue~tiscali.it merengue
MGanti~siac.com Murthy Ganti
mhunter~atlantic.net Rob Maxwell
Michael.Junkin~Creo.com Michael Junkin
minceme~start.no Vlad Tepes
mj~kom.auc.dk Michael Bohl Jenner
mjc~sleepycat.com Michael Cahill
mjohnson~quickcut.com.au Martin Johnson
mkc+dated+1055909256.e85dc8+dated+1055909287.6a0672~mathdogs.com Mike Colem
mmansour~agentissoftware.com Mark Mansour
mosher~xacct.com Moshe Recanati
muir~idiom.com David Sharnoff
mycroft~actrix.gen.nz Paul Foley
n03w24+Markus.Kuhn~cl.cam.ac.uk Markus Kuhn
nairtech~cox.net Ken Nair
najlae_idrissi~yahoo.fr Idrissi Najlae
nick~usenix.org Nick Stoughton
no.spam~kolumbus.fi Vesa Karjalainen
norikoyasuo~netscape.com Noriko Hosoi
NStopak~orionsci.com Noam Stopak
nvoutsin~noc.uoa.gr Voutsinas Nikos
or~actimize.com Or Peles
palmer~eecs.harvard.edu Chris Palmer
pan~syix.com Pan
partek~yahoo.com David Anderson
paul.hirst~codescape.com Paul Hirst
Paul.Marquess~btinternet.com Paul Marquess
paul~vix.com paul vixie
peter~plasm.com Peter Broadwell
pgiorgilli~theage.fairfax.com.au Peter Giorgilli
philip~tildesoftware.com Philip Greer
psmyth~gmx.net Peter Smyth
R.vanHouten~math.uu.nl Rudi van Houten
ray~holmwood.u-net.com ray trzaska (rayktrz)
rbemadsl~xs4all.nl Ron van Bemmelen
rhare~xpresschex.com Robert Hare
richard~guyy.demon.co.uk Richard Guy
richard~rswheeldon.com Richard Wheeldon
rick~bcm.tmc.edu Richard Miller
RKane~siac.com Robert Kane
rlee~fpcc.net Lopaka(Rob) Lee
rmunn~pobox.com Robin Munn
rnewman~thecia.net Ron Newman
rob~ezboard.com Rob Brown
robert.butler5~verizon.net Rob Butler
robert_spier~hotmail.com Robert Spier
rodrigc~crodrigues.org Craig Rodrigues
roel~stack.be Roel Vanhout
Roger.Simmons~gs.com Roger Simmons
rpenmetc~siac.com Ramesh Penmetcha
rpogue~siac.com Ronald Pogue
rra~stanford.edu Russ Allbery
rts~volny.cz Radomir Tomis
rudenko2~gte.net Pete
russ~attbb.net Russell Hammer
sarette2233~yahoo.com Steve Sarette
satish.katiyar~overture.com Satish Katiyar
sbfaulds~ihug.co.nz Stuart
sean.kelley~solers.com Kelley, Sean
shanks~ncoretech.com Shashank Garg
sharon~google.com Sharon Perl
shrao~nyx.net Shrisha Rao
shrdlu~deaddrop.org Etaoin Shrdlu
Simon.Greaves~usp.ac.fj Simon Greaves
sits~nuix.com.au David Sitsky
skip~pobox.com Skip Montanaro
smj~crash.com Steven M. Jones
smlucas~flashmail.com Steven Lucas
spider~leggy.zk3.dec.com Spider Boardman
Stephane.Lentz~ansf.alcatel.fr Lentz Stephane
stephen_abrams~harvard.edu Stephen Abrams
steve.carney~overture.com Steve Carney
steve.hay~uk.radan.com Steve Hay
steve~webcircuit.com Steve Robenalt
steve_d_allen~yahoo.com STEVE D. ALLEN
sumus~aut.dk Jakob Schmidt
swrede~techfak.uni-bielefeld.de Sebastian Wrede
sysmjc~darwin1.ucsd.edu Michael Corrigan
techin.kang~comcast.net Techin
terrym~firstlogic.com Terry Mihm
tgruhn2~mail.com Todd Gruhn
thogard~knotty.abnormal.com Tim Hogard
tnight~pobox.com Terry Nightingale
toivo~ucs.uwa.edu.au Toivo Pedaste
Tom.DeMan~dZine.be Tom De Man
tom.rumpf~eds.com Tom Rumpf
toni~soth.at Toni Andjelkovic
trumbore~mindspring.com Chris Trumbore
Tudor.Morosan~tsx.com Tudor Morosan
ubell~mindspring.com Michael Ubell
Ulrich.Telle~gmx.de Ulrich Telle
usenet-vote-cdbd-20030605~mirko.dziadzka.de Mirko Dziadzka
usenet~soraia.com Joe Francia
victor~outblaze.com Tsang, Hing Hang
vinay_sajip~yahoo.co.uk Vinay Sajip
volker_apelt~yahoo.de Volker Apelt
vpdura~hiwaay.net Vic Dura
w.koenig~acm.org Winfried Koenig
wally.yau~criticalpath.net Wally Yau
wiggans~aipl.arsusda.gov George Wiggans
wouter.van.doorn~logicacmg.com Wouter van Doorn
Xavier.Haurie~analog.com Xavier Haurie
xe~webdent.com Jocelyn Turpault
yawitkow~cyf-kr.edu.pl Witold Witkowski
zvr~pobox.com Alexios Zavras
Voted No
------------------------------------------------------------------------------
gprrspw~mindspring.com G.P. Ryan
naddy~mips.inka.de Christian Weisgerber
pgalimatias~hotmail.com P. Galimatias
stainles~realtime.net Dwight Brown
Abstained
------------------------------------------------------------------------------
cuhulain_98~yahoo.com The Ranger
max~alcyone.com Erik Max Francis
mmrosa~bigpond.net.au Michal Rosa
van.ette~inter.nl.net Robert-Jan van Ette
wiz~verinet.com Wiz
Votes in error
------------------------------------------------------------------------------
bostic~abyssinian.sleepycat.com Keith Bostic
! Ack bounced
hyc~highlandsun.com Howard Chu
! Ack bounced
Jon.Kibler~aset.com Jon R. Kibler
! Ack bounced
mckusick~beastie.mckusick.com Marshall Kirk McKusick
! Ack bounced
mrm~spamtrapped.lerctr.org Ray Mullins
! Ack bounced
ruschein~brimstone.UCR.EDU Dr. Johannes Ruscheinski
! Ack bounced
tandrea~att.com Andrea, Thomas E (Tom), ALABS
! No ballot
------------------------------
Date: 25 Jun 2003 02:45:02 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: search for messages in large files
Message-Id: <slrnbfi35g.1ip.mgjv@verbruggen.comdyn.com.au>
On Tue, 24 Jun 2003 19:27:20 -0700,
Jman <james.mctiernan@rcn.com> wrote:
> I am working with files that grow to a size of 1-2 mb each day
> of the month. The file is closed at the end of each month.
> The format of the messages is:
>
> aaaaaaaa YY-MN-DY HR:MN:SC MSG1 BBBB
> qqqq wwww eeee rrrr tttt
> yyyyyyy uuuuuuuuu
> iiii
>
> and
>
> aaaaaaaa yy-mn-dy hr:mn:sc MSG2 BBBB
> zzzz cccc
> kkkkkkkk
>
> lllllllll mmmmm nnnn
It would be better to include _real_ data from your log file, and even
better to show more than one record, so we can see whether there is
anything between records/messages that can be used.
> I want to do a search of the files each day for some previous days messages.
> The important data in the message to me is the date (YY-MN-DY),
> and the MSG1 (actually MSG[1-50]). Some of the messages have data
> in every line (MSG1), and some messages have lines that are blank followed
> by lines with data. Is there a good, or simple way to gather into a new
> file
> all of the previous days MSGs that I want? Hope my question makes sense.
Maybe something like (untested):
my $yesterday = "03-06-25"; # assuming that that is the format
open F, "mylogfile" or die $!;
while (<F>)
{
if (/$yesterday.*MSG(\d\d?)/)
{
# We now have the message number in $1
# Since you're only interested in yesterday, you already know
# the date. No need to capture it.
print;
}
}
close F;
I am assuming that none of the other lines have that pattern. I'm also
assuming that the BBBB bits above don't contain anything matching
'MSG\d\d?', or if it foes that it's actually the correct number as
well.
Hard to tell whether this is sufficient. You give us very little
information about what exactly you're having trouble with. next time,
apart from showing real data, also show us what you have tried (real
code), and which bit exactly you're having trouble with.
Martien
--
|
Martien Verbruggen | True seekers can always find something to
Trading Post Australia | believe in.
|
------------------------------
Date: Wed, 25 Jun 2003 07:05:56 -0400
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: serial input _and_ time of day based tasks?
Message-Id: <4n65muifhn.fsf@lockgroove.bwh.harvard.edu>
On Tue, 24 Jun 2003, stanb@panix.com wrote:
> I've got a script that reads from a serial port, and blocks on that.
>
> Now I need to have it swap log files at midnight. I looked at
> Event.pm, but it seemed a bit overkill, and I could not see how to
> make time of day trigger it.
>
> What other choices might I consider?
Have cron run a second script (doesn't have to be Perl, e.g. kill or
pkill will work) sending the primary script a USR1 signal at midnight.
The primary script can be detected by the name (Proc::ProcessTable,
pkill) or by PID (write the PID to a file the secondary script will
open).
Then the primary script just has to catch a USR1 signal. Try not to
do anything involved in the signal handler, best to only set a global
$usr1caught variable and get out.
Ted
------------------------------
Date: Wed, 25 Jun 2003 12:13:38 +0100
From: mike solomon <mike_solomon@lineone.net>
Subject: Re: soap::lite hellp needed with sms
Message-Id: <3EF983E2.9030302@lineone.net>
Yarden Katz wrote:
> mike solomon <mike_solomon@lineone.net> writes:
>
> [snip]
>
>>If anyone knows if there is a way to produce a / rather than a # I
>>will be really grateful
>
>
> It's very easy, just use:
>
> -> on_action(sub {sprintf '%s/%s', @_})
>
> In your SOAP object. To have the changes affect all SOAP objects
> (globally), use:
>
> use SOAP::Lite
> on_action => sub {sprintf '%s/%s', @_};
>
> HTH,
Thanks, that solved one problem
now I just have to work out hw to generate the correct format xml
the code I am using is
#The name of the module
my $soap = SOAP::Lite->uri($uri);
#print "soap = $soap\n";
#The url for the request
$soap = $soap->proxy($proxy);
#print "soap = $soap\n";
# send the request w/ header
my $response = $soap->SendMessageFull(
# HEADER
SOAP::Header->name(Username => $username),
SOAP::Header->name(Password => $password),
SOAP::Header->name(Account => $account),
# PARAMETERS FOR BODY
SOAP::Data->name(originator =>$originator),
SOAP::Data->name(recipient => $recipient),
SOAP::Data->name(body => $body),
SOAP::Data->name(type =>$type),
SOAP::Data->name(validityperiod => 99)
);
this generates a header like this
<SOAP-ENV:Header>
<Username xsi:type="xsd:string">mike.solomon</Username>
<Password xsi:type="xsd:string">password</Password>
<Account xsi:type="xsd:int">account</Account>
</SOAP-ENV:Header>
but the service requires
<soap:Header>
<MessengerHeader xmlns="com.esendex.ems.soapinterface">
<Username>USERNAME</Username>
<Password>PASSWORD</Password>
<Account>ACCOUNT</Account>
</MessengerHeader>
</soap:Header>
is this possible using soap lite?
Regards
Mike Solomon
------------------------------
Date: Wed, 25 Jun 2003 13:31:32 +0100
From: mike solomon <mike_solomon@lineone.net>
Subject: Re: soap::lite hellp needed with sms
Message-Id: <3EF99624.1060506@lineone.net>
<snip>
Bryan Castillo wrote:
> There is another thread with the above error right now, better watch
> that thread also. In that thread the op says he gets the same error
> at www.worldwidedesktop.com where they have a spell checking service.
> I was able to do it by packaging the soap request myself (I just used
> plain sockets instead of SOAP::Lite).
Well got a bit futher using
# HEADER
SOAP::Header->name(MessengerHeader => \SOAP::Header->value(
SOAP::Header->name(Username => $username),
SOAP::Header->name(Password => $password),
SOAP::Header->name(Account => $account),
)),
#
# # PARAMETERS FOR BODY
SOAP::Data->name(originator =>$originator),
SOAP::Data->name(recipient => $recipient),
SOAP::Data->name(body => $body),
SOAP::Data->name(type =>$type),
this creates a nested header, but it is still not correct
Could you please tell me how you did it using sockets
that may well be easier as I am perfectly capable of creating an XML by hand
I have never used sockets so I have no idea about how to go about it
Thanks for all your help
------------------------------
Date: Tue, 24 Jun 2003 23:25:51 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Surprised by read()
Message-Id: <3ef8da98.255588305@news.erols.com>
mark.wirdnam@stud.unibas.ch (Mark Wirdnam) wrote:
: I've given this problem a weekend of consideration without conclusion.
: I'm trying to use the "read"-command, for step-by-step reading from a
: binary file. On my computer at work (Mac OS X, perl 5.6.0), the
: scripts I write work. At home on Redhat Linux 8, perl 5.8.0, the same
: scripts don't work - with the same files!
: The symptoms are as if one read doesn't leave the file-pointer in the
: right place for the second read, bytes are getting lost.
The distinction between characters and bytes is most likely the source
of trouble--Perl 5.8 is treating the file as a character stream, but
you want it as a byte stream.
binmode() acquired relevance on unix-like systems in Perl 5.8.
binmode() all filehandles containing binary data.
------------------------------
Date: 24 Jun 2003 20:29:02 -0700
From: mfabache@yahoo.com (MF)
Subject: Re: Too greedy, my "\d+"
Message-Id: <2855726c.0306241929.7893bc00@posting.google.com>
Thanks Bart,
$nt =~ s/.*?(\d+:\d+ [ap]m)\s+\-\s+.*/$1/;
gave me exactly what I needed...
Progress continues!
Bart Lateur <bart.lateur@pandora.be> wrote in message news:<s3ldfv4tls5m7h6h6mf0mb7mvgh717g8lh@4ax.com>...
> MF wrote:
>
> >I can get sample #2 to work, but not sample #1
> >I'm trying to JUST get the time. I've tried:
> >
> >$nt =~ s/.*(\d+:\d+ [ap]m) - .*/$1/i;
> >$nt =~ s/.*(\d\d?:\d+ [ap]m) - .*/$1/i;
>
> As others said, that leading /.*/ is your problem, not the /\d+/.
>
> Don't try to match (and replace everything). Try to just match the time.
> It'll work then.
>
> ($time) = $nt =~ /(\d+:\d+ [ap]m)/;
------------------------------
Date: 25 Jun 2003 03:48:25 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Too greedy, my "\d+"
Message-Id: <slrnbfi6s9.7c3.sholden@flexal.cs.usyd.edu.au>
On 24 Jun 2003 20:29:02 -0700, MF <mfabache@yahoo.com> wrote:
> Thanks Bart,
>
> $nt =~ s/.*?(\d+:\d+ [ap]m)\s+\-\s+.*/$1/;
> gave me exactly what I needed...
As would have the FAQ.
>
> Progress continues!
And much faster too.
--
Sam Holden
------------------------------
Date: 25 Jun 2003 04:09:50 -0700
From: cristina@guiadealcala.com (Crixx)
Subject: Using Formats and stopping between pages
Message-Id: <975ec377.0306250309.3de209e9@posting.google.com>
Hello,
I am writing a menu-line program. For presenting some data I use a
regular format and a Top-of-page format.
Inside a while loop I call the format. The paging is done fine it puts
the top-of-page heading fine, page number and so on, but the whole
result scrolls through the screen. I would like it to pause beteen
page and page, so that the user can read it.
Is there a way to do it?
Please help me I have been looking through all FAQ and newsgroups.
TIA and regards,
Cristina
Some of my code is:
format WEB_SERVICES =
@<: @<<<<<<<<<<<<<<<<< with URL: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$line_number, $web_data[6], $web_data[11]
Instance:@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$web_data[0]
----------------------------------------------------------------------
.
while ($line = <CONFIG>) {
@web_data = split(/\|/,$line);
write;
$line_number ++;
}
------------------------------
Date: 25 Jun 2003 11:41:25 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Using Formats and stopping between pages
Message-Id: <slrnbfj2j5.3o8.sholden@flexal.cs.usyd.edu.au>
On 25 Jun 2003 04:09:50 -0700, Crixx <cristina@guiadealcala.com> wrote:
> Hello,
>
> I am writing a menu-line program. For presenting some data I use a
> regular format and a Top-of-page format.
>
> Inside a while loop I call the format. The paging is done fine it puts
> the top-of-page heading fine, page number and so on, but the whole
> result scrolls through the screen. I would like it to pause beteen
> page and page, so that the user can read it.
>
> Is there a way to do it?
>
> Please help me I have been looking through all FAQ and newsgroups.
I've never used formats, so this is a bit of a stab in the dark without
really knowing how they work...
$- gives the number of lines left (according to perldoc perlvar).
So you should be able to use it and the number of lines that are going
to be output by write to know if the write if going to start a new page.
If it is you could do your own "press any key to continue" handling.
Alternatively, you could pipe the output through something like more,
I guess that might require making sure the format lines per page is the
same as the number of lines more thinks the terminal has...
--
Sam Holden
------------------------------
Date: 24 Jun 2003 18:05:41 -0700
From: rook_5150@yahoo.com (Bryan Castillo)
Subject: Re: using SOAP::Lite to call other services.
Message-Id: <1bff1830.0306241705.47ea7b4@posting.google.com>
Yarden Katz <katz@underlevel.net> wrote in message news:<86ptl3obqz.fsf@underlevel.net>...
> James McIninch <james.mcininch@attbi.com> writes:
>
> > A few things: I'd suggest that you use the +trace option to SOAP::Lite to
> > see what's going on under the covers -- It's very informative. Next, you
> > are calling a Microsoft .Net service (.asmx), meaning that it's probably
> > not strictly SOAP compliant. The SOAP::Lite documentation give pointers on
> > how to compensate for the pecualiarities of the bugs in .Net. Finally, if
> > you specify the service() to SOAP::Lite, you should leave off the proxy()
> > and the uri() since the service() is supposed to set those things for you.
>
> A couple of things: I've been using +trace from the start (that's how
> I knew what message my client was sending) and it is indeed very
> useful. I've tried the combination you suggested (removing
> uri()/proxy() and just using service()) but I get the same results.
>
> Additionally, for another .asmx service I was attempting to call,
> removing proxy() and just pointing service to the WSDL file was not an
> option. When I did that, I'd get the error: Transport not specified
> (use proxy() or service method)
I was able to get one response back by setting:
the on_action callback and specifying the namespace
for the method.
(I needed the on_action so that the SOAPAction header had uri/method instead
of uri#method.)
If you look at the trace there are many results, but the result
I get from perl only has 1 item.
(You know I was able to hook perl almost seemlessly into some java
web services using Apache Axis - I don't know why this is so
difficult. Is it perl or .NET, or do I just not get this?
I thought the beauty of remote method like frameworks was that
you didn't have to really know the protocol, and that libraries would
do the work for you).
use strict;
use warnings;
use Data::Dumper;
use SOAP::Lite +trace => 'all';
#use SOAP::Lite;
my $service = SOAP::Lite
->proxy('http://www.worldwidedesktop.com/spellcheck/spellcheckservice.asmx')
->uri('http://www.worldwidedesktop.com/spellcheck/SpellCheck')
->on_action(sub{ sprintf "%s/%s", @_ });
my $xmlns = 'http://www.worldwidedesktop.com/spellcheck';
my $method = SOAP::Data
->name('SpellCheck')
->attr({xmlns=>$xmlns});
my $response = $service->call($method => _sd(
LicenseText => '',
TextToCheck => 'blonk'
));
die "Error: getting response\n" unless defined($response);
print "Response = ", Dumper($response->result), "\n";
# convert key/values to SOAP::Data
sub _sd {
my @p;
for (my $i=0; $i<$#_; $i+=2) {
push(@p, SOAP::Data->name($_[$i]=>$_[$i+1]));
}
return @p;
}
------------------------------
Date: Tue, 24 Jun 2003 23:38:06 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Win32::OLE, Excel, and coloring
Message-Id: <3ef8debb.256647593@news.erols.com>
mda@idatar.com (M. David Allen) wrote:
: I've been using ActiveState's ActivePerl to generate Excel
: spreadsheets using the Win32::OLE module. The rudimentary examples
: that are out there on the web show the way to set up specific ranges
: and enter data into cells, but what I'm looking for at this point is
: how to set the background color of cells.
:
: Does anybody know how to do this with Win32::OLE?
# $range is a Range object within a Worksheet object
$range->Interior->{ColorIndex} = 6; # 6 == yellow
: If this module maps to Microsoft's API,
The application's class is the interface. Win32::OLE just gives Perl
access to the class.
: is there any complete documentation out there
: about which hash keys inside of range or cell objects map to which
: features in the application?
Objects, their methods, and their properties are described in the
Excel VBA documentation. All you have to do is mentally alter VBA
syntax into Perl syntax--the Synopsis section of the Win32::OLE pod
gives good clues on that.
------------------------------
Date: Wed, 25 Jun 2003 00:24:36 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Win32::OLE, Excel, and coloring
Message-Id: <3EF8EBBA.3040103@rochester.rr.com>
M. David Allen wrote:
...
> I've been using ActiveState's ActivePerl to generate Excel
> spreadsheets using the Win32::OLE module. The rudimentary examples
> that are out there on the web show the way to set up specific ranges
> and enter data into cells, but what I'm looking for at this point is
> how to set the background color of cells.
>
> Does anybody know how to do this with Win32::OLE? If this module maps
> to Microsoft's API, is there any complete documentation out there
> about which hash keys inside of range or cell objects map to which
> features in the application?
...
You can easily find out for yourself: In Excel, turn on the macro
recorder and manually do the steps you want to find out about. Turn off
the recorder, and then look at the resulting code in the VBA screen
(Alt-F11, I think). Translate that to Win32::OLE's corresponding syntax
(see perldoc Win32::OLE), and you're done.
--
Bob Walton
------------------------------
Date: Tue, 24 Jun 2003 16:24:58 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Write line at beginning of file?
Message-Id: <slrnbfhgda.2im.tadmc@magna.augustmail.com>
Eric Pement <pemente@northpark.edu> wrote:
> tadmc@augustmail.com (Tad McClellan) wrote in message news:<slrnbfe194.mf6.tadmc@magna.augustmail.com>...
>> perldoc -q beginning
>>
>> How do I change one line in a file/delete a line in a
>> file/insert a line in the middle of a file/append to the
>> beginning of a file?
> Some people may disagre, but I found the Perl FAQ disappointing in
> this answer. I have a recent ActiveState Perl,
What version of perl are you referring to?
> and the FAQ says this:
>
> Although humans have an easy time thinking of a text file as
> being a sequence of lines that operates much like a stack of
> playing cards--or punch cards--computers usually see the text
> file as a sequence of bytes. In general, there's no direct way
> for Perl to seek to a particular line of a file, insert text
> into a file, or remove text from a file.
That is not what it says in the most recent version of perl (5.8.0).
(but I liked that old answer better than the new answer...)
> Huh? Maybe the authors mean something by "direct way" that I'm not
> understanding properly.
Yes, the question says "a file" multiple times.
> I think the question can be answered directly.
> $. is the current line number under default circumstances:
>
> perl -pe 'print "Prepended line\n" if $.==1;' infile >outfile
That is *two* files, not "a file".
_True_ inplace editing is not straightforward, so the FAQ suggests
the effect of inplace editing (but it isn't really "in place", it
is in a _different_ place, a temp file).
> It works on Perl v5.6.1, at any rate.
And the FAQ says to do just that, perhaps you did not recognize
that that is what was being said?
The general solution is to create a temporary copy of
the text file with the changes you want, then copy that
over the original.
...
Perl can do this sort of thing for you automatically with the
...
> The questioner should know not
> to put more than one file on the command line for this one-liner.
How command line redirection works depends on the shell, not on
the application (perl). That would be a shell answer, not a perl answer.
> If
> he wants to process several files, it's probably better to use a shell
> script
The Perl FAQ should answer questions in Perl, not cop-out
to using something else. :-)
You can do multiple in-place edits from a single Perl program
as well as (better, actually) from a shell program.
> with the -i switch to perform
> in-place replacement,
Errr, that _is_ what the FAQ you quoted recommends, so what
was wrong with that answer again?
:-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 25 Jun 2003 12:37:01 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Write line at beginning of file?
Message-Id: <u9llvqmlr6.fsf@wcl-l.bham.ac.uk>
pemente@northpark.edu (Eric Pement) writes:
> Some people may disagre, but I found the Perl FAQ disappointing in
> this answer.
Why?
> I have a recent ActiveState Perl, and the FAQ says this:
>
> Although humans have an easy time thinking of a text file as
> being a sequence of lines that operates much like a stack of
> playing cards--or punch cards--computers usually see the text
> file as a sequence of bytes. In general, there's no direct way
> for Perl to seek to a particular line of a file, insert text
> into a file, or remove text from a file.
>
> Huh? Maybe the authors mean something by "direct way" that I'm not
> understanding properly.
To directly modify a file means to, errr..., directly _modify_ _the_
_file_.
> I think the question can be answered directly.
> $. is the current line number under default circumstances:
>
> perl -pe 'print "Prepended line\n" if $.==1;' infile >outfile
That is indirect. It does not directly prepend a line to an existing
file. It produces a new file which must then be renamed over the
original file to give the effect of prepending - as illustrated in the
FAQ.
> ... the -i switch to perform in-place replacement ...
It is still indirect. All it does is automate the renaming as is
explained in the FAQ.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
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.
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 5134
***************************************