RE: XML::LibXML and comments

2018-09-11 Thread John Cortland Morgan
10, 2018, at 6:33 AM, John Cortland Morgan mailto:johncortland.mor...@ericsson.com>> wrote: Hi, I'm trying to place a comment directly after the XML declaration using XML::LibXML, But cannot seem to manage, always receiving error: setDocumentElement: ELEMENT node required at ..

XML::LibXML and comments

2018-09-10 Thread John Cortland Morgan
Hi, I'm trying to place a comment directly after the XML declaration using XML::LibXML, But cannot seem to manage, always receiving error: setDocumentElement: ELEMENT node required at .../LibXML.pm line 1393 What I would like: testing My relevant code thus far: My $dom = XML::LibXML

RE: Eclipse/Epic/PadWalker for Perl

2018-07-31 Thread John Cortland Morgan
Padwalker needs to be installed befor EPIC, so EPIC knows that it is there. Try to remove EPIC and reinstall. Regards From: Lauren C. Sent: Tuesday, July 31, 2018 3:27 AM To: James Kerwin ; beginners@perl.org Subject: Re: Eclipse/Epic/PadWalker for Perl [OT] maybe you want to change IDE to vi/v

multi-page from Tk::Canvas

2008-11-05 Thread Cort Morgan
Hi,   I am trying to print a canvas using the postscript method, but it's a really big canvas (not too wide, just high / long), and always comes out scaled to a single page. Any easy way to get the postscript method to make it a multi-page document, or should I just start hacking the resultin

what's wrong with this mega-widget?

2008-08-08 Thread Cort Morgan
Hi,   I'm trying to (learn how to) create a mega-widget in Perl/Tk and am hacking some examples from "Mastering Perl/Tk". I apparently do not understand how to use ConfigSpecs. I'm trying to be able to pass arguments to the widget constructor and define default values if the arguments are not s

RE: How to get scalar context of a list within a complex array

2008-06-12 Thread Christopher Morgan
Great! That did it -- thanks, Jeff! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

How to get scalar context of a list within a complex array

2008-06-12 Thread Christopher Morgan
calar context to get its size. How do I do that? (My current approach is to simply iterate through the list, pushing the elements onto another array until I reach "undefined".) Many thanks! - Chris Morgan

stat and timing out on SIGALRM

2008-03-13 Thread Cort Morgan
Hi, I'm trying to check a list of filenames to see if they actually exist. A problem arises if the file is located on a known server but cannot be contacted (ping times out). It seems that perl doesn't timeout, but waits for the stat call to return. My code is based on code taken from the Per

debugger questions

2008-02-01 Thread Cort Morgan
Hi, Can anyone tell me is it possible to look at the current value of a variable in a package method, if the package was included in the main program with a use statement? I've read perldebug, perldebugtut, perldebguts, any web links I can find, and all no help (or I just don't understand

RE: write, print, & Tk::Text

2006-11-28 Thread John Cortland Morgan \(ZG/ETK\)
ehalf Of zentara Sent: Friday, November 24, 2006 5:22 PM To: beginners@perl.org Subject: Re: write, print, & Tk::Text On Thu, 23 Nov 2006 14:24:20 +0100, [EMAIL PROTECTED] ("John Cortland Morgan \(ZG/ETK\)") wrote: >Hi All, > >I'm writing a perl application using Tk for

write, print, & Tk::Text

2006-11-23 Thread John Cortland Morgan \(ZG/ETK\)
Hi All, I'm writing a perl application using Tk for the gui, and wish to write formatted output to a logging window within the gui. But I cannot get write to do as I wish, and think that I don't really understand filehandles so well. Any insight on them would be greatly appreciated. I have the

RE: number rounding problem

2006-08-28 Thread John Cortland Morgan \(ZG/ETK\)
Something with word size of multiplying by 1000, I'd venture. This works as you need, I think: $credit = "64.63"; $amount = $credit * 100; printf "credit %s, amount %12.12d\n", $credit, $amount; $amount = $amount * 10; printf "credit %s, amount %12.12d\n", $credit, $amount; $amount = $amount

RE: perl/Tk and piping questions

2006-08-28 Thread John Cortland Morgan \(ZG/ETK\)
Hi, Thanks for the tip about > The book Mastering Perl/Tk has a pretty good Chapter 3 on Geometry Management. > You can probably read it for free with an sign up at http://safari.oreilly.com/ about the piping question, it's not an either/or situation. It could be both. A good example is t

perl/Tk and piping questions

2006-08-25 Thread John Cortland Morgan \(ZG/ETK\)
Hi, Anyone know of a good online reference/tutorial for perl/Tk, especially in area of layouts (pack/grid/?)? Can't seem to get things lined up as I'd like. Also, anyone know how to (easily) get a script to act more like a pipe, ie: like Unix cat, head, etc... What I would like to be able to

IO::Socket need help

2002-04-03 Thread Morgan Norell
help me with a few hints. I use RH 7.2 and perl 5.6.1 thanks Morgan --- SERVER --- #!/usr/bin/perl -w use IO::Socket; $server_host = "192.168.1.120"; $server_port = 9500; $sock = new IO::Socket::INET (LocalHost => $server_host, LocalPo

Processing a text file

2002-01-25 Thread Morgan Norell
directory and the program will also write every username and mailaddess to the file with the same name. The files should have this format. username[EMAIL PROTECTED] username[EMAIL PROTECTED] Can anyone give me some hints how to do this I'am totaly lost. Morgan. -

how-to update a passwd file

2002-01-11 Thread Morgan Norell
Hi I have a passwd file for my ftp users. I have written a script to add users but I have problems when I'm about to add a uppdate function to the script. Does anyone have a tip how to read the passwd file and update the password field. I use htpasswd to generate passwords now. /Raven --

Database question?

2001-08-24 Thread Morgan Norell
I have a Mysql database and I use a select that looks like this $query = sprintf("SELECT field1,field2,field3,field4 FROM table1 WHERE field2 like 2282 AND %s like '%s'", $searchmode, $showmode); then I take $query for processing. My problem is that I want to sort the query by field2. I have tr

$$ What does it mean?

2001-08-24 Thread Morgan Norell
Can someone tell my why there are two $$ in the row below the for statement, is there any special meaning or ? while (my $ref = $std->fetchrow_arrayref()) { my %resultrow; for (my $i = 0; $i < $numFields; $i++) { $resultrow{$$names[

RE: Perl script editor for NT/2000

2001-08-21 Thread Jonathan M. Morgan
Does anyone use HomeSite? I origianlly used it for HTML and have since started learning Perl... -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Perl script editor for NT/2000 On Mon, 20 Aug 20

Premature End of Script Headers

2001-08-17 Thread Jonathan M. Morgan
I have been unable to get a .cgi script to work on my website. I accessed the error log and saw the following errors: "Premature End of Script Headers" and "Client Sent Malformed Host Header". Can someone please tell me what these errors mean and how I can fix them? Thus far I have been unable

PRELOADING IMAGES FOR A WEB SITE

2001-07-10 Thread Morgan Mackenzie
PERL newbie here! I am using Javascript to preload my images for a web site I am working on. If I can use PERL for everything, I would love too. Any thoughts where I can get information on how to do this (if it's possible. . . what am I saying, w/ PERL everything is possible). Morgan

RegExp

2001-06-30 Thread Morgan
Hi Can someone help me out with a simple question? I need to match some parts if a document. and store it in variables so I can send the matching string into more than one new file. RegExp while (<>) { $pub =~ if (//i .. /<\/pub>/i ) # or is it better with an array

Re: xml problem

2001-06-21 Thread Morgan
t; > > On 19 Jun 2001 13:34:03 +0100, Nigel Wetters wrote: > > I think I can give you some clues. Here's some code out of the Perl Cookbook (6.8 >Extracting a Range of Lines), which I've adapted for you. You should be able to nest >such structures to get what you want. >

Re: xml problem

2001-06-20 Thread Morgan
> I think I can give you some clues. Here's some code out of the Perl Cookbook (6.8 >Extracting a Range of Lines), which I've adapted for you. You should be able to nest >such structures to get what you want. > > > > my $extracted_lines = ''; > > while (<

xml problem

2001-06-19 Thread Morgan
Hi I'm newbee perl developer and a rookie of xml :( Is there anyone who can give me some hints or help me out with a problem I have? Here is the problem. I will recive newsarticles three times a day in xml format and I need to automaticly publish those articels on a web page, on the first page

inserting text into file

2001-04-24 Thread Morgan Seppy
as next unless /^$/ ; but that didn't work either, so since then it has been kludged into the above version. My confusion is apparent in these questions: 1. Why doesn't my regex work? 2. Why does the entry get added at the end of the file if the regex failed? Thanks for any help you can provide, Morgan [EMAIL PROTECTED]