[29110] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 354 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 17 21:10:10 2007

Date: Tue, 17 Apr 2007 18:09:13 -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           Tue, 17 Apr 2007     Volume: 11 Number: 354

Today's topics:
        ESS labels on ESMTP mail: perhaps using Net::Server::Ma clyde.ingram@edl.uk.eds.com
    Re: fork,exec, and parallel processing <no_return@ignore.org>
    Re: is laziness a programer's virtue? <development-2006-8ecbb5cc8aREMOVETHIS@ANDTHATm-e-leypold.de>
    Re: is laziness a programer's virtue? <development-2006-8ecbb5cc8aREMOVETHIS@ANDTHATm-e-leypold.de>
    Re: is laziness a programer's virtue? <quetzalcotl@consultant.com>
    Re: is laziness a programer's virtue? <lew@nospam.lewscanon.com>
    Re: is laziness a programer's virtue? <gneuner2/@comcast.net>
        Perl MakeMaker - how to force Perl linking with the sta <avner-moshkovitz@shaw.ca>
        print math symbol into image created with GD <stroncococcus@gmx.de>
        Read xml file and write data to a txt file using PERL.. <ramesh9999@gmail.com>
    Re: Read xml file and write data to a txt file using PE <sbryce@scottbryce.com>
    Re: Read xml file and write data to a txt file using PE <noreply@gunnar.cc>
    Re: Read xml file and write data to a txt file using PE <bik.mido@tiscalinet.it>
    Re: Socket creation failing with "operation now in prog google@macrotex.net
    Re: Socket creation failing with "operation now in prog <nobull67@gmail.com>
    Re: Socket creation failing with "operation now in prog xhoster@gmail.com
    Re: Socket creation failing with "operation now in prog xhoster@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 17 Apr 2007 08:58:49 -0700
From: clyde.ingram@edl.uk.eds.com
Subject: ESS labels on ESMTP mail: perhaps using Net::Server::Mail::ESMTP
Message-Id: <1176825529.416056.152420@e65g2000hsc.googlegroups.com>

I am searching for a method to generate ESMTP e-mails with ESS
labels.  The Perl module Net::Server::Mail::ESMTP - "A module to
implement the ESMTP protocole", by Olivier Poitrey <rs@rhapsodyk.net>
on CPAN, looks like a possibility.

However the documentation and source code do not seem to mention ESS
labels.

Does anyone know whether I can use this or any other library to
generate e-mails with ESS labels?

Thank-you,
Clyde



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

Date: Wed, 18 Apr 2007 00:06:07 GMT
From: Joe <no_return@ignore.org>
Subject: Re: fork,exec, and parallel processing
Message-Id: <v3oa231vbc2acd2s36k8rdrvjp7nh75t1f@4ax.com>

On 26 Mar 2007 08:29:28 -0700, "drew@sundawg.org" <drew@sundawg.org>
wrote:

>Hi,
>
>I've a need for a script that can query multiple NetBackup servers for
>a clientlist, in parallel (rather than sequentially) if possible.
>
>I've developed the following code, which seems to work, but also seems
>to only run sequentially. What can I do to correct the script so it
>will run the children in parallel?
>
>Thanks,
>
>Drew
>
>__BEGIN_SCRIPT__
>use strict;
>
>my $passes = 0;
>my @kids = ();
>my @clients;
>my %backup_results = ();
>my @serverlist = qw/server1 server2/;
>my %client_to_master = ();
>
>for my $server (@serverlist) {
>        my $pid = open(KID_TO_READ,"-|");
>        print "PID: $pid\n";
>        if ($pid) {
>                # parent
>                @clients = ();
>                while(<KID_TO_READ>) {
>                        next if (/Windows/);
>                        next if (/^Hardware /);
>                        next if (/^-----/);
>                        my ($hardware,$os,$client_name) = split;
>                        push(@clients,$client_name);
>                        $client_to_master{$client_name} = $server;
>                }
>                close(KID_TO_READ) or warn "Child exited: $?\n";
>                $backup_results{$server}{'clientlist'} = [@clients];
>                push(@kids, $pid);
>        } elsif ($pid == 0) {
>                # child
>                my @options = qw/ssh/;
>                my $path = '/usr/openv/netbackup/bin/admincmd';
>                my $cmd = 'bpplclients';
>                my $bpplclients = $path . '/' . $cmd;
>                push(@options,$server,$bpplclients);
>                exec('/usr/bin/sudo',@options) or die "Can't exec: $!
>\n";
>                exit(0);
>        } else {
>                die "Can't fork: $!\n";
>        }
>}
>
>
>foreach(@kids) {
>        waitpid($_,0);
>}
>
>exit(0);
>
>__END_SCRIPT__

Use:
http://search.cpan.org/~dlux/Parallel-ForkManager-0.7.5/ForkManager.pm

However you cannot write to a file or array while this is forking due
to overwrites..

Dump the data you need into a Database then parse the database once
the script is finished...

Works like a champ...

Joe



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

Date: Tue, 17 Apr 2007 15:25:22 +0200
From: Markus E Leypold <development-2006-8ecbb5cc8aREMOVETHIS@ANDTHATm-e-leypold.de>
Subject: Re: is laziness a programer's virtue?
Message-Id: <5pwt0bnnel.fsf@hod.lan.m-e-leypold.de>

Mirco Wahab <wahab-mail@gmx.de> writes:

> Markus E Leypold wrote:
>> Trying to correct Xah's behaviour is probably impossible. People who
>> publish pictures of themselves as he does on the WWW probably don't
>> have any sense of embarrasment left ...
>
> you think of stuff like this
>      www DOT m-e-leypold DOT de SLASH leypold-small.jpg
> ;-)

;-) No. This actually is a picture of myself I like (very much
indeed), even if the long hair has gone now (I have to update the site
some time within the next weeks, but the original site generator has
died and the new site ain't ready yet).

No, what I mean, is what one poster already posted to c.l.f, what
you'll find looking for Xah Lee with Google image search and I won't
link here. My warning: You probably don't want to see a picture of
Xah's penis in full readiness.

That is, what I consider embarrasing.

> The reason why I answered your posting at all (besides
> seeing your x-post going into 5 ng's) is your mentioning

Your's too (you only changed the f'up) , and now I've done the
ultimate sin and reset the F'up for this answer (if you post URLs to
pictures of me, I reserve the right to say that I LIKE this picture
:-)

But that's the last x-post in this thread, I promise.


Regards -- Markus



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

Date: Tue, 17 Apr 2007 15:33:02 +0200
From: Markus E Leypold <development-2006-8ecbb5cc8aREMOVETHIS@ANDTHATm-e-leypold.de>
Subject: Re: is laziness a programer's virtue?
Message-Id: <slaznn1t.fsf@hod.lan.m-e-leypold.de>


> The reason why I answered your posting at all (besides
> seeing your x-post going into 5 ng's) is your mentioning

So now, obeying the f'up.

Xah x-posts in 5 NGs. I'm not sure that isn't a case of escalating the
sorry state of things, but IF I feel the need to respond to that
bashing Xah, it only makes sense if I answer to everyone of these
crossposts. I feel a bit bad because of that, but every now and then I
feel the need to try to curb Xah somehow.

If you answer to that, please mail me a copy -- I'm not reading
comp.lang.perl.* :-)

> of 'God'. According to christian tradition (which is
> somehow on topic in a Perl group) it is exactly the
> case of Jesus (imho), who was (in his context) the
> "/Do you really want to look like a dolt in public/"
> man par excellance. Socrates also comes into the mind ;-)

Well, fine. But Xah is not Jesus and neither Sokrates nor Jesus where
"dolts in public". I think they were considered quite a danger by
their contemporaries -- that where both executed because they thought
and preached things that where in effect a danger to the ruling class. 

Xah on the other side doesn't qualify for that.

> Regards & sorry for scnr'ing

:-)

Your forgiven. But I think we'd have to work a bit more on the
criteria for qualifying as Jesus/Sokrates/Galilei: Just being disliked
or told to shut up won't do it -- there ARE real dolts around (esp. in
usenet).

Regards -- Markus



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

Date: 17 Apr 2007 08:20:24 -0700
From: Ingo Menger <quetzalcotl@consultant.com>
Subject: Re: is laziness a programer's virtue?
Message-Id: <1176823224.099381.4630@n59g2000hsh.googlegroups.com>

On 17 Apr., 12:33, Markus E Leypold
<development-2006-8ecbb5cc8aREMOVET...@ANDTHATm-e-leypold.de> wrote:

> What makes Xah a troll is neither off-topic posts nor being
> incoherent -- its the attitude. He's broadcasting his drivel to a
> number of groups not with the intention to discuss (he hardly ever
> answers to answers to his posts), but solely with the intention to
> inform the world at large about his own magnificient thoughts.

This hits the nail on the head.
Perhaps one could understand this behaviour on cultural grounds. In
chinese culture it may be not uncommon to write something that merely
sounds like great wisdom and it is nevertheless appreciated because
it's a piece of calligraphic art.

> Trying to correct Xah's behaviour is probably impossible.

Perhaps somebody could ask the chinese government to put him in jail
for "hurting international society" :)



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

Date: Tue, 17 Apr 2007 19:54:55 -0400
From: Lew <lew@nospam.lewscanon.com>
Subject: Re: is laziness a programer's virtue?
Message-Id: <eZedncJsovLSw7jbnZ2dnUVZ_r7inZ2d@comcast.com>

Markus E Leypold
>> Trying to correct Xah's behaviour is probably impossible.

Ingo Menger wrote:
> Perhaps somebody could ask the chinese government to put him in jail
> for "hurting international society" :)

Y'know, even in jest, calling for an oppressive regime to suppress even 
wrong-headed and self-serving garbage self-expression is immoral and horrible. 
  How dare you?

Free speech, free press and free expression of ideas is not something to take 
so lightly.

-- 
Lew


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

Date: Tue, 17 Apr 2007 21:03:58 -0400
From: George Neuner <gneuner2/@comcast.net>
Subject: Re: is laziness a programer's virtue?
Message-Id: <b4ra23l78iuaepfu92qm2rc8ef3rvsu3dd@4ax.com>

On 17 Apr 2007 08:20:24 -0700, Ingo Menger
<quetzalcotl@consultant.com> wrote:

>On 17 Apr., 12:33, Markus E Leypold
><development-2006-8ecbb5cc8aREMOVET...@ANDTHATm-e-leypold.de> wrote:
>
>> What makes Xah a troll is neither off-topic posts nor being
>> incoherent -- its the attitude. He's broadcasting his drivel to a
>> number of groups not with the intention to discuss (he hardly ever
>> answers to answers to his posts), but solely with the intention to
>> inform the world at large about his own magnificient thoughts.
>
>This hits the nail on the head.
>Perhaps one could understand this behaviour on cultural grounds. In
>chinese culture it may be not uncommon to write something that merely
>sounds like great wisdom and it is nevertheless appreciated because
>it's a piece of calligraphic art.
>
>> Trying to correct Xah's behaviour is probably impossible.
>
>Perhaps somebody could ask the chinese government to put him in jail
>for "hurting international society" :)

That's going to be tough because, according to his web page, he's
living in a Honda Civic somewhere in Illinois, USA.

http://xahlee.org/PageTwo_dir/Personal_dir/xah.html

George
--
for email reply remove "/" from address


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

Date: 17 Apr 2007 14:20:36 -0700
From: Avi <avner-moshkovitz@shaw.ca>
Subject: Perl MakeMaker - how to force Perl linking with the static C library (libcrt.lib) instead of dynamic C library (msvcrt.lib)
Message-Id: <1176844836.196843.26340@d57g2000hsg.googlegroups.com>

Hi,

I'm building a Perl extension (dll in Windows XP) using
ExtUtils::MakeMaker.
This dll needs to link with other libraries that were built in static
mode (-MTd).
My perl configuration states dynamic libraries (-MD) which causes
MakeMaker to pull a dynamic C library (msvcrtd.dll).
The other libraries are using the static C library (libcmtd.lib)
These dynamic and static C libraries collide giving link errors.

Is there a way to force perl to compile with (-MTd) albeit its
configuration flags?
I tried reinstalling Perl (ActiveState perl v5.8.8 built for MSWin32-
x86-multi-thread) but didn't see an option to control the
configuration flags.
Also, my platform supports both dynamic (-MD) and static (-MTd)
builds. Does this mean that I have to maintain two versions of Perl?


Thanks,

Avner



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

Date: 17 Apr 2007 15:12:15 -0700
From: Kai Schlamp <stroncococcus@gmx.de>
Subject: print math symbol into image created with GD
Message-Id: <1176847934.989565.294640@n59g2000hsh.googlegroups.com>

Hy!

I am using the GD::Simple libs to draw a simple diagram. My problem
is, that I have to put some math symbols in there (for example the
symbol for delta and my).
Is there an easy way to do that?

Best regards,
Kai



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

Date: 17 Apr 2007 13:17:28 -0700
From: Ram <ramesh9999@gmail.com>
Subject: Read xml file and write data to a txt file using PERL.... urgent
Message-Id: <1176841048.744664.304330@l77g2000hsb.googlegroups.com>

Hi,

I am new to perl and xml.... please help me out with the following as
this is urgent:
Can anyone help me with the code....

I have a xml file:
   <?xml version="1.0" encoding="ISO-8859-1" ?>
  <!DOCTYPE FOF (View Source for full doctype...)>
- <FOF Name="BBH3" Date="20070413" Last="1">
- <OB cl="FOMessage.FIOMMessage.FIOMObject" no="1019.1008.51"
vr="1.43" od="1" mn="0">
  <tx no="51" nm="provider1ID" mn="0" ky="1" />
  <tx no="51" nm="provider2ID" mn="0" ky="1" />
  <tx no="51" nm="provider3ID" mn="0" ky="1" />
  <sp no="1008" nm="creationTime" mn="0" />
  <tx no="1008" nm="author" mn="0" />
  <nu no="1019" nm="revisionNo" mn="0" />
  <sp no="1019" nm="createTimestamp" mn="0" />
  <tx no="1019" nm="createUserID" mn="0" vl="WMS" />
  <tx no="1019" nm="initiatorId" mn="0" />
  <tx no="1019" nm="messageFromID" mn="0" vl="iss-
blade4.local.wmgruppe.de_21221_2_0" />
  <tx no="1019" nm="messageToID" mn="0" vl="iss-
blade4.local.wmgruppe.de_21221_2_0" />
  <fg no="1019" nm="isEndOfDelivery" mn="0" />
  <fg no="1019" nm="isExecuted" mn="0" />
- <R no="1019" nm="fiomData">
- <RP mn="0">
- <OB cl="QuoteHolder.TopLevelObject.FIOMObject" no="208.1080.51"
vr="1.43" od="2" mn="3">
  <tx no="51" nm="provider1ID" mn="0" ky="1" />
  <tx no="51" nm="provider2ID" mn="1" ky="1" vl="WMS" ov="" />
  <tx no="51" nm="provider3ID" mn="0" ky="1" />
  <cr no="208" nm="currency" mn="4" ky="1" vl="6 WKN 965642
Waehrung_BdB EO ISIN EU0009656420 BoersenkuerzelInland EUR
Waehrung_ISO4217 EUR DB_KEY 69" />
  <R no="1080" nm="result" />
- <R no="1080" nm="vdpsInformation">
- <RP mn="0">
+ <OB cl="VDPSInformation.FIOMObject" no="160.51" vr="1.43" od="3"
mn="3">
  <tx no="51" nm="provider1ID" mn="0" ky="1" />
  <tx no="51" nm="provider2ID" mn="0" ky="1" />
  <tx no="51" nm="provider3ID" mn="0" ky="1" />
  <fg no="160" nm="hasPendingActivities" mn="4" vl="FALSE" />
  <tx no="160" nm="vstName" mn="0" vl="QuoteHolder" />
  <tx no="160" nm="vstVersion" mn="0" vl="WM_003a" />
  <em no="160" nm="foType" mn="4" dm="FOType" vl="500" />
  <tx no="160" nm="createUserID" mn="0" vl="WMS" />
  <sp no="160" nm="createTimestamp" mn="0" vl="05.07.2005 - 22:02:15
@0" />
  <tx no="160" nm="updateUserID" mn="3" vl="WMS" ov="unknown" />
  <sp no="160" nm="updateTimestamp" mn="3" vl="16.04.2007 - 10:24:40
@0" ov="15.04.2007 - 11:26:04 @0" />
  <nu no="160" nm="vstQuality" mn="4" vl="10" />
  <fg no="160" nm="isRelevant" mn="4" vl="TRUE" />
  <tx no="160" nm="modificationReason" mn="0" />
  <nu no="160" nm="revisionNo" mn="3" vl="529" ov="528" />
  <tx no="160" nm="remarks" mn="0" />
  <fg no="160" nm="hasFutureMessages" mn="0" />
  <nu no="160" nm="vstRequiredQuality" mn="4" vl="5" />
  <tx no="160" nm="provider1Symbol" mn="0" ky="1" />
  <tx no="160" nm="provider2Symbol" mn="0" ky="1" />
  <tx no="160" nm="provider3Symbol" mn="0" ky="1" />
  <em no="160" nm="dataStatusType" mn="0" dm="DataStatusType" />
  <nu no="160" nm="vstMaximumQuality" mn="0" vl="10" />
  <nu no="160" nm="newVstQuality" mn="1" vl="10" ov="" />
  <fg no="160" nm="isChecked" mn="0" />
  <tx no="160" nm="messageInfo" mn="0" />
  <fg no="160" nm="fotWizardIsDisabled" mn="0" />
  <em no="160" nm="blockingCodeType" mn="0" dm="BlockingCodeType" />
  <em no="160" nm="logicDeletionType" mn="0" dm="LogicDeletionType" /
>
  <tx no="160" nm="foDBKey" mn="0" />
  <fg no="160" nm="isOnDB" mn="4" vl="TRUE" />
  <fg no="160" nm="isFastInsertion" mn="0" />
  <em no="160" nm="priorityType" mn="0" dm="PriorityType" />
  <R no="160" nm="genericInformations" />
  <R no="160" nm="areaInformations" />
  </OB>
  </RP>
  </R>
  <R no="1080" nm="control" />
  <R no="1080" nm="pendingActivity" />
  <R no="1080" nm="pendingChange" />
- <WR no="208" tn="BTID3" nm="instrument">
  <id no="0_BTID3" tn="BTID3" nm="destinationKey" mn="3" vl="1 WKN
977961" ov="5 CommonCode 8492301 WKN 977961 ISIN DE0009779611
BoersenkuerzelInland FPJB DB_KEY 18022" />
  </WR>
- <R no="208" nm="recentQuoteValues">
- <RP mn="0">
- <OB cl="QuoteValue.FIOMObject" no="213.51" vr="1.43" od="4" mn="1">
  <tx no="51" nm="provider1ID" mn="0" ky="1" />
  <tx no="51" nm="provider2ID" mn="1" ky="1"
vl="20070413K01005L21NULK02_1_4" ov="20070413K01005L21NULK02_1_4" />
  <tx no="51" nm="provider3ID" mn="0" ky="1" />
  <tx no="213" nm="quoteTypeIdSymbol" mn="1" vl="03_K02_1_4"
ov="03_K02_1_4" />
  <em no="213" nm="valueType" mn="1" dm="ValueType" vl="9001"
ov="9001" />
  <ft no="213" nm="quoteValue" mn="1" vl="75.35" ov="75.35" />
  <em no="213" nm="valueStyleType" mn="1" dm="ValueStyleType" vl="5"
ov="5" />
  <ft no="213" nm="quoteSize" mn="0" />
  <sp no="213" nm="quoteTime" mn="1" vl="13.04.2007 - 99:99:99 @99"
ov="13.04.2007 - 99:99:99 @99" />
  <em no="213" nm="sizeStyleType" mn="0" dm="SizeStyleType" />
  <em no="213" nm="reliabilityType" mn="0" dm="ReliabilityType" />
  <fg no="213" nm="isCorrection" mn="0" />
  <sp no="213" nm="validUntil" mn="0" />
  <em no="213" nm="settlementTimeType" mn="0" dm="SettlementTimeType" /
>
  <em no="213" nm="settlementCodeType" mn="0" dm="SettlementCodeType" /
>
  <em no="213" nm="settlementStatusType" mn="0"
dm="QuoteSettleStatusType" />
  <em no="213" nm="valueStyleRefinedType" mn="1"
dm="ValueStyleRefinedType" vl="9121" ov="9121" />
  <tx no="213" nm="quoteTypeSchemeSymbol" mn="1" vl="03_Fondspreise"
ov="03_Fondspreise" />
  <em no="213" nm="fixingCapitalEventType" mn="0"
dm="FixingCapitalEventType" />
  <lg no="213" nm="valueDescr" mn="0" />
  <R no="213" nm="listingInformation" />
  <R no="213" nm="providedService" />
  <R no="213" nm="quoteListings" />
  <RD no="213" nm="quoteType" mn="0" kyA="quoteTypeIdSymbol/
quoteTypeSchemeSymbol" />
  </OB>
  </RP>
  - <RP mn="0">
  - <OB cl="QuoteValue.FIOMObject" no="213.51" vr="1.43" od="5"
mn="1">
    <tx no="51" nm="provider1ID" mn="0" ky="1" />
    <tx no="51" nm="provider2ID" mn="1" ky="1"
vl="20070413K02004L21NULK02_1_4" ov="20070413K02004L21NULK02_1_4" />
    <tx no="51" nm="provider3ID" mn="0" ky="1" />
    <tx no="213" nm="quoteTypeIdSymbol" mn="1" vl="03_K02_1_4"
ov="03_K02_1_4" />
    <em no="213" nm="valueType" mn="1" dm="ValueType" vl="9002"
ov="9002" />
    <ft no="213" nm="quoteValue" mn="1" vl="71.76" ov="71.76" />
    <em no="213" nm="valueStyleType" mn="1" dm="ValueStyleType" vl="4"
ov="4" />
    <ft no="213" nm="quoteSize" mn="0" />
    <sp no="213" nm="quoteTime" mn="1" vl="13.04.2007 - 99:99:99 @99"
ov="13.04.2007 - 99:99:99 @99" />
    <em no="213" nm="sizeStyleType" mn="0" dm="SizeStyleType" />
    <em no="213" nm="reliabilityType" mn="0" dm="ReliabilityType" />
    <fg no="213" nm="isCorrection" mn="0" />
    <sp no="213" nm="validUntil" mn="0" />
    <em no="213" nm="settlementTimeType" mn="0"
dm="SettlementTimeType" />
    <em no="213" nm="settlementCodeType" mn="0"
dm="SettlementCodeType" />
    <em no="213" nm="settlementStatusType" mn="0"
dm="QuoteSettleStatusType" />
    <em no="213" nm="valueStyleRefinedType" mn="1"
dm="ValueStyleRefinedType" vl="9121" ov="9121" />
    <tx no="213" nm="quoteTypeSchemeSymbol" mn="1" vl="03_Fondspreise"
ov="03_Fondspreise" />
    <em no="213" nm="fixingCapitalEventType" mn="0"
dm="FixingCapitalEventType" />
    <lg no="213" nm="valueDescr" mn="0" />
    <R no="213" nm="listingInformation" />
    <R no="213" nm="providedService" />
    <R no="213" nm="quoteListings" />
    <RD no="213" nm="quoteType" mn="0" kyA="quoteTypeIdSymbol/
quoteTypeSchemeSymbol" />
    </OB>
    </RP>
- <R no="208" nm="providedService">
- <RP mn="0">
- <OB cl="ProvidedService.FIOMObject" no="310.51" vr="1.43" od="11"
mn="4">
  <tx no="51" nm="provider1ID" mn="0" ky="1" />
  <tx no="51" nm="provider2ID" mn="0" ky="1" />
  <tx no="51" nm="provider3ID" mn="0" ky="1" />
  <dt no="310" nm="beginDate" mn="0" />
  <dt no="310" nm="endDate" mn="0" />
- <WR no="310" tn="BTID2" nm="institution">
  <id no="0_BTID2" tn="BTID2" nm="destinationKey" mn="3" vl="1
Institution 848758" ov="5 Abwicklungsstelle 4039 Betreuer 4039
Institution 848758 IBEI DE08487588 DB_KEY 54487" />
  </WR>
- <WR no="310" tn="BTID5" nm="instrumentService">
  <id no="0_BTID5" tn="BTID5" nm="destinationKey" mn="4" vl="1
InvestmentFondsPreise WMGruppe" />
  </WR>
  </OB>
  </RP>
  </R>
  </OB>
  </RP>
  </R>
  </OB>

Output:
I need a perl script and the output (txt file) of the perl script is
as follows:
#(ISIN, valueType, quoteValue,quoteTime)
DE0009779611,9001,75.35,20070413
DE0009779612,9001,97.12,20070413
 .
 .

Need to take the Date from the header ie 3rd line and compare it with
the date in quoteTime. If the date matches, write it into txt file.If
it doesn't match, then discard
Here i need to get only the quoteValue for valueType =9001 and not for
9002

Would appreciate if anyone helps me with this



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

Date: Tue, 17 Apr 2007 14:48:02 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: Read xml file and write data to a txt file using PERL.... urgent
Message-Id: <zaWdnU72Hvf2r7jbnZ2dnUVZ_g-dnZ2d@comcast.com>

Ram wrote:

> Hi,
> 
> I am new to perl and xml.... 

Start here: http://search.cpan.org/~grantm/XML-Simple-2.16/lib/XML/Simple.pm

Give it your best shot. Someone here may be able to help you tweak your 
code.

> please help me out with the following as
> this is urgent:
> Can anyone help me with the code....

I doubt you will get anyone here to write this for you, but plenty of 
people will be willing to help if you give it a try yourself.


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

Date: Tue, 17 Apr 2007 23:00:42 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Read xml file and write data to a txt file using PERL.... urgent
Message-Id: <58kr03F2grnhuU1@mid.individual.net>

Ram wrote:
> Hi,
> 
> I am new to perl and xml.... please help me out with the following as
> this is urgent:

It's not urgent to me.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Tue, 17 Apr 2007 23:50:11 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Read xml file and write data to a txt file using PERL.... urgent
Message-Id: <5dfa2319b6llvu25afs1m03pm9td521q92@4ax.com>

On 17 Apr 2007 13:17:28 -0700, Ram <ramesh9999@gmail.com> wrote:

>Subject: Read xml file and write data to a txt file using PERL.... urgent

Lesson #1: no such a thing as PERL. It's either Perl or perl.

>I am new to perl and xml.... please help me out with the following as

How new to perl are you? If you're *very* new, then maybe it's not the
best choice. If you also have to do this very urgently, that is.

>this is urgent:

This is not going to help you.

>Can anyone help me with the code....

Yes, WHICH code? However urgent this may be for you, this is not a
help desk and people generally do not provide ready made programs,
only help with previous attempts.

>I have a xml file:
>   <?xml version="1.0" encoding="ISO-8859-1" ?>

Since I'm also new to xml and will always be, probably, whenever I
need to deal with it I choose the simple way, which is in fact called
XML::Simple.

I *wanted* to spoonfeed you a solution, or a sketch of, but you XML
seems broken at my first attempts. (And I don't have either the time
or the technical know how to fix it. Sorry!)


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: 17 Apr 2007 09:31:35 -0700
From: google@macrotex.net
Subject: Re: Socket creation failing with "operation now in progress" error
Message-Id: <1176827495.299384.243710@e65g2000hsc.googlegroups.com>

On Apr 16, 11:33 pm, xhos...@gmail.com wrote:
> goo...@macrotex.net wrote:
> > I am attempting to establish a socket connection using the
> > IO::Socket::INET module and occasionally the socket creation fails
> > with the message "Operation now in progress". From what I understand,
> > this error can only happen when attempting to create a socket in non-
> > blocking mode, never in blocking mode. However, I have explicitly set
> > the Blocking parameter to 1.
>
> What is in "$@"?  That may be a better error message than the one in $!.

The $@ string is empty; the only error information comes from $!.
Isn't $@ only set after an eval? I do not use an eval in my code.






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

Date: 17 Apr 2007 10:46:15 -0700
From: Brian McCauley <nobull67@gmail.com>
Subject: Re: Socket creation failing with "operation now in progress" error
Message-Id: <1176831975.435205.65040@q75g2000hsh.googlegroups.com>

On Apr 17, 1:17 am, goo...@macrotex.net wrote:
> I am attempting to establish a socket connection using the
> IO::Socket::INET module and occasionally the socket creation fails
> with the message "Operation now in progress". From what I understand,
> this error can only happen when attempting to create a socket in non-
> blocking mode, never in blocking mode. However, I have explicitly set
> the Blocking parameter to 1.

>    Timeout   => 30,
>    Blocking  => 1,

But you also set the timeout parameter, which is another form of non-
blocking, and it in fact implemented by putting the socket temporarily
into non-blocking mode.



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

Date: 17 Apr 2007 17:48:11 GMT
From: xhoster@gmail.com
Subject: Re: Socket creation failing with "operation now in progress" error
Message-Id: <20070417134812.864$K3@newsreader.com>

google@macrotex.net wrote:
> On Apr 16, 11:33 pm, xhos...@gmail.com wrote:
> > goo...@macrotex.net wrote:
> > > I am attempting to establish a socket connection using the
> > > IO::Socket::INET module and occasionally the socket creation fails
> > > with the message "Operation now in progress". From what I understand,
> > > this error can only happen when attempting to create a socket in non-
> > > blocking mode, never in blocking mode. However, I have explicitly set
> > > the Blocking parameter to 1.
> >
> > What is in "$@"?  That may be a better error message than the one in
> > $!.
>
> The $@ string is empty;

I didn't expect that.  Usually IO::Socket::INET will at least copy "$!"
into $@ if it can't think of a better error message to stick there.

> the only error information comes from $!.
> Isn't $@ only set after an eval? I do not use an eval in my code.

It is automatically used for evals, but modules are also free to manually
use it as they feel fit.  Modules can make many system calls on your behalf
before they give up, and the error message set in $! by the last one to
fail may not be the most relevant error message, and there may be valuable
context that is not provided by $!.  So a module may set $@ to give you a
"big picture" of the error, rather than the small picture that is in $!.

I'd put something like this after the "use IO::Socket::INET" to try to
track down the path that the error takes:

{ package IO::Socket::INET;
  use Data::Dumper;
  use Carp;
  sub _error { confess Dumper(\@_), ":" }
};

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: 17 Apr 2007 17:55:03 GMT
From: xhoster@gmail.com
Subject: Re: Socket creation failing with "operation now in progress" error
Message-Id: <20070417135505.151$wV@newsreader.com>

Brian McCauley <nobull67@gmail.com> wrote:
> On Apr 17, 1:17 am, goo...@macrotex.net wrote:
> > I am attempting to establish a socket connection using the
> > IO::Socket::INET module and occasionally the socket creation fails
> > with the message "Operation now in progress". From what I understand,
> > this error can only happen when attempting to create a socket in non-
> > blocking mode, never in blocking mode. However, I have explicitly set
> > the Blocking parameter to 1.
>
> >    Timeout   => 30,
> >    Blocking  => 1,
>
> But you also set the timeout parameter, which is another form of non-
> blocking, and it in fact implemented by putting the socket temporarily
> into non-blocking mode.

I would expect it to return a better error message in $@ in this case.  I
don't see what path is being taken that doesn't result in a better error
message in that variable.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

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 354
**************************************


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