Printing html document

2004-09-24 Thread victor
I need to print a html page using a button(but not the mozilla or explorer button). So I need I button in a web page that will print that page to a printer that is not attached to the local computer, but to the web server where the page is hosted. The problem is that when I send a

Background info

2004-09-24 Thread Sander
After recent web host problems, we decided to host our own website. My hosting server is running Win XP with Apache 2.3.1 on it. My site is working but now I am trying to work out the kinks. We use a simple formmail.cgi script to allow visitors to submit a questionaire. What do I need to

Re: Printing html document

2004-09-24 Thread David Dorward
On Fri, Sep 24, 2004 at 12:12:33PM +0300, victor wrote: So I need I button in a web page that will print that page to a printer that is not attached to the local computer, but to the web server where the page is hosted. The problem is that when I send a html page it prints all the

Re: Background info

2004-09-24 Thread Chris Devers
On Thu, 23 Sep 2004, Sander wrote: After recent web host problems, we decided to host our own website. My hosting server is running Win XP with Apache 2.3.1 on it. Are you sure about this? The current version of Apache2 is 2.0.51. My site is working but now I am trying to work out the

Re: Background info

2004-09-24 Thread Gunnar Hjalmarsson
Sander wrote: Will Apache be able to send mail No. or does sendmail need to communicate with a different mail server. You need a mail server, a mail transfer agent (MTA) to be precise, to send mail. If you don't have one installed locally, such as sendmail or Postfix, it's possible to use a

ordered hash

2004-09-24 Thread brian larochelle
Hello, I was hoping to get a little advice creating a cgi form. I want to create a popup menu to list all the states in the US( and then later countries), I want to store all the values in variables to pass to the subroutines later on. The below code works, I just have the values for the

Re: ordered hash

2004-09-24 Thread Chris Devers
On Fri, 24 Sep 2004, brian larochelle wrote: ordered hash Hashes are, almost by definition, unordered lists of key/value pairs. If you want to work with one in order, add a sort command to accesses: my @sorted_keys = sort keys %hash; foreach $key @sorted_keys { my $value =

Re: ordered hash

2004-09-24 Thread brian larochelle
Thank you for your quick response Chris. That makes perfect sense. Except for the last value of 'other' which I would want at the end of the list and a choice for the person filling out the form is they did not live in the US. Chris Devers wrote: On Fri, 24 Sep 2004, brian larochelle wrote:

Re: ordered hash

2004-09-24 Thread Chris Devers
On Fri, 24 Sep 2004, brian larochelle wrote: That makes perfect sense. Except for the last value of 'other' which I would want at the end of the list and a choice for the person filling out the form is they did not live in the US. A common way around this is to leave other out of the hash:

RE: regex help

2004-09-24 Thread Raymond Raj
Hi! what's problem in these regular expressions.. every thing correct! do you need to convert one or more than one match into single replacement then regexp should be $safeString =~ s/\s+/_/g; -Original Message- From: Johnstone, Colin [mailto:[EMAIL PROTECTED] Sent: Friday,

RE: regex help

2004-09-24 Thread Johnstone, Colin
Thank you I musthave just coded something wrong, your right they do work. Sorry! -Original Message- From: Raymond Raj [mailto:[EMAIL PROTECTED] Sent: Friday, September 24, 2004 3:55 PM To: Johnstone, Colin; [EMAIL PROTECTED] Subject: RE: regex help Hi! what's problem in these regular

Re: LM an NT hashes

2004-09-24 Thread Luis Daniel Lucio Quiroz
I has my self, I found Crypt-Smb moduloe por perl, for those that use MDK I buid the SRPM at http://www.linuxchange.com/download/Mandrake%20Official%2010/samba/Perl-Crypt-Smb-0.02-1mdk.src.rpm CU LD Le jeudi 23 Septembre 2004 20:15, Luis Daniel Lucio Quiroz a écrit : I wonder if someone has

extern varibales

2004-09-24 Thread Christian Stalp
Hello together, I have this problem of global variables again. But in my case I need a varibale, a string, which should be known in all my modules. I put some of my functions out in modules which I call when I use them but all these functions also need some directory-pathes as strings. At the

Re: speed up string matching

2004-09-24 Thread c r
Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: C R wrote: Gunnar Hjalmarsson wrote: C R wrote: Are you certain that using the module makes the simultaneous matching faster than a sequential and to what degree (roughly)? Certain? Certainly not. :) It depends, among other things, on your

Re: Calling Perl From Java?

2004-09-24 Thread Levon Barker
I have had to do this. Did a fair bit of research and the best that I could come up with (and what we have implemented) is to call mod_perl url from java. That way we don't have to recompile each time, and get some database persistance with Apache::DBI. Works out quite well. On Sep 23, 2004

Moving between hashes 2.

2004-09-24 Thread Michael Robeson
Gunnar, Thanks so much for the help and the links! They help quit a bit. I decided to use the if statement you posted: if ( $aa eq '-' ) { $hash3{$_} .= '---'; } else { $hash3{$_} .= substr $dna,0,3,''; } instead of: $hash3{$_} .=

Help with putting a subroutine into a variable?

2004-09-24 Thread Gavin Henry
Hi all, I have this: - #!/usr/bin/perl use warnings; use strict; my @pics = *.jpg; my $website = 'http://www.website.com/uploads'; sub links { foreach (@pics) { print a href=\$website/$_\$website/$_/a\n; } } - I would normally call

SIGZERO

2004-09-24 Thread Errin Larsen
Hi Perlers, I'm trying to check on the status of a process by sending a SIGZERO to it with kill(). This SHOULD (according to the docs I've been reading) return false if the process died. But mine is not. It always returns true. if( kill 0 = $pid ) { print the process is OK\n; } else {

Re: SIGZERO

2004-09-24 Thread Errin Larsen
On Fri, 24 Sep 2004 09:17:58 -0500, Errin Larsen [EMAIL PROTECTED] wrote: Hi Perlers, I'm trying to check on the status of a process by sending a SIGZERO to it with kill(). This SHOULD (according to the docs I've been reading) return false if the process died. But mine is not. It always

Re: Help with putting a subroutine into a variable?

2004-09-24 Thread Wiggins d Anconia
Hi all, I have this: - #!/usr/bin/perl use warnings; use strict; Good start. my @pics = *.jpg; my $website = 'http://www.website.com/uploads'; sub links { foreach (@pics) { print a href=\$website/$_\$website/$_/a\n; } } Your sub

RE: SIGZERO

2004-09-24 Thread Ed Christian
Errin Larsen wrote: Hi Perlers, snip if( kill 0 = $pid ) { snip Forgive me if I presume too much, but shouldn't the above be: if( kill 0, $pid ) { perldoc -f kill -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Moving between hashes 2.

2004-09-24 Thread Gunnar Hjalmarsson
Michael Robeson wrote: I decided to use the if statement you posted: snip only because I had to add a $count++ function within the else statement (shown below) to accomplish another task within my larger script: if ( $aa eq '-' ) { $hash3{$_} .= '---'; } else {

RE: SIGZERO

2004-09-24 Thread Jenda Krynicky
From: Ed Christian [EMAIL PROTECTED] Errin Larsen wrote: Hi Perlers, snip if( kill 0 = $pid ) { snip Forgive me if I presume too much, but shouldn't the above be: if( kill 0, $pid ) { Those two are equivalent. perl -MO=Deparse -e kill 0 = $pid prints

Re: SIGZERO

2004-09-24 Thread Errin Larsen
On Fri, 24 Sep 2004 10:31:36 -0400, Ed Christian [EMAIL PROTECTED] wrote: Errin Larsen wrote: Hi Perlers, snip if( kill 0 = $pid ) { snip Forgive me if I presume too much, but shouldn't the above be: if( kill 0, $pid ) { perldoc -f kill Jenda is correct. I like to

RE: SIGZERO

2004-09-24 Thread Ed Christian
Errin Larsen wrote: On Fri, 24 Sep 2004 10:31:36 -0400, Ed Christian [EMAIL PROTECTED] wrote: Errin Larsen wrote: Hi Perlers, snip if( kill 0 = $pid ) { snip Forgive me if I presume too much, but shouldn't the above be: if( kill 0, $pid ) { perldoc -f kill Jenda

Re: Help with putting a subroutine into a variable?

2004-09-24 Thread Gavin Henry
Your sub breaks encapsulation because it relies on the fact that @pics and $website are available in the sub but have not been passed into it. Generally we want our subs to take arguments and return values. If you were to move this sub to the top of the file or to another file (such as a

Re: Help with putting a subroutine into a variable?

2004-09-24 Thread Gavin Henry
Wiggins d Anconia said: Hi all, I have this: - #!/usr/bin/perl use warnings; use strict; Good start. Courtesy of the Lama :-) my @pics = *.jpg; my $website = 'http://www.website.com/uploads'; sub links { foreach (@pics) { print a

Re: SIGZERO

2004-09-24 Thread Errin Larsen
Ok, I learned something else ... When I type: kill -9 SOME_PROCESS_ID on the command line, It's not actually killing the process. Let me explain. My script starts 3 others and then stays around watching them. So, when I run it, I get this: # ps -ef | grep dummy user1 18000 1 0 10:04:22 ?

Re: SIGZERO

2004-09-24 Thread Jenda Krynicky
From: Errin Larsen [EMAIL PROTECTED] See that defunct?! How did my process get a defunct status? Is that a Solaris-fancy way of saying zombie-child? I believe so. The above explains why my (kill 0 = $pid) isn't working the way I expect, but How can I kill the kid. The defunct child

Re: Help with putting a subroutine into a variable?

2004-09-24 Thread Wiggins d Anconia
Wiggins d Anconia said: snip sub links { my ($base_url, @list) = @_; foreach my $element (@list) { print . } return; } Doesn't this still get the scalar and array from what I defined at the top? No, note that I have changed the names (on purpose) so

Re: SIGZERO

2004-09-24 Thread Errin Larsen
On Fri, 24 Sep 2004 17:20:44 +0200, Jenda Krynicky [EMAIL PROTECTED] wrote: From: Errin Larsen [EMAIL PROTECTED] See that defunct?! How did my process get a defunct status? Is that a Solaris-fancy way of saying zombie-child? I believe so. The above explains why my (kill 0 = $pid)

Re: SIGZERO

2004-09-24 Thread Wiggins d Anconia
From: Errin Larsen [EMAIL PROTECTED] See that defunct?! How did my process get a defunct status? Is that a Solaris-fancy way of saying zombie-child? I believe so. I do as well. The above explains why my (kill 0 = $pid) isn't working the way I expect, but How can I kill the

Re: SIGZERO

2004-09-24 Thread Errin Larsen
On Fri, 24 Sep 2004 10:34:50 -0500, Errin Larsen [EMAIL PROTECTED] wrote: On Fri, 24 Sep 2004 17:20:44 +0200, Jenda Krynicky [EMAIL PROTECTED] wrote: From: Errin Larsen [EMAIL PROTECTED] SNIP how do I wait() or waitpid() on more than one process? don't both of those make the wait()ing

Re: SIGZERO

2004-09-24 Thread DBSMITH
I am a beginner, but I love to see all the knowledge transfer so keep the moderate to difficult questions coming! thanks, Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams 614-566-4145 Errin Larsen [EMAIL PROTECTED] 09/24/2004 11:44 AM Please respond to Errin Larsen To:

Re: SIGZERO

2004-09-24 Thread Wiggins d Anconia
On Fri, 24 Sep 2004 10:34:50 -0500, Errin Larsen [EMAIL PROTECTED] wrote: On Fri, 24 Sep 2004 17:20:44 +0200, Jenda Krynicky [EMAIL PROTECTED] wrote: From: Errin Larsen [EMAIL PROTECTED] SNIP how do I wait() or waitpid() on more than one process? don't both of those make the

Re: SIGZERO

2004-09-24 Thread Errin Larsen
On Fri, 24 Sep 2004 11:52:19 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am a beginner, but I love to see all the knowledge transfer so keep the moderate to difficult questions coming! SNIP I'm like you, Derek! I love just reading this stuff. Satisfies some inner-geek need I have!

How do I get rid of 

2004-09-24 Thread William Martell
Hi All, This  is in a text file that I am working with. I am trying to remove it, but it seems to be a different character in different places throughout the text, even though to me, when viewed in Textpad text editor, it looks the same. Is there a special hex code or something that I

How to check the FILE HANDLE STATUS ???

2004-09-24 Thread Madhu Reddy
hi, I want to check the status of File handle before reading/writing to file ? How to do this ? like following open(FH_IN_FILE, file.txt); # This statement is executed by some other function close(FH_IN_FILE); print FH_IN_FILE SOME DATA; here before writing to file, i want to check the

Re: How do I get rid of 

2004-09-24 Thread Ajey Kulkarni
if you open the file in vi,say :%s/ctrl-v ctrl-p//g You can check $line =~ s/ctrl-v ctrl-p//g; Mainly ^ = ctrl-v P = ctrl-p regards -Ajey On Thu, 23 Sep 2004, William Martell wrote: Hi All, This  is in a text file that I am working with. I am trying to remove it, but it

Re: XMLin() not finding XML::SAX or XML::Parser modules Problem

2004-09-24 Thread Ajey Kulkarni
I installed the expat libs,but the cpan shell is now asking for EXPATLIBPATH and EXPATINCPATH. It says perl Makefile.PL path_to_libraries Now,how do i specify these paths for XML::Module installation?? Where is this Makefile.PL file? Regards again -Ajey On Thu, 23 Sep 2004, Chris Devers

Re: How to check the FILE HANDLE STATUS ???

2004-09-24 Thread Wiggins d Anconia
hi, I want to check the status of File handle before reading/writing to file ? How to do this ? like following open(FH_IN_FILE, file.txt); Which itself is a bad idea, always check that the open succeeded in the first place, open FH_IN_FILE, file.txt or die Can't open file for

Re: XMLin() not finding XML::SAX or XML::Parser modules Problem

2004-09-24 Thread Chris Devers
On Fri, 24 Sep 2004, Ajey Kulkarni wrote: I installed the expat libs,but the cpan shell is now asking for EXPATLIBPATH and EXPATINCPATH. Oh. That. Yeah, that's a pain. The first thing is to get Expat installed, which I forgot about before. Instructions for this will vary depending what OS

Re: XMLin() not finding XML::SAX or XML::Parser modules Problem

2004-09-24 Thread Wiggins d Anconia
On Fri, 24 Sep 2004, Ajey Kulkarni wrote: I installed the expat libs,but the cpan shell is now asking for EXPATLIBPATH and EXPATINCPATH. Oh. That. Yeah, that's a pain. The first thing is to get Expat installed, which I forgot about before. Instructions for this will vary depending

Re: How to check the FILE HANDLE STATUS ???

2004-09-24 Thread Dave Gray
open(FH_IN_FILE, file.txt); # This statement is executed by some other function close(FH_IN_FILE); print FH_IN_FILE SOME DATA; here before writing to file, i want to check the status of FH_IN_FILE..(whether file is opened or closed ) You could do something like the following: -

Re: Daemon that starts other Daemons

2004-09-24 Thread Bob Showalter
Errin Larsen wrote: Ok ... so with some research and playi^H^H^H^H^Htesting I've found the answer to what's really been bothering me. If you *really* want to understand the nuts and bolts of all this, Stevens' _Advanced Programming in the UNIX Environment_ is a must.

Re: How to check the FILE HANDLE STATUS ???

2004-09-24 Thread John W. Krahn
Madhu Reddy wrote: hi, Hello, I want to check the status of File handle before reading/writing to file ? How to do this ? like following open(FH_IN_FILE, file.txt); # This statement is executed by some other function close(FH_IN_FILE); print FH_IN_FILE SOME DATA; here before writing to file,

Re: How do I get rid of 

2004-09-24 Thread John W. Krahn
William Martell wrote: Hi All, Hello, This  is in a text file that I am working with. I am trying to remove it, but it seems to be a different character in different places throughout the text, even though to me, when viewed in Textpad text editor, it looks the same. Is there a special hex

Re: Daemon that starts other Daemons

2004-09-24 Thread John W. Krahn
Bob Showalter wrote: Errin Larsen wrote: Ok ... so with some research and playi^H^H^H^H^Htesting I've found the answer to what's really been bothering me. If you *really* want to understand the nuts and bolts of all this, Stevens' _Advanced Programming in the UNIX Environment_ is a must.

How to return 'k'-cliques in a graph

2004-09-24 Thread Edward WIJAYA
Dear all, I have a following code that find a k-clique within a graph. k-Clique is a complete subgraph of size 'k'. (Please see the attached picture). Currently running this code gives: $ perl graph.pl 3 5 6 9 $ perl graph.pl 4 1 2 3 4 As you can see the code below only return the