XML::Simple()...Add elements...

2003-10-27 Thread Adym Lincoln
Hi all,

Working with XML::*?  I would like to locate a good code example or tutorial on 
XML::Simple() ( XML::Anything() really ) where you read in an XML file and then 
Locate\Delete\Update\ADD data into the xml doc...something like...

- Read in an XML document.
- Locate and element.
- Delete/Update that element...maybe even Add an element.
- Write the XML document back out.

I found a tutorial on O'Reilly, but it's more high-level, pretty much re-hashing 
what's in the actual perldoc stuff.  The perldoc stuff shows you how to work with each 
individual method, but there is nothing on how to work the two methods together.  To 
be honest, not sure I'm even using the right XML module...XML::Simple().

I'm out on Perl Monks right now, swimming thru the forums and docs there, but thought 
I'd drop a question onto this list...

tia,

Adym Lincoln
Edgewater Technology, Inc.
[EMAIL PROTECTED]
.
Can we fix it?  Yes we can!
.

This e-mail and any files transmitted with it are confidential and are intended solely 
for the use of the individual or entity to whom they are addressed.  This 
communication may contain information that is protected from disclosure by applicable 
law.  If you are not the intended recipient, or the employee or agent responsible for 
delivering this communication to the intended recipient, be advised that you have 
received this e-mail in error and any use, dissemination, forwarding, printing or 
copying of this e-mail is strictly prohibited.  If you believe that you have received 
this e-mail in error, please immediately notify Edgewater Technology by telephone at 
(781) 246-3343 and delete the communication from all e-mail files.





___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Getting the full cgi parameter string...

2003-10-27 Thread Adym Lincoln
snip
: I need to retrieve the full parameter string passed to a cgi to then do a
: URL-decoding on it. Pls help!!
: 
: Seth King
: Programmer Analyst
: Hewlett-Packard Boise Site
: The Network Group
: 396-3645
/snip

Seth,

Depending on how the string was posted, one of these should do it...

  if ($ENV{'REQUEST_METHOD'} eq GET) {
$argsCGI = $ENV{'QUERY_STRING'};
  }  #  end if()
  
  elsif ($ENV{'REQUEST_METHOD'} eq POST) {
read(STDIN,$argsCGI,$ENV{'CONTENT_LENGTH'});
  }  #  end elsif()


Adym Lincoln
Edgewater Technology, Inc.
[EMAIL PROTECTED]
.
Can we fix it?  Yes we can!
.

: -Original Message-
: From: KING,SETH (HP-Boise,ex1) [mailto:[EMAIL PROTECTED]
: Sent: Monday, October 27, 2003 1:19 PM
: To: [EMAIL PROTECTED]
: Subject: Getting the full cgi parameter string...
: 
: 
: ___
: ActivePerl mailing list
: [EMAIL PROTECTED]
: To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

This e-mail and any files transmitted with it are confidential and are intended solely 
for the use of the individual or entity to whom they are addressed.  This 
communication may contain information that is protected from disclosure by applicable 
law.  If you are not the intended recipient, or the employee or agent responsible for 
delivering this communication to the intended recipient, be advised that you have 
received this e-mail in error and any use, dissemination, forwarding, printing or 
copying of this e-mail is strictly prohibited.  If you believe that you have received 
this e-mail in error, please immediately notify Edgewater Technology by telephone at 
(781) 246-3343 and delete the communication from all e-mail files.





___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: calling an executable using open()/executable hanging

2003-10-17 Thread Adym Lincoln
snip
: -Original Message-
: From: Marc Weinmann [mailto:[EMAIL PROTECTED]
: Sent: Friday, October 17, 2003 9:44 AM
: To: [EMAIL PROTECTED]
: Subject: calling an executable using open()/executable hanging
: 
: 
: The reason I used open() instead of backticks was that the script didn't
: block till you try to read its output, plus I liked the returned the pid
: of
: the process.  The exe works fine when run by a human, its only when the
: automation calls it a few thousand times that you get one call of it to
: hang.  The quick/easy blame is that the executable needs recompiling for
: Win2k.  But I'm wondering if the way I'm calling this exe could be
: contributing/causing it to hang.
/snip

Marc,

I'm not sure a recompile to Win2K will *totally* get rid of the problem.

What you're describing is basically one process feeding another process it's output.  
We have a similar issue happening with a production system of our own ( on solaris 2.8 
)?  Where we fork() a perl module/object that decrpyts a gpg encrypted file into a 
'named pipe' which then gets fed into the main/parent perl script.  Basically, it's 
the same issue you're dealing with.   out 10,000 times it works perfect, but every 
once in great while, a Perl script will fork() the decryption, and then hang, because 
it never receives any input from the fork'ed() process.

We've never been able to isolate what causes the fork()/spawned process to hang...But 
hearing your problem really perks my interest.  I'm guessing that the line...

my $pid = open( INSCREEN, $cmdline| ) ||

Is essentially creating a 'named pipe' between your Perl script and the process you 
are spawning... If you do find a solution to this, I would be eternally grateful to 
hear it...

Our setup is as follows...
- Perl 5.8.0
- Solaris 2.8


Adym Lincoln
.
Can we fix it?  Yes we can!
.

This e-mail and any files transmitted with it are confidential and are intended solely 
for the use of the individual or entity to whom they are addressed.  This 
communication may contain information that is protected from disclosure by applicable 
law.  If you are not the intended recipient, or the employee or agent responsible for 
delivering this communication to the intended recipient, be advised that you have 
received this e-mail in error and any use, dissemination, forwarding, printing or 
copying of this e-mail is strictly prohibited.  If you believe that you have received 
this e-mail in error, please immediately notify Edgewater Technology by telephone at 
(781) 246-3343 and delete the communication from all e-mail files.





___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: how to interpret the status number

2003-09-03 Thread Adym Lincoln
snip
: -Original Message-
: From: Grace Huang [mailto:[EMAIL PROTECTED]
: Sent: Wednesday, September 03, 2003 2:33 PM
: To: [EMAIL PROTECTED]
: Subject: how to interpret the status number
: I use system call to run b.pl from a.pl. The returning status from b.pl is
: 35584 and b.pl stopped in the middle of its running. How can I interpret
: this status number? Thanks.
: 
: Grace
: --
/snip

On some platforms you need to shift the value returns by 8 bits...

$status = $return-value  8;  -- ( Not sure on the syntax )

I think theres also a limit on Perl...You can only return integer values 0..256, but I 
can't seem to find that tidbit in my Perl Programming book at the moment...Can someone 
else confirm this?

hth,

Adym Lincoln
Edgewater Technology, Inc.
[EMAIL PROTECTED]
(603) 644-2445
(603) 669-8330
.
Can we fix it?  Yes we can!
.


: 
: Hi,
: 
: 
: 
: ___
: ActivePerl mailing list
: [EMAIL PROTECTED]
: To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

This e-mail and any files transmitted with it are confidential and are intended solely 
for the use of the individual or entity to whom they are addressed.  This 
communication may contain information that is protected from disclosure by applicable 
law.  If you are not the intended recipient, or the employee or agent responsible for 
delivering this communication to the intended recipient, be advised that you have 
received this e-mail in error and any use, dissemination, forwarding, printing or 
copying of this e-mail is strictly prohibited.  If you believe that you have received 
this e-mail in error, please immediately notify Edgewater Technology by telephone at 
(781) 246-3343 and delete the communication from all e-mail files.





___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: slurping in win xp vs hpux

2003-06-09 Thread Adym Lincoln
-Original Message-
From: intertwingled [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 10:30 AM
To: Beau E. Cox
Cc: $Bill Luebkert; [EMAIL PROTECTED]
Subject: Re: slurping in win xp vs hpux

Must be that 15 lines of SCO codes that makes all
the difference here.

Tony

O!!!  That was a goood one...Hopefully any SCO/IBM employees on this list can 
take a good joke.

Adym Lincoln
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl 5.8...Multiple versions...

2002-10-18 Thread Adym Lincoln
-Original Message-
From: Jenda Krynicky [mailto:Jenda;Krynicky.cz]
Subject: RE: Threading in Perl 5.8/ Anyone excited???

 Jenda,
 
 Where'd you get the source code?  And what compiler did you use?

Go to
   http://www.perl.com/pub/a/language/info/software.html
and fetch the Stable Production Release

/snip

Hi all,

First off thx to Jenda for pointing me to the 5.8 source.  I just finished the build 
and tests and everything worked great.  I have never done this before...i.e. 
multiple versions of Perl and building it myself.  I ususally just use the binary 
installs, but I want to tinker with multi-threads in Perl.  My approach was rather 
unorthodox, especially given the Windows platform ( and if I've done something wrong 
please tell me )...

1.) Copy the current version of Perl (5.6.1 Build 633) to a new (target) folder.
2.) Edit the makefile.mk for the environment.
3.) Point the makefile.mk install to the new folder.
4.) Build Perl 5.8 into the new folder using nmake.
5.) Run nmake test

I now have two versions or Perl...
C:\Programs\Perl
C:\Programs\Perl-5.8.0

My next question is more of a search on advice then a question.  Now that I have 
multiple versions of Perl running on my Win 2K machine (something I've never done), 
What's the simplest way to manage these...

1.) Setup BAT files that switch the PATH variable so that one version of Perl gets 
precedence before another.
2.) Setup Perl scripts that switch the PATH variable.
3.) Have the Perl scripts call the specific version of Perl you want to execute.
4.) Neither, your screwed...but good luck anyway.

Thx in advance,
/snip

Sorry...Should have been Makefile not makefile.mk...

Adym Lincoln
Edgewater Technology, Inc
(603) 644-2445 - 7261
(603) 669-8330 - fax

 

-Original Message-
From: Jenda Krynicky [mailto:Jenda;Krynicky.cz]
Subject: RE: Threading in Perl 5.8/ Anyone excited???

 Jenda,
 
 Where'd you get the source code?  And what compiler did you use?

Go to
http://www.perl.com/pub/a/language/info/software.html
and fetch the Stable Production Release

/snip

Hi all,

First off thx to Jenda for pointing me to the 5.8 source.  I just finished the build 
and tests and everything worked great.  I have never done this before...i.e. multiple 
versions of Perl and building it myself.  I ususally just use the binary installs, but 
I want to tinker with multi-threads in Perl.  My approach was rather unorthodox, 
especially given the Windows platform ( and if I've done something wrong please tell 
me )...

1.) Copy the current version of Perl (5.6.1 Build 633) to a new (target) folder.
2.) Edit the makefile.mk for the environment.
3.) Point the makefile.mk install to the new folder.
4.) Build Perl 5.8 into the new folder using nmake.
5.) Run nmake test

I now have two versions or Perl...
C:\Programs\Perl
C:\Programs\Perl-5.8.0

My next question is more of a search on advice then a question.  Now that I have 
multiple versions of Perl running on my Win 2K machine (something I've never done), 
What's the simplest way to manage these...

1.) Setup BAT files that switch the PATH variable so that one version of Perl gets 
precedence before another.
2.) Setup Perl scripts that switch the PATH variable.
3.) Have the Perl scripts call the specific version of Perl you want to execute.
4.) Neither, your screwed...but good luck anyway.

Thx in advance,

Adym Lincoln
Edgewater Technology, Inc
(603) 644-2445 - 7261
(603) 669-8330 - fax
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: XML::Parser...Example Code...

2002-10-09 Thread Adym Lincoln

-Original Message-
From: Alan Dickey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 2:42 PM
To: [EMAIL PROTECTED]
Subject: Re: XML::Parser...Example Code...

Adym Lincoln wrote:
 
 Hi all,
 
 Anyone know where I can find example code using the XML::Parser module?  I've been 
reading the Documentation from ActivePerl, but the examples given in there are 
sparse...A search on Google has produced nothing...plenty of entries with no real 
code...
 

check these articles by Kip Hampton:

http://www.xml.com/pub/a/2001/04/18/perlxmlqstart1.html
http://www.xml.com/pub/a/2001/05/16/perlxml.html
http://www.xml.com/pub/a/2001/06/13/perlxml.html


Alan, 

Good articles, but none touch on the XML::Parser module.

I've seen reference to an article by Clark Cooper called Using the Perl XML::Parser, 
but every link is no longer active...Anyone know where this article has gone to?  Or 
if you know of other articles on the XML::Parser?

thx in advance,


Adym Lincoln
Edgewater Technology, Inc
(603) 644-2445 - 7261
(603) 669-8330 - fax

 

-Original Message-
From: Alan Dickey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 2:42 PM
To: [EMAIL PROTECTED]
Subject: Re: XML::Parser...Example Code...


Adym Lincoln wrote:
 
 Hi all,
 
 Anyone know where I can find example code using the XML::Parser module?  I've been 
reading the Documentation from ActivePerl, but the examples given in there are 
sparse...A search on Google has produced nothing...plenty of entries with no real 
code...
 

___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: XML::Parser...Example Code...

2002-10-09 Thread Adym Lincoln

-Original Message-
From: Chris Snyder [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 9:16 AM
To: Adym Lincoln; [EMAIL PROTECTED]
Subject: RE: XML::Parser...Example Code...


Is this it?  http://www.xml.com/pub/a/98/09/xml-perl.html


Chris,

Looks like the one.  The links to the sample code are dead, but I found some sample 
code at the link...

http://www.cisn.org/standards/xml/examples/

The article and sample code should be enough...thx for the help...

Adym Lincoln
Edgewater Technology, Inc
(603) 644-2445 - 7261
(603) 669-8330 - fax

Alan, 

Good articles, but none touch on the XML::Parser module.

I've seen reference to an article by Clark Cooper called Using the Perl 
XML::Parser, but every link is no longer active...Anyone know where this article has 
gone to?  Or if you know of other articles on the XML::Parser?

thx in advance,


Adym Lincoln
Edgewater Technology, Inc

___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Unfamiliar with PPM...

2002-07-24 Thread Adym Lincoln

Hi all,

I am trying to install some packages using PPM and I keep getting the following error 
no matter what I try and install...

Can't locate object method rvalidate via package PPM::XML::PPMConfig::ppmconfig 
(perhaps you forgot to load PPM::XML::PPMConfig::ppmconfig?) at 
D:/Programs/Perl/site/lib/PPM.pm line 1651.

I can not find out what .zip file from the repository I need to download and install 
to fix my PPM installer.  Can anyone point me to the right repository file.

Not sure why it suddenly stopped working, PPM was working on this machine about two 
months ago when I installed XML-RSS.ppm

tia,

Adym Lincoln
Edgewater Technology, Inc.
Phone: (603) 644-2445, 7261
Fax: (603) 669-8330

I made you a kite so you would have to look up. - Uncle Pete
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs