Re: newbie need help

2003-01-16 Thread Laird Shaw
The problem is that it is printing something for each line regardless of whether it has already found a match. What you need to do is save whether you have found a match or not in a variable, then selectively print, ie: a) set your variable to be false - ie indicating that you haven't found a

Making script case insensitive

2003-01-16 Thread Bob Williams
How can this script compare two lists and save the matched components while being insensitive to case? This script compares a subscription list against the standard list and removes the emails not in the standard list. It works, but if cases do not match in every detail, it fails. Thanks.

Weekly list FAQ posting

2003-01-16 Thread casey
NAME beginners-faq - FAQ for the beginners-cgi 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

Re: HTTP headers

2003-01-16 Thread William McKee
Hi Philip, I looked at the script. How are you running it? From the command line or from a web server? It works fine on the comand line and from the server for me. What server are you using to display it? I'm using Apache. If you are running it from the server you may need to include -nph = 1

RE: cgi.pm generate html vs. print EndOfHTML;

2003-01-16 Thread Hughes, Andrew
Thanks for the feedback. Before I get started on the html::template tutorial, I wanted to try a quick sample page using html::template. However, when I try it, I cannot get the tag in the html to process. Could someone take a look and let me know what you think I am doing incorrectly?

RE: cgi.pm generate html vs. print EndOfHTML;

2003-01-16 Thread fliptop
On Thu, 16 Jan 2003 at 11:49, Hughes, Andrew opined: HA:Thanks for the feedback. Before I get started on the html::template HA:tutorial, I wanted to try a quick sample page using html::template. HA:However, when I try it, I cannot get the tag in the html to process. Could HA:someone take a look

Re: HTTP headers

2003-01-16 Thread Philip Pawley
Thanks William, The server is Apache. I was calling the script using an SSI in an html page: !--#include virtual=/cgi-bin/test.cgi -- I just tried calling the script directly with the browser and that did work. I suppose this means that you can't alter the headers using a script called with a

RE: cgi.pm generate html vs. print EndOfHTML;

2003-01-16 Thread Hughes, Andrew
I added the content header line, and it does not work with that in there. I am pointing to the results.tmpl file which is in the same folder as the the .pl script. I found another test script on the web on another website, and I have the same problem -- the tags are not replaced with the

Re: Making script case insensitive

2003-01-16 Thread Octavian Rasnita
You need to transform the variable using the lc function (or the uc). Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: Bob Williams [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 16, 2003 2:13 PM Subject: Making script case

Re: newbie need help

2003-01-16 Thread Glynn S. Condez
From: Laird Shaw [EMAIL PROTECTED] Hi Laird, Your email help me alot on how to handle this kind of problem. actually, i solved the problem by adding a variable and additional if: my $see = 'N'; if ($see eq 'N') { if ($username =~ /\b$field2\b/) { $see = 'Y'; } else

The number of elements in an array

2003-01-16 Thread Robert Monical
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. TIA Robert Monical [EMAIL PROTECTED] (mailing list stuff) [EMAIL PROTECTED] (everything

Re: The number of elements in an array

2003-01-16 Thread Victor Tsang
for ($x=0; $x scalar(@amen); $x++) Tor. Robert Monical wrote: 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. TIA

Re: The number of elements in an array

2003-01-16 Thread John W. Krahn
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 array in scalar context return the number of

JavaScript/Perl Genius Sought

2003-01-16 Thread Maurice O'Prey
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 with a user ID of Wizz400 and a password of

Re: JavaScript/Perl Genius Sought

2003-01-16 Thread Rob Dixon
Maurice O'Prey wrote: All I have to admit defeat on this one and will gladly acknowledge anyone who solves it as a genius! Maurice This isn't really a beginners Perl question, so don't be surprised if you get an objector or two. However, unrelated to your problem is the suggestion that you

Re: JavaScript/Perl Genius Sought

2003-01-16 Thread Rob Dixon
Maurice O'Prey wrote: All I have to admit defeat on this one and will gladly acknowledge anyone who solves it as a genius! Maurice, OK, here's what I think is happening. You have a body tag (curiously inside your form) with an onkeydown attibute of shortcut(). You also have several input

Network Administration and Perl

2003-01-16 Thread squiggle
I use it on a MS network to log logins, report on how much space people are using for their home directories and condense the information from 14 servers' daily backup logs onto a single html page. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

floating-point number on the right side with sprintf

2003-01-16 Thread Konrad Foerstner
Hi, I have a problem with formating my output. I use sprintf to format a floating-point number. My output with %.4f looks like this: 111.5611 21.4870 10.7046 8.8443 8.6823 but I would like to see it that way: 111.5611 21.4870 10.7046 8.8443 8.6823 So, a kind of

Re: Network Administration and Perl

2003-01-16 Thread Bob X
Paul Kraus [EMAIL PROTECTED] wrote in message 005f01c2bc9f$8cff78d0$64fea8c0@pkrausxp">news:005f01c2bc9f$8cff78d0$64fea8c0@pkrausxp... What are some of the ways you guys use Perl for network administration? 1. I search an FTP site daily for updated files that I then download and use to creat

Help for telnet using perl

2003-01-16 Thread shirish doshi
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 __ Do you Yahoo!? Yahoo! Mail Plus - Powerful.

question on nested if

2003-01-16 Thread Seamus Carr
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 has been matched. Putting

Database Issues

2003-01-16 Thread Caroline Warnock
Hi, 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 checksum the same amount of

IP address

2003-01-16 Thread Muhikanta Nath
Dear Sir, I am not able to understand about IP/Subnet Calculation as I amnot understand properly about IP and Use of IP. I am trying to understand these by reading books but not able to understand completely. Pls. give some idea redarding this. Rgds Muhi Assam

RE: JavaScript/Perl Genius Sought

2003-01-16 Thread Beau E. Cox
Hi - -Original Message- From: Maurice O'Prey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 15, 2003 11:52 PM To: [EMAIL PROTECTED] Subject: JavaScript/Perl Genius Sought All I have to admit defeat on this one and will gladly acknowledge anyone who solves it as a

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 format a

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 or source

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: 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

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

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

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

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 amp;. I need a regexp that will detect them and change them. Sounds

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

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 has

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

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

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

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: note subjectHello, world/subject authorMe/author contentHey, is thing boldthing on?/content /note In the above, I'd like to find a method of detecting that the bold tag is

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 -

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 with a user ID of

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 checksum

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

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 about it The

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\';

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 (IPO){ chomp; @line=split /\|/,$_; $line[2]=~s/ //g; print $_ foreach (@line); last; $count++; last if

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: note

Re: Escaping Ampersands in XML

2003-01-16 Thread Jenda Krynicky
Toby Stuart wrote: Try this one: s/(?!\w+;)/amp;/g Problem is that this will break things like #64; 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. --

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, PeerPort =

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.:

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 (IPO){ chomp; @line=split /\|/,$_; $line[2]=~s/ //g; Do you mean $line[3] since that is the last one in the array

Re: Escaping Ampersands in XML

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

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: Paul

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 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 is

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

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 go to

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 getting must

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 = $queryqq) =~

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

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

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.

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 = localhost,

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' } is set

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][0] =

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

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 same

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

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 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 source file run

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: 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; $MyArray[1][0][0] = B 1;

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, 'fai.txt') || die $!; -- Also, is this statment correct to open a file for read only? while (FILE) {

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

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. I

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:

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 foreach

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: note subjectHello, world/subject authorMe/author contentHey, is thing boldthing on?/content /note In the above, I'd like to find a method of

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: 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 don't

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++){

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: 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`; and

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 $value =

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 am a novice in

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: 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: 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 file. I

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 commas

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

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]

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: [EMAIL

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

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 it using:

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: 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 = FILEHANDLE; close... Dan Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED]

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

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 splitting it

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 $MyArray, 'h' And

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); The problem

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 PROTECTED]

  1   2   >