Re: Finding IP address connected to your http server.

2003-01-16 Thread Victor Tsang
how about using mod_status? it shows all the IP connected to the server. Tor. simran wrote: > > if (you are looking for connections that have come in over time) then > look in the log file > else if i you are looking for the ip that is current connecting to the cgi script > you c

Re: Finding IP address connected to your http server.

2003-01-16 Thread simran
if (you are looking for connections that have come in over time) then look in the log file else if i you are looking for the ip that is current connecting to the cgi script you can usually find that info in the environment variable REMOTE_ADDR - $ENV{'REMOTE_ADDR'} else t

Finding IP address connected to your http server.

2003-01-16 Thread tyler
Hey, My friend is doing some web programming with perl, and wanted me to help him do something. He wants to create a script that will show all the IPs that are connected to the http server. I have looked on through several sites, and even a couple fo books I own. Yet I have failed to find a soluti

Re: multi-dimensional array foreach loop...

2003-01-16 Thread John W. Krahn
Mike Liss wrote: > > Ok, > > I think I am beginning to see the light... > but I am still in the dark on this one... > > How would I iterate over these arrays? > > $MyArray[0][0][0] = "A 1"; > $MyArray[0][1][0] = "comment 1"; > > $MyArray[0][0][1] = "A 2"; > $MyArray[0][1][1] = "Comment 2"; >

Re: Splitting a variable

2003-01-16 Thread R. Joseph Newton
"Try: split (/\" *, *\"?/, $data)" Sorry, scratch that plan. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: The number of elements in an array

2003-01-16 Thread John W. Krahn
Robert Monical wrote: > > At 01:12 AM 1/16/2003 -0800, you wrote: > > > >An array in scalar context return the number of elements in the array so > >you probably want: > > > > for ( my $x = 0; $x < @amen; $x++ ) { > > > >Or the more Perlish way: > > > > for my $x ( 0 .. $#amen

Re: help:how to hex2bin,bin2hex,bin2dec,dec2bin

2003-01-16 Thread billy
thanks! - Original Message - From: "simran" <[EMAIL PROTECTED]> To: "billy" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 10:11 AM Subject: Re: help:how to hex2bin,bin2hex,bin2dec,dec2bin > perldoc -f pack > perldoc -f unpack > > > On Sun, 2

Re: help:how to hex2bin,bin2hex,bin2dec,dec2bin

2003-01-16 Thread simran
perldoc -f pack perldoc -f unpack On Sun, 2038-01-17 at 12:55, billy wrote: > are there some commands or function? > thanks for your response. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Splitting a variable

2003-01-16 Thread R. Joseph Newton
"The problem is with the fields that contain the commas between the quotes" . Hi Joshua, Try: split (/\" *, *\"?/, $data) Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

help:how to hex2bin,bin2hex,bin2dec,dec2bin

2003-01-16 Thread billy
are there some commands or function? thanks for your response.

Re: Web Applications.

2003-01-16 Thread David T-G
Joe, et al -- ...and then Joe Echavarria said... % % Hi there, Hi! % % How can i execute a perl/cgi application with its % own web server ?, I want the user to be able to In general, you can't. This is a moderately common thread in the "I want to bundle my web site, scripts and all, o

Re: Splitting a variable

2003-01-16 Thread Jason Tiller
Hi, Joshua, :) On Thu, 16 Jan 2003, Scott, Joshua wrote: > I've got a CSV file which I need to process. The format is as follows. > > "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida > "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California > > I've tried splitting it using: @row = spl

RE: Adding to multi-dimensional array dynamically via push...

2003-01-16 Thread Liss, Mike
I have determined the correct methodology ( in my mind ) for the Particular problem... I have a bunch of data: $Array[ 0 ] = "some data 1"; $Array[ 1 ] = "some data 2"; $Array[ 2 ] = "some data 3"; And I have a function that sets some indices into My "Array" based on specif

Re: Adding to multi-dimensional array dynamically via push...

2003-01-16 Thread R. Joseph Newton
push( @MyArray[ 0 ], 0 ); Hi Mike, I think you need to make up your mind who's doing the work here--you or Perl. The stack functions, push and pop, are intended to let the array handle its own organization, while you concern yourself only with the top element [ie the one most recently insert

Re: Script that runs on my Win98 box and the Unix server

2003-01-16 Thread R. Joseph Newton
"...Is there any way I can have two different paths to the Perl executable, and let my script decide which to use?" Rob Hi Rob, You shouldn't need to, probably. At least on Win 2K, ActiveState Perl ignores the comment line completely. If you have it properly installed, the paths should alredy

Re: Checking to see if input has valid data.

2003-01-16 Thread R. Joseph Newton
if ($TestEMail =~ /\w+@\w+\.\w{2,3}/) {print "$TestEMail\n";} Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: determining location of character in array....

2003-01-16 Thread Toby Stuart
> -Original Message- > From: Liss, Mike [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 17, 2003 10:21 AM > To: [EMAIL PROTECTED] > Subject: determining location of character in array > > > Hello, > > Is there an easy way to get the location of a specific instance of a > charac

RE: Splitting a variable

2003-01-16 Thread Toby Stuart
> -Original Message- > From: Scott, Joshua [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 17, 2003 10:12 AM > To: [EMAIL PROTECTED] > Subject: Splitting a variable > > > I've got a CSV file which I need to process. The format is > as follows. > > "Smith, John J",1/1/2002,1/15/200

Re: write to file

2003-01-16 Thread simran
open(OUT, "> test.txt") || die; print OUT "This is a test...\n"; print OUT "More text...\n"; close(OUT); On Fri, 2003-01-17 at 08:26, [EMAIL PROTECTED] wrote: > How can I write to a file in perl. > > Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

Re: Splitting a variable

2003-01-16 Thread Jenda Krynicky
From: "Scott, Joshua" <[EMAIL PROTECTED]> > I've got a CSV file which I need to process. The format is as > follows. > > "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida > "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California > > I've tried splitting it using: @row = split(",",$data)

Re: determining location of character in array....

2003-01-16 Thread Jenda Krynicky
From: "Liss, Mike" <[EMAIL PROTECTED]> > Is there an easy way to get the location of a specific instance of a > character in an array? > > for example: > > $MyArray = "This is the test"; > > I would like to know the index of the first occurence of the letter > "h" ( 1 ) index $MyArr

Re: Splitting a variable

2003-01-16 Thread simran
Try using the Text::CSV module... On Fri, 2003-01-17 at 10:12, Scott, Joshua wrote: > I've got a CSV file which I need to process. The format is as follows. > > "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida > "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California > > I've tried sp

RE: Splitting a variable

2003-01-16 Thread Scott, Joshua
I figured regular expressions where the solution but I'm just starting to learn how to use regular expressions. Also, only the first field always has a comma between the quotes. The other fields are not consistent. Joshua Scott Security Systems Analyst, CISSP 626-568-7024 -Original Mes

RE: write to file

2003-01-16 Thread Dan Muey
> How can I write to a file in perl. perldoc -f open open(FILEHANDLE, ">$path_to_file") or die $@; print FILEHANDLE $newfilecontents; close(FILEHANDLE); > writes over >> appends < reads open... @lines_in)file = ; close... Dan > > Thomas > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED

Re: determining location of character in array....

2003-01-16 Thread Paul Johnson
On Thu, Jan 16, 2003 at 03:21:13PM -0800, Liss, Mike wrote: > Is there an easy way to get the location of a specific instance of a > character in an array? > > for example: > > $MyArray = "This is the test"; > > I would like to know the index of the first occurence of the letter "h" ( 1

Re: Splitting a variable

2003-01-16 Thread Konrad Foerstner
On Thu, 16 Jan 2003 15:12:05 -0800 "Scott, Joshua" <[EMAIL PROTECTED]> wrote: > I've got a CSV file which I need to process. The format is as follows. > > "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida > "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California > > I've tried splitting

Re: Local Apache Server and CGI?

2003-01-16 Thread R. Joseph Newton
" ... apache isn't seeing *.cgi as a script and is dumping it as a txt file onto the browser..." Hi Ben, Have you configured Apache for the .pl and .cgi extensions? On IIS, I had to explicitly set the server to run these two extensions as perl. I haven't worked with Apache, so I don't know wh

RE: determining location of character in array....

2003-01-16 Thread Mark Anderson
> Is there an easy way to get the location of a specific instance of a > character in an array? > > for example: > >$MyArray = "This is the test"; > > I would like to know the index of the first occurence of the letter "h" ( 1 perldoc -f index index $MyArray,'h'; -- To unsubscribe, e-mail

write to file

2003-01-16 Thread thomas . browner
How can I write to a file in perl. Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

determining location of character in array....

2003-01-16 Thread Liss, Mike
Hello, Is there an easy way to get the location of a specific instance of a character in an array? for example: $MyArray = "This is the test"; I would like to know the index of the first occurence of the letter "h" ( 1 ) Thanks Mike

Splitting a variable

2003-01-16 Thread Scott, Joshua
I've got a CSV file which I need to process. The format is as follows. "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California I've tried splitting it using: @row = split(",",$data); The problem is with the fields that contain the comma

RE: Spreadsheet::WriteExcel - Unix New line

2003-01-16 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]> > I think unix uses \n and winders uses \n\r so you may need to use \n\r > or \r instead of \n It should be \r\n (also read CRLF). And Macs (the old ones) used \r. > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > > I wrote a script that generates an excel f

Re: Hashes and memory consumption

2003-01-16 Thread Jenda Krynicky
From: Schoenwaelder Oliver <[EMAIL PROTECTED]> > I have some problems with a script using hashes. > I use hashes for years but never had this kind of problem before... I > have a ascii file with 6.5 MB of data. This file is tokenized by > Parse:Lex module. The tokens are then stored in a two level

Re: baffling script behavior- root loses files

2003-01-16 Thread Jenda Krynicky
From: zentara <[EMAIL PROTECTED]> > I made a little test case to demonstrate the problem. > The following script is run by root in /home/user: > /home/zentara/backup-homex > -- > - #!/usr/bin/perl -w >

Re: Help for telnet using perl

2003-01-16 Thread Mark Goland
Very CutE !!! Mark - Original Message - From: "Paul Corr" <[EMAIL PROTECTED]> To: "shirish doshi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 16, 2003 12:10 PM Subject: Re: Help for telnet using perl > At 2:49 PM -0800 1/15/03, shirish doshi wrote: > >Hi, > >I a

Re: trouble when calling a shell script for setting an env var

2003-01-16 Thread Konrad Foerstner
> > I need to get a value from an environment variable VALUE. This value is > > set by an shell script which location is stored in anonther environment > > variable called SCRIPT. So I first call the shell script by > > > > `. \$SCRIPT`; > > > > and extract then the value of VALUE by > > > > my

Re: trouble when calling a shell script for setting an env var

2003-01-16 Thread Paul Johnson
On Thu, Jan 16, 2003 at 08:58:22PM +0100, Konrad Foerstner wrote: > I need to get a value from an environment variable VALUE. This value is > set by an shell script which location is stored in anonther environment > variable called SCRIPT. So I first call the shell script by > > `. \$SCRIPT`; >

trouble when calling a shell script for setting an env var

2003-01-16 Thread Konrad Foerstner
He folks! Todays problem: I need to get a value from an environment variable VALUE. This value is set by an shell script which location is stored in anonther environment variable called SCRIPT. So I first call the shell script by `. \$SCRIPT`; and extract then the value of VALUE by my $value =

RE: multi-dimensional array foreach loop...

2003-01-16 Thread david
Mike Liss wrote: > Sorry, > > I should have said... "How would I iterate over these arrays using > foreach" > Mike using foreach? have you try this yet? #!/usr/bin/perl -w use strict; my @array = ([[1..5],[2..6],[7..10]],[[11..15],[16..20],[21..25]]); foreach(my $i = 0; $i < @array; $i++){

Re: Hashes and memory consumption

2003-01-16 Thread david
Schoenwaelder Oliver wrote: > Hi list members, > > I have some problems with a script using hashes. > I use hashes for years but never had this kind of problem before... > I have a ascii file with 6.5 MB of data. This file is tokenized by > Parse:Lex module. i never use this module before so i d

Web Applications.

2003-01-16 Thread Joe Echavarria
Hi there, How can i execute a perl/cgi application with its own web server ?, I want the user to be able to execute my web/based application in his/her local windows pc without a webserver installed locally? Let say http://myapplication:port/, something like that. What module can i use

Re: Request for a CPAN Module

2003-01-16 Thread david
Ben Siders wrote: > Are there any CPAN modules that can analyze XML or HTML and report any > cases of unclosed tags? For example: > > > Hello, world > Me > Hey, is thing thing on? > > > In the above, I'd like to find a method of detecting that the bold tag > is missing a closer.

Re: baffling script behavior- root loses files

2003-01-16 Thread david
Zentara wrote: --- > #!/usr/bin/perl -w > > @users=('/home/zentara'); > > #put all user-root hidden files and hidden dirs into 1 temp dir > #this makes it easier to backup second level subdirs > fore

Re: Help for telnet using perl

2003-01-16 Thread Paul Corr
At 2:49 PM -0800 1/15/03, shirish doshi wrote: Hi, I am a novice in Perl and I want to implement telnet in perl. If you have any tutorials or source code available with you , please forward me. Thanking you in advance, Regards, Shirish Shirish, Perl has the Net::Telnet module: http://search

Re: searching the database with a sub, getting an error message

2003-01-16 Thread Rob Dixon
Le Blanc wrote: > Greetings, > I have a quick question. In the code below I get an error message > that says 'Global symbol "@fields" requires explicit package name' > The line that causes the error is highlighted in red. Obviously it > has to do with how I declared the variable in my subroutine.

Re: Request for a CPAN Module

2003-01-16 Thread Tim Musson
Hey Ben, My MUA believes you used Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021223 to write the following on Thursday, January 16, 2003 at 9:37:34 AM. BS> Are there any CPAN modules that can analyze XML or HTML and report BS> any cases of unclosed tags? For example: I u

searching the database with a sub, getting an error message

2003-01-16 Thread Le Blanc, Kerry (Kerry)
Ok the highlights do not seem to have made it, I marked the line that is getting the error message. Thanks #this is the subroutine to search the file sub search{ open(FILE, ') { chomp; # remove newline my @fields = split(/\|/, $_); # test whether the

Re: multi-dimensional array foreach loop...

2003-01-16 Thread Rob Dixon
Mike Liss wrote: > Ok, > > I think I am beginning to see the light... > but I am still in the dark on this one... > > How would I iterate over these arrays? > > $MyArray[0][0][0] = "A 1"; > $MyArray[0][1][0] = "comment 1"; > > $MyArray[0][0][1] = "A 2"; > $MyArray[0][1][1] = "Comment 2"; > > $MyArr

RE: multi-dimensional array foreach loop...

2003-01-16 Thread Liss, Mike
Sorry, I should have said... "How would I iterate over these arrays using foreach" -Original Message- From: Liss, Mike [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 8:33 AM To: [EMAIL PROTECTED] Subject: multi-dimensional array foreach loop... Ok, I think I am beginning

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
> Paul Kraus wrote: > > Interesting When I run the script on my windows box > (5.6.1) I get > > this output > > DEBUG : NON PRINT ACHAR -011747- > > DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm > - DEBUG : > > NON PRINT ACHAR -139.45- > > > > Same script same

RE: DBI->prepare problem w/ trace

2003-01-16 Thread Dan Muey
Nevermind. I figured it out. It seems that in the routine that contained the eval changed the value of $db_use to $db_user due to my bad typing. Which made it seem like the eval was the problem when it wasn't. So it couldn't prepare the statement because that table didn't exist in the database

Re: Where is the new line coming from.

2003-01-16 Thread Rob Dixon
Paul Kraus wrote: > Interesting When I run the script on my windows box (5.6.1) I get > this output > DEBUG : NON PRINT ACHAR -011747- > DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm - > DEBUG : NON PRINT ACHAR -139.45- > > Same script same source file run on sco o

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
> Interesting When I run the script on my windows box > (5.6.1) I get this output > DEBUG : NON PRINT ACHAR -011747- > DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm - > DEBUG : NON PRINT ACHAR -139.45- > > Same script sam

RE: Where is the new line coming from.

2003-01-16 Thread Paul Kraus
Interesting When I run the script on my windows box (5.6.1) I get this output DEBUG : NON PRINT ACHAR -011747- DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm - DEBUG : NON PRINT ACHAR -139.45- Same script same source file r

multi-dimensional array foreach loop...

2003-01-16 Thread Liss, Mike
Ok, I think I am beginning to see the light... but I am still in the dark on this one... How would I iterate over these arrays? $MyArray[0][0][0] = "A 1"; $MyArray[0][1][0] = "comment 1"; $MyArray[0][0][1] = "A 2"; $MyArray[0][1][1] = "Comment 2"; $MyArray[1][0][0] = "B 1"; $MyArray[1][1]

Re: Variable source for an array assignment

2003-01-16 Thread Rob Dixon
Robert Monical wrote: > Hello > I'm maintaining a 4 year old mod_perl Web application. > > Several months ago, this list helped me to get the following working > > I spent a couple of hours last night trying to figure out if > there is a way to do this in a single statement. > > $val->{'Ammenities'

RE: Catching unknown socket (or unknown handle / filehandle)

2003-01-16 Thread Bob Showalter
Admin-Stress wrote: > Hi, > > In this example, to 'catch' if the socket could not be > created, by using -> or die ""; > > #!/usr/bin/perl -w > use IO::Socket; > $remote = IO::Socket::INET->new( > Proto=> "tcp", > PeerAddr => "localh

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
> attached is a copy of the excel file if it helps. I see it now. It's probably some odd unprintable character. You could try somehting like this that will change unprintable characters to their viewable equivalent ( ascii, hex?? I can't remember.) But I got his form someone a while ago. ($tm

Re: Escaping Ampersands in XML

2003-01-16 Thread Ben Siders
Because of © I don't want that to get changed. In the end, something like: s/&(?!\w+|[#\d]+;/&/g Works. That might not be quite right, but I think you know what I'm getting at. Rob Dixon wrote: Jenda Krynicky wrote: Toby Stuart wrote: Try this one: s/&(?!\w+;)/&/g Proble

searching the database with a sub, getting an error message

2003-01-16 Thread Le Blanc, Kerry (Kerry)
Greetings, I have a quick question. In the code below I get an error message that says 'Global symbol "@fields" requires explicit package name' The line that causes the error is highlighted in red. Obviously it has to do with how I declared the variable in my subroutine. I tried moving curly br

Re: Where is the new line coming from.

2003-01-16 Thread Rob Dixon
Paul Kraus wrote: > attached is a copy of the excel file if it helps. Paul You have CRLF at the end of the line. chomp will only remove the LF. Try s/[[:cntrl:]]$//g; instead of chomp. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

RE: DBI->prepare problem w/ trace

2003-01-16 Thread Dan Muey
Just FYI Here's the entire code surrounding it from db connection to disconnect : my $dbhqq = DBI->connect("DBI:mysql:$db_use:$db_host","$db_user","$db_pass"); $queryqq = "SELECT * FROM $root_table WHERE ID=\'$Root_ID_DB\'"; print $queryqq; #DBI->trace(1,"trace.txt"); ($tmp = $quer

RE: Where is the new line coming from.

2003-01-16 Thread Paul Kraus
attached is a copy of the excel file if it helps. > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 16, 2003 11:03 AM > To: 'Dan Muey'; 'Perl' > Subject: RE: Where is the new line coming from. > > > come to think of it. This "newline" I am gett

RE: httpd and SVG?

2003-01-16 Thread Dan Muey
> Hi list, > > Whenever I load an SVG document into my apache browser > it prints the contents of the XML. I'm presuming that > apache doesn't come equiped to deal with SVG? Is you path to perl /usr/bin/perl ? What? That has nothing to do with your question? Huh that's odd. You really need to g

RE: Where is the new line coming from.

2003-01-16 Thread Paul Kraus
come to think of it. This "newline" I am getting must be a result of windows just dropping my prompt to the next line. So I assumed it was there... Stupid me. I am used to Linux which does not do this in the shell. Ok then this brings me full circle. When I run this program on UNIX it makes an exc

RE: Catching unknown socket (or unknown handle / filehandle)

2003-01-16 Thread Beau E. Cox
Hi - > -Original Message- > From: Admin-Stress [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 16, 2003 5:49 AM > To: perl > Subject: Catching unknown socket (or unknown handle / filehandle) > > > Hi, > > In this example, to 'catch' if the socket could not be created, > by using -

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
> any of the array elements when printed act as if they have a > new line. So it would be the last array element printed. In > the case it could be 3 but it could also be 2 or 4. Then do a froeach loop on each item in the array replacing \n's and \r's and spaces( if you want to kill space that

Variable source for an array assignment

2003-01-16 Thread Robert Monical
Hello I'm maintaining a 4 year old mod_perl Web application. Several months ago, this list helped me to get the following working I spent a couple of hours last night trying to figure out if there is a way to do this in a single statement. $val->{'Ammenities' } is set upstream and is a scalar if

RE: Where is the new line coming from.

2003-01-16 Thread Paul Kraus
any of the array elements when printed act as if they have a new line. So it would be the last array element printed. In the case it could be 3 but it could also be 2 or 4. > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 16, 2003 10:49 AM > To: P

Re: Escaping Ampersands in XML

2003-01-16 Thread Rob Dixon
Jenda Krynicky wrote: >> Toby Stuart wrote: >>> Try this one: >>> >>> s/&(?!\w+;)/&/g > > Problem is that this will break things like > @ > Why not just: s/&(?!amp;)/&/g i.e. change every ampersand that isn't followed by 'amp;' into & Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: Where is the new line coming from.

2003-01-16 Thread Dan Muey
> I am reading in a text file that has input similar to this. > date|data|data|data\n > > I then read the file in and using a while loop I chomp off > the new line. while (){ > chomp; > @line=split /\|/,$_; > $line[2]=~s/ //g; Do you mean $line[3] since that is the last one in the ar

httpd and SVG?

2003-01-16 Thread Ben Crane
Hi list, Whenever I load an SVG document into my apache browser it prints the contents of the XML. I'm presuming that apache doesn't come equiped to deal with SVG? Do I need a special module to install? Or can I modify the httpd file to deal with SVG types (in a sense, switch it on?) e.g.: AddTyp

Catching unknown socket (or unknown handle / filehandle)

2003-01-16 Thread Admin-Stress
Hi, In this example, to 'catch' if the socket could not be created, by using -> or die ""; #!/usr/bin/perl -w use IO::Socket; $remote = IO::Socket::INET->new( Proto=> "tcp", PeerAddr => "localhost", PeerP

Re: Escaping Ampersands in XML

2003-01-16 Thread Jenda Krynicky
> Toby Stuart wrote: > >Try this one: > > > > s/&(?!\w+;)/&/g Problem is that this will break things like @ Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. --

RE: Request for a CPAN Module

2003-01-16 Thread Beau E. Cox
Hi - > -Original Message- > From: Ben Siders [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 16, 2003 4:38 AM > To: Perl > Subject: Request for a CPAN Module > > > Are there any CPAN modules that can analyze XML or HTML and report any > cases of unclosed tags? For example: > > >

Where is the new line coming from.

2003-01-16 Thread Paul Kraus
I am reading in a text file that has input similar to this. date|data|data|data\n I then read the file in and using a while loop I chomp off the new line. while (){ chomp; @line=split /\|/,$_; $line[2]=~s/ //g; print "$_" foreach (@line); last; $count++; last if ($count

Hashes and memory consumption

2003-01-16 Thread Schoenwaelder Oliver
Hi list members, I have some problems with a script using hashes. I use hashes for years but never had this kind of problem before... I have a ascii file with 6.5 MB of data. This file is tokenized by Parse:Lex module. The tokens are then stored in a two level hash: $TokenHash{$TokenType}->{$Token

DBI->prepare problem w/ trace

2003-01-16 Thread Dan Muey
Howdy group, I've also posted this message with the dbi mailing list but so far nothing from them... I have a script that does several queries and I have trouble with one : I can't seem to get a particular query to prepare(). $queryqq = "SELECT * FROM $root_table WHERE ID=\'$Root_ID_DB\'"; P

Re: JavaScript/Perl Genius Sought

2003-01-16 Thread Rob Dixon
Dan Muey wrote: >> Dan et all >> >>> I also am applying for genius, looks good on resume! >>> Actually it's wizz400 and wizz400 lowercase 'W' >>> I logged in fine but am not quite sure what the problem is. Could >>> you elaborate what your'e trying to figure out? May be I missed an >>> earlier post

Re: The number of elements in an array

2003-01-16 Thread Robert Monical
At 01:12 AM 1/16/2003 -0800, you wrote: Robert Monical wrote: > > Hello, Hello, > I'm away from my Perl book and hope one of you will help me. > > Would somebody please remind me how to make this line work > > for ($x=0;$x<$#{@amen};$x++){ > > right now, the loop only executes once. An

RE: JavaScript/Perl Genius Sought

2003-01-16 Thread Dan Muey
> Dan et all > > >I also am applying for genius, looks good on resume! > >Actually it's wizz400 and wizz400 lowercase 'W' > >I logged in fine but am not quite sure what the problem is. > Could you > >elaborate what your'e trying to figure out? May be I missed > an earlier > >post about it > >

RE: JavaScript/Perl Genius Sought

2003-01-16 Thread Maurice O'Prey
Dan et all >I also am applying for genius, looks good on resume! >Actually it's wizz400 and wizz400 lowercase 'W' >I logged in fine but am not quite sure what the problem is. >Could you elaborate what your'e trying to figure out? >May be I missed an earlier post about it The problem has been res

RE: Database Issues

2003-01-16 Thread Dan Muey
> Hi, Howdy > > I have written a perl program that is supposed to search for > a set of customer details on our database and return them 1 > after the other. The problem is that it is returning the > customers as well as cdetail id, type, checksum. The problem > is that is returning the check

RE: JavaScript/Perl Genius Sought

2003-01-16 Thread Dan Muey
> > All > > > > I have to admit defeat on this one and will gladly > acknowledge anyone > > who solves it as a genius! The Perl script below is part of an > > application which can be tested at > > > > http://www.demo.wizz400.com/scripts/cgi-bin/wizz400/wizz400sop.pl > > > > You can login wi

RE: Spreadsheet::WriteExcel - Unix New line

2003-01-16 Thread Dan Muey
I think unix uses \n and winders uses \n\r so you may need to use \n\r or \r instead of \n Or someother line ending \f or?? Dan > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 16, 2003 7:45 AM > To: Perl > Subject: Spreadsheet::WriteExcel -

Request for a CPAN Module

2003-01-16 Thread Ben Siders
Are there any CPAN modules that can analyze XML or HTML and report any cases of unclosed tags? For example: Hello, world Me Hey, is thing thing on? In the above, I'd like to find a method of detecting that the bold tag is missing a closer. -- To unsubscribe, e-mail: [EMAIL PROTE

baffling script behavior- root loses files

2003-01-16 Thread zentara
Hi, I'm just stumped by this one. It all started when I was trying to work out a backup method of backing up all subdirs of /home/user as individual tarballs. So I wanted to copy everything from the user's top level directory to a temporary backup directory. This included all hidden file, hidden di

Re: Escaping Ampersands in XML

2003-01-16 Thread Ben Siders
Whew! That's the same one I finally came up with. Glad to see I was on the right track. The original solution didn't work at all. Toby Stuart wrote: -Original Message- From: Ben Siders [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 7:38 AM To: Perl Subject: Escaping Am

Spreadsheet::WriteExcel - Unix New line

2003-01-16 Thread Paul Kraus
I wrote a script that generates an excel file. I tested it on a windows xp pro machine and everything was ok. When I put the script on the UNIX server and run it I get blocks on my excel sheet where new lines occurred. How can I have the UNIX Perl write out Microsoft new line characters so that the

Script works on one machine not the other?

2003-01-16 Thread Samuelsson, David
I have happily been having a script running to add users into groups. Suddenly one of the scripts on 1 machine stopped working, while the other machine, setup like the first machine works, it's the same script in both, whats altered is the machine name. I even copyed the script from the machine tha

Re: question on nested if

2003-01-16 Thread John W. Krahn
Seamus Carr wrote: > > I'm trying to count first occurrence of a pattern in a block of lines > which have the same number in first field. I was using if statements to > test the conditions. The problem is that it reads the pattern of every > line, not skipping rest of the block if the pattern ha

Re: Network Administration and Perl

2003-01-16 Thread Jenda Krynicky
I'm not a network admin now. Currently I use Perl for things like: Preprocessing and archiving log files, searching for errors and unexpected messages them and mailing the result to me for review. Indexing the files on the production, QA and development servers and generating ZIPs with the file

Re: Escaping Ampersands in XML

2003-01-16 Thread Jenda Krynicky
From: Ben Siders <[EMAIL PROTECTED]> > I've got a real easy one here (in theory). I have some XML files that > were generated by a program, but generated imperfectly. There's some > naked ampersands that need to be converted to &. I need a regexp > that will detect them and change them. Sounds

Performance of Net::SNMP

2003-01-16 Thread Wim
Hi all! I'm some writing scripts using the module Net::SNMP. Is this module a performant one, or are there faster ones available? I tried the SNMP module that uses Net_SNMP, but the last version is from 2000 and I could get it installed... Thanx! Wim -- To unsubscribe, e-mail: [EMAIL PROTEC

Apache & WINNT : Thank you note...

2003-01-16 Thread Ben Crane
Hi, I just wanted to say a HUGE thank you to: David Kirol Bob Showalter Dan Muey for their combined help in getting perl to work on my apache server...it was a combination of sorting out the httpd file and changing the perl path from #!usr/local/bin/perl to #!c:/perl/bin/perl.exe (something I di

RE: Perl book

2003-01-16 Thread Meidling, Keith, CTR, OSD-C3I
A great starter book I used was Beginning Perl by Simon Cozens, published by Wrox. ISBN - 1861003145. I use it as a quick reference as well. I recommend it highly to anyone learning perl. -Original Message- From: Ben Siders [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 15, 2003 11:5

Re: question on nested if

2003-01-16 Thread Rob Dixon
Hi Seamus Seamus Carr wrote: > I'm trying to count first occurrence of a pattern in a block of lines > which have the same number in first field. 'Count the first occurrence'? That would be '1' ;-) > I was using if statements > to test the conditions. The problem is that it reads the pattern of

Weekly list FAQ posting

2003-01-16 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

RE: Help for telnet using perl

2003-01-16 Thread Beau E. Cox
Hi - > -Original Message- > From: shirish doshi [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 12:50 PM > To: [EMAIL PROTECTED] > Subject: Help for telnet using perl > > > Hi, >I am a novice in Perl and I want to implement > telnet in perl. If you have any tutorials o

RE: floating-point number on the right side with sprintf

2003-01-16 Thread Beau E. Cox
Hi - > -Original Message- > From: Konrad Foerstner [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 11:27 AM > To: [EMAIL PROTECTED] > Subject: floating-point number on the right side with sprintf > > > Hi, > > I have a problem with formating my output. I use sprintf to fo

  1   2   >