Re: Command line vs. cron

2006-09-12 Thread James Marks
On Sep 12, 2006, at 11:02 PM, Mumia W. wrote: On 09/12/2006 11:28 PM, James Marks wrote: Hi folks, I don't know if this is a Perl or UNIX problem and I'm hoping you can help me figure that out. I wrote a script that checks to see if the httpsd and mysqld processes are running on my server an

Re: Command line vs. cron

2006-09-12 Thread Mumia W.
On 09/12/2006 11:28 PM, James Marks wrote: Hi folks, I don't know if this is a Perl or UNIX problem and I'm hoping you can help me figure that out. I wrote a script that checks to see if the httpsd and mysqld processes are running on my server and to log the results of those tests. When I

Re: Command line vs. cron

2006-09-12 Thread James Marks
On Sep 12, 2006, at 10:28 PM, Owen Cook wrote: Here's the script: #!/usr/bin/perl use warnings; use strict; my $log_file = '/home/james/code/cron_code/httpsd_mysqld_log_file'; open FILE_OUT, ">> $log_file" or die "Cannot open log file: $!"; select FILE_OUT; (my $month, my $day, my $y

Re: Command line vs. cron

2006-09-12 Thread Owen Cook
On Tue, 12 Sep 2006, James Marks wrote: > > On Sep 12, 2006, at 9:59 PM, Owen Cook wrote: > > >> Here's the script: > >> > >> #!/usr/bin/perl > >> > >> use warnings; > >> use strict; > >> > >> my $log_file = '/home/james/code/cron_code/httpsd_mysqld_log_file'; > >> > >> open FILE_OUT, ">> $log_

Re: Command line vs. cron

2006-09-12 Thread James Marks
On Sep 12, 2006, at 9:59 PM, Owen Cook wrote: Here's the script: #!/usr/bin/perl use warnings; use strict; my $log_file = '/home/james/code/cron_code/httpsd_mysqld_log_file'; open FILE_OUT, ">> $log_file" or die "Cannot open log file: $!"; select FILE_OUT; (my $month, my $day, my $ye

Re: Command line vs. cron

2006-09-12 Thread Owen Cook
On Tue, 12 Sep 2006, James Marks wrote: > Hi folks, > > I don't know if this is a Perl or UNIX problem and I'm hoping you can > help me figure that out. > > I wrote a script that checks to see if the httpsd and mysqld processes > are running on my server and to log the results of those tests.

Command line vs. cron

2006-09-12 Thread James Marks
Hi folks, I don't know if this is a Perl or UNIX problem and I'm hoping you can help me figure that out. I wrote a script that checks to see if the httpsd and mysqld processes are running on my server and to log the results of those tests. When I run the script from the command line, the sc

Re: Print output of Table on browser as it is being created

2006-09-12 Thread jeffhua
Hi, You just need to print the table lines in a loop when you're querying the datas from db. for example,maybe you can write it like: print ""; while(my $sql_line_ref = $sth->fetchrow_hashref) { print qq {$sql_line_ref->{key1} $sql_line_ref->{key2}

Re: Parse Help

2006-09-12 Thread Dr.Ruud
Dr.Ruud schreef: > John W. Krahn: >> my @p_var = map { >> ( my $x = $_ ) =~ s/=?> } $text =~ /(p_var\d+=?<[^>]*)>/g; >> >> print for @p_var; > > my %p = /(p_var\d+)=?<([^>]*)>/g; > for my $k(sort keys %p) {print "$k='$p{$k}'"} More variants: my %p = /(p_var\d+)=?<([^>]*)>/g; prin

Re: Parse Help

2006-09-12 Thread Dr.Ruud
"John W. Krahn" schreef: > my @p_var = map { > ( my $x = $_ ) =~ s/=? } $text =~ /(p_var\d+=?<[^>]*)>/g; > > print for @p_var; my %p = /(p_var\d+)=?<([^>]*)>/g; for my $k(sort keys %p) {print "$k='$p{$k}'"} -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail:

Re: How to search POD

2006-09-12 Thread Ken Foskey
On Mon, 2006-09-11 at 06:37 -0700, chen li wrote: > Another question: sometimes some PODs are very long I > can't go back once I read to the end. The only way I > can go back is to issue the line code again. Is there > any way around this problem under window prompt? The other trick I use is pod

Re: cpan and make test

2006-09-12 Thread Tom Phoenix
On 9/12/06, Umar Draz <[EMAIL PROTECTED]> wrote: some time i got erorr on make test when i use cpan -i is it possible to bypass ? Sure, if you don't care whether your modules work properly or not. In the long run, though, it's probably worth fixing the bugs. Cheers! --Tom Phoenix Stoneheng

Print output of Table on browser as it is being created

2006-09-12 Thread ubergoonz
I am trying to find out how can i modify my CGI script so that I can it can print out the long table of data as it is running the query. is there any example that I can follow on? -- Best Regards, another perl newbie ubergoonz -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: parse order number from yppoll command

2006-09-12 Thread ubergoonz
Ahh Thanks John !! it works now. On 9/12/06, John W. Krahn <[EMAIL PROTECTED]> wrote: ubergoonz wrote: > I am trying to creat a CGI page that display the ordernumber of the > yppoll output on all my NIS servers, using the following > my $svr_order = `yppoll $nissvr $map | grep order| awk '{pr

Re: temporarily change a function, sort of like doing a local $var;

2006-09-12 Thread JupiterHost.Net
What the statement does local *What::ever = \&my_sub; # with a named sub or local *What::ever = sub { }; # with a closure is to locally redefine the *What::ever{CODE} slot of the glob. Adriano, *you* are awesome! I've been fiddling with this sort of thing dancing around the right w

cpan and make test

2006-09-12 Thread Umar Draz
hi dear members! some time i got erorr on make test when i use cpan -i is it possible to bypass ? Regards, Umar Draz - Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.

Re: temporarily change a function, sort of like doing a local $var;

2006-09-12 Thread Adriano Ferreira
On 9/12/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote: I'm trying to change the behavior of a function (whose use of and call I have no control over) to avoid some nasty behavior in certain circumstances. Its easy enough to redefine it but after the hairy part is done I want to change it back.

Re: Need help Win#2 Directory Walk and testing for file access

2006-09-12 Thread John W. Krahn
Gallagher, Tim F (NE) wrote: > I need to move 3TB of data to a new SAN. I have to make sure that I > have the correct tights to move the data so I want to test my data > before the move. I want to walk the data and see if I have access to > all the files. I am not sure how to test the files to s

temporarily change a function, sort of like doing a local $var;

2006-09-12 Thread JupiterHost.Net
Howdy, I'm trying to change the behavior of a function (whose use of and call I have no control over) to avoid some nasty behavior in certain circumstances. Its easy enough to redefine it but after the hairy part is done I want to change it back. Similar to how you can: { local $var;

Re: Parse Help

2006-09-12 Thread John W. Krahn
John W. Krahn wrote: > > $ perl -le' > my $text = q![20060911 14:47:11]p_var1= KQt=1 HZZ=2: 83,68//p_var2= > KQt=1 HZZ=4: 77,57,52,52//p_var3=<543210987> KQt=1 HZZ=9: > 52,54,48,52,50,57,49,56,50//p_var4=<001> KQt=1 HZZ=3: 48,48,49//p_var5=<12345> > KQt=1 HZZ=5: 49,50,51,52,53//p_var6=<20060907> K

Re: Need help Win#2 Directory Walk and testing for file access

2006-09-12 Thread D. Bolliger
Gallagher, Tim F (NE) am Dienstag, 12. September 2006 20:39: > I need to move 3TB of data to a new SAN. I have to make sure that I > have the correct tights to move the data so I want to test my data > before the move. I want to walk the data and see if I have access to > all the files. I am not

Need help Win#2 Directory Walk and testing for file access

2006-09-12 Thread Gallagher, Tim F \(NE\)
I need to move 3TB of data to a new SAN. I have to make sure that I have the correct tights to move the data so I want to test my data before the move. I want to walk the data and see if I have access to all the files. I am not sure how to test the files to see if I have access or not. I don't

Re: Downloading a file through a filehandle

2006-09-12 Thread Mumia W.
On 09/11/2006 05:58 PM, Robin Sheat wrote: On Tuesday 12 September 2006 10:27, Rob Dixon wrote: [...] What may help is that LWP allows for a callback to be specified in the get() call, so that the downloaded data can be passed in chunks to a user-written subroutine as it arrives. Use $agen

Re: Parse Help

2006-09-12 Thread Jeff Westman
Too easy! THANKS JOHN!!! On 9/12/06, John W. Krahn <[EMAIL PROTECTED]> wrote: Jeff Westman wrote: > Hello, Hello, > I have a string that I would like to parse and change the format. I'm not > that good at 'map' and I'm just looking for a quick-and-dirty way of doing > this. I've tried s

RE: Parse Help

2006-09-12 Thread Charles K. Clarkson
Jeff Westman wrote: : I would like it "cleaned up" to look like : : p_var1='SD' : p_var2='QR44' : p_var3='543210987' : p_var4='001' : p_var5='12345' : p_var6='20060907' : p_var7='000WR44' : p_var8='X' : p_var9='' #!/usr/bin/perl use strict; use warnings; my $input = q{ [20060911 14:47:11]p

Re: Parse Help

2006-09-12 Thread John W. Krahn
Jeff Westman wrote: > Hello, Hello, > I have a string that I would like to parse and change the format. I'm not > that good at 'map' and I'm just looking for a quick-and-dirty way of doing > this. I've tried substr and split, but there has to be a simple way to do > this. > > My text string lo

Parse Help

2006-09-12 Thread Jeff Westman
Hello, I have a string that I would like to parse and change the format. I'm not that good at 'map' and I'm just looking for a quick-and-dirty way of doing this. I've tried substr and split, but there has to be a simple way to do this. My text string looks like [20060911 14:47:11]p_var1= KQt=

Re: Archive Zip

2006-09-12 Thread Derek B. Smith
--- Rob Dixon <[EMAIL PROTECTED]> wrote: > Derek B. Smith wrote: > > > > --- Tom Phoenix <[EMAIL PROTECTED]> wrote: > > > >>On 9/11/06, Derek B. Smith > >><[EMAIL PROTECTED]> wrote: > >> > >>>I need to compress a bunch of files, so instead > of making a system call to > >>>gzip I figured to try ou

Re: How to search POD

2006-09-12 Thread Ken Foskey
On Mon, 2006-09-11 at 06:37 -0700, chen li wrote: > Dear all, > > There are several methods to search POD on window I found podbrowser it is excellent for finding and reviewing pod documents that are installed. http://jodrell.net/projects/podbrowser Thanks Ken Foskey -- To unsubscribe, e-mai

Re: Archive Zip

2006-09-12 Thread Rob Dixon
Derek B. Smith wrote: --- Tom Phoenix <[EMAIL PROTECTED]> wrote: On 9/11/06, Derek B. Smith <[EMAIL PROTECTED]> wrote: I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running this code it creates a new file but is large

Re: Archive Zip

2006-09-12 Thread Derek B. Smith
--- Tom Phoenix <[EMAIL PROTECTED]> wrote: > On 9/11/06, Derek B. Smith > <[EMAIL PROTECTED]> wrote: > > > I need to compress a bunch of files, so instead of > > making a system call to gzip I figured to try out > > Archive::Zip. > > After running this code it creates a new file but > is > > la