Re: Cgi Win xp Perl

2003-01-07 Thread R. Joseph Newton
Hi Paul, Did you set up IIS for the virtual directory? You need top add a virtual directory for each location you'll be serving these scripts up from. File-system opening will not work as it does with static HTML. 1. Create a virtual directory in IIS 2 Right-click on it, and choose propertie

Re: Cgi Win xp Perl

2003-01-07 Thread R. Joseph Newton
Hi Ken, The ActiveState installation on Windows totally ignores the Unix command, treeating it as a comment. Joseph Ken Lehman wrote: > Is this path right? This looks like a unix path and your trying this on > windows right? > > #!/usr/bin/perl -w > > Anyway I setup my XP box to run perl, I am

taint, safe, mkpath trouble

2003-01-07 Thread Patricia Hinman
I'm trying to use taint, strict and Safe in all my files. I'm new to the Safe module and unsure about this code. #!C:\Perl\bin\perl.exe -w -T #!/usr/bin/perl -w -T use strict; if($q->param("add_a_dir")){ my$newdir = $q->param("add_a_dir"); $newdir =~ s/[^\w\-\.]//g; $dirext .= $newdir; push(

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Peter Scott
At 06:16 PM 1/7/03 -0600, Christopher D. Lewis wrote: >On Tuesday, January 7, 2003, at 11:19 AM, Peter Scott wrote: > >>[responding to replacement of sub displayResults with {print __LINE__ >>. " sub displayResults";}] >>That needs to be __LINE__, not __line__. The above is an error. >>You do ha

Re: Cgi Win xp Perl

2003-01-07 Thread R. Joseph Newton
Do you have method=POST in the action call? Without that, many web servers will assume GET. Joseph Paul Kraus wrote: > It still just displays the contents of my script rather then running it. > > Do I need to some how associate .cgi with Perl? > > > -Original Message- > > From: Ken Leh

Re: using taint and File::Find error

2003-01-07 Thread John W. Krahn
Patricia Hinman wrote: > > I'm writing a CGI script that allows a user to create > directories and upload an html file. I'm using this > at the beginning of the script > > #!C:\Perl\bin\perl.exe -w -T > #!/usr/bin/perl > use strict; > BEGIN{open(STDERR, ">./err.txt");} > > the htmldir is read f

RE: Cgi Win xp Perl

2003-01-07 Thread david
Paul Kraus wrote: > nope that's the stumper. I use Perl all the time for business and just > to play around I wanted to mess with cgi. The non cgi stuff works fine. > Actually I can ran the cgi stuff from the command line just fine to. let me get that straight: if the script has a .pl extension,

Re: Q : How to resume an ftp session + RE: Timeout at C:/Perl/lib/Net /FTP.pm line 741

2003-01-07 Thread John W. Krahn
Aman Thind wrote: > > As it turned out there was some problem with the file I was trying to > transfer. > I could not transfer it even using an ftp client. > The ftp client also aborts with a time out. > > Another question. > How can I use the *Resume* facility provided by an ftp server??? > Curr

Re: How to substract words

2003-01-07 Thread R. Joseph Newton
With a minor correction: [or three or four--that was definitely posted in haste] so that it runs: #!/usr/bin/perl -w use strict; use warnings; my $word1 = "Hello"; my $word2 = "Othello's World"; my $result = difference($word1, $word2); print "$result\n"; sub difference { my ($word1, $word2) =

RE: Cgi Win xp Perl

2003-01-07 Thread Paul Kraus
nope that's the stumper. I use Perl all the time for business and just to play around I wanted to mess with cgi. The non cgi stuff works fine. Actually I can ran the cgi stuff from the command line just fine to. > -Original Message- > From: david [mailto:[EMAIL PROTECTED]] > Sent: Tuesday

Re: How to substract words

2003-01-07 Thread R. Joseph Newton
Hi John, Hmmm, I don't know about this handing ready-made code out, but--what the hell, the harms been done, so I';ll join the party: #!/usr/bin/perl -w use strict; use warnings; my $word1 = "Hello"; my $word2 = HelloWorld; sub difference { my ($word1, $word2) = @_; if ($word1 =~ /.*$word2.

Re: How to substract words

2003-01-07 Thread R. Joseph Newton
Hi Alex, Can you show or tell us what you have tried? We could also help more if yoiu tell us a little about the subject matter you are covering in class. Alex Demmler wrote: > Hi folks! > > I have a problem with pattern matching. > I want do find the difference between two words. I have tried

RE: Cgi Win xp Perl

2003-01-07 Thread david
Paul Kraus wrote: > same issues. If it's a pl file it tries to download. If its .cgi then it > just displays my code. > what happen if you type your cgi_script.pl in the DOS prompt? does Windos complain about not able to execute the script? if so, Windos(as well as IIS) probably doesn't know h

RE: Cgi Win xp Perl

2003-01-07 Thread Tucker, Ernie
I think I had to compile apahe for use with perl. I think in iis you need to specify how to deal with perl and cgi. Been a long time since I used iis. -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 3:20 PM To: [EMAIL PROTECTED]; [EMAIL PROT

RE: Cgi Win xp Perl

2003-01-07 Thread Paul Kraus
same issues. If it's a pl file it tries to download. If its .cgi then it just displays my code. > -Original Message- > From: david [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 4:39 PM > To: [EMAIL PROTECTED] > Subject: RE: Cgi Win xp Perl > > > Paul Kraus wrote: > > > I

using taint and File::Find error

2003-01-07 Thread Patricia Hinman
I'm writing a CGI script that allows a user to create directories and upload an html file. I'm using this at the beginning of the script #!C:\Perl\bin\perl.exe -w -T #!/usr/bin/perl use strict; BEGIN{open(STDERR, ">./err.txt");} the htmldir is read from a txt file and untainted like this: $htm

RE: Cgi Win xp Perl

2003-01-07 Thread david
Paul Kraus wrote: > It still just displays the contents of my script rather then running it. > have you try the '?' trick? if no, try something like: http://your.server/your.cgi-bin/your_script.pl?whatever the '?whatever' portion might give enough a hint to IIS that the request is a CGI reque

Re: Get photos from an FTP site

2003-01-07 Thread R. Joseph Newton
Michael, Escape the dot: "\." That should do't. Joseph Michael Kramer wrote: > I've been having some problems with this little code two major issues. > What I'm tring to do is get Photos off an FTP site: > I have a text file with about 4000 lines and on each line is an eight digit > nu

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread R. Joseph Newton
Good tip, Peter, Joseph Peter Scott wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Christopher D . Lewis) writes: > > > >On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote: > > > >> [EMAIL PROTECTED] (Christopher D . Lewis) writes: > >>> My problem is that the errors P

RE: Cgi Win xp Perl

2003-01-07 Thread Paul Kraus
NP Thanks anyways The cgi mailing list is where? > -Original Message- > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:30 PM > To: 'Paul Kraus'; 'Perl' > Subject: RE: Cgi Win xp Perl > > > Is this path right? This looks like a unix path and your > t

RE: Cgi Win xp Perl

2003-01-07 Thread Ken Lehman
Is this path right? This looks like a unix path and your trying this on windows right? > #!/usr/bin/perl -w Anyway I setup my XP box to run perl, I am sorry to say I forget exactly what I did but I know I had to set something up in IIS settings. Sorry, you might get faster help from the cgi maili

RE: Cgi Win xp Perl

2003-01-07 Thread Paul Kraus
It still just displays the contents of my script rather then running it. Do I need to some how associate .cgi with Perl? > -Original Message- > From: Ken Lehman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:12 PM > To: 'Paul Kraus'; Perl > Subject: RE: Cgi Win xp Perl >

RE: Cgi Win xp Perl

2003-01-07 Thread Ken Lehman
Try putting the -T after the -w at the top of your perl script, make sure that your script ends in .cgi and your iis is setup to run scripts and change print $q->header ("text/plain"); to print $q->header ("text/html"); -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] S

RE: Cgi Win xp Perl

2003-01-07 Thread Paul Kraus
Correction inline > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 3:02 PM > To: Perl > Subject: Cgi Win xp Perl > > > I am running on a windows xp pro desktop with iis installed. > I have active state Perl installed and have been

Cgi Win xp Perl

2003-01-07 Thread Paul Kraus
I am running on a windows xp pro desktop with iis installed. I have active state Perl installed and have been using it with out a problem. I just started to play with cgi and I am having a lot of problems getting it to work right. I have a static html form that's action calls the following script.

command line ok now thanks

2003-01-07 Thread Patricia Hinman
I'm not sure what I did to fix it. I took out a call to a file (not a directory) from the path variable. Now all is fine. Thankyou for responding. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.co

command line not working

2003-01-07 Thread Patricia Hinman
The perl command works if I type set path=C:\Perl\bin at the msdos after startup. This is the autoexec file. Is there a syntax error here that I don't see set JAVA_HOME =C:\j2sdk1.4.1 set J2EE_HOME =C:\j2sdkee1.2.1 set ANT_HOME =C:\ant set CATALINA_HOME =C:\Program Files\Apache Group\Tomcat4.1

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Rob Dixon
Hi Chris Simplifying sub displayResults is a Good Thing. It should actually be: sub displayResults { print __LINE__ . "sub displayResults\n"; } but it should compile as it is, yet the parser's still complaining about it. I would guess that there's something wrong with the lines immediately p

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christopher D . Lewis) writes: > >On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote: > >> [EMAIL PROTECTED] (Christopher D . Lewis) writes: >>> My problem is that the errors Perl coughs up end with: >>> >>> syntax error at ./nudice-01c

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christopher D . Lewis) writes: > >On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote: > >> >> What line numbers do your text editors say the above statements are >> actually on? >>> the errors Perl coughs up end with: >>> >>> syntax erro

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Christopher D . Lewis
On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote: [EMAIL PROTECTED] (Christopher D . Lewis) writes: My problem is that the errors Perl coughs up end with: syntax error at ./nudice-01c line 187, near "sub displayResults " syntax error at ./nudice-01c line 305, near "sub rollRequest

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Christopher D . Lewis
On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote: What line numbers do your text editors say the above statements are actually on? the errors Perl coughs up end with: syntax error at ./nudice-01c line 187, near "sub displayResults " the text "sub displayResults " occurs on line

RE: perl command line not working

2003-01-07 Thread Paul Kraus
are your running your apps with Perl as the command. Perl myscript.pl > -Original Message- > From: Patricia Hinman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 07, 2003 11:37 AM > To: [EMAIL PROTECTED] > Subject: perl command line not working > > > I've intstalled the binary d

RE: perl command line not working

2003-01-07 Thread Dan Muey
1) Probably so that when your computer is running so is your webserver, why else have a web server installed? Probably need to ask an apache list though. 2) Can you run it with the entire path the same way you'd run other programs at the prompt? -Original Message- From: Patricia Hinman

perl command line not working

2003-01-07 Thread Patricia Hinman
I've intstalled the binary distribution for Win32 of Perl 5.8.0 and Apache 2.0.43, together with mod_perl-1.99_08-dev. I have 2 questions. 1. Why does Apache start up while booting? 2. Why can't I use perl at msdos prompt? This is in my path variables: PATH=C:\Perl\bin\; CLASSPATH=C:\Perl\

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christopher D . Lewis) writes: >Dear all, > I'm writing (as a practice piece, all the better to learn Perl coding) >what is for me a big, complicated program which has lots of options and >output possibilities. And ... heh, heh ... it isn

Q : How to resume an ftp session + RE: Timeout at C:/Perl/lib/Net /FTP.pm line 741

2003-01-07 Thread Aman Thind
As it turned out there was some problem with the file I was trying to transfer. I could not transfer it even using an ftp client. The ftp client also aborts with a time out. Another question. How can I use the *Resume* facility provided by an ftp server??? Currently on error I restart the process

Re: passing array ref to subroutine

2003-01-07 Thread R. Joseph Newton
Hi Paul, I think you're looking for: sub suby { $temp=$_[0]; print "$_[0]\n"; print "$$temp[0]\n"; } I'm not sure why. It seems like it should be print "$$_[0]\n";, but I believe the results I got from the interpreter. Output: ARRAY(0x1ab28e0) paul ARRAY(0x1ab28e0) paul Joseph Paul Kr

RE: Phantom Line Numbers

2003-01-07 Thread Dan Muey
Do you 'require' or 'use' any libs or modules? -Original Message- From: Christopher D. Lewis [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 2:30 PM To: [EMAIL PROTECTED] Subject: Phantom Line Numbers I'm writing a little toy tool to teach myself more Perl than I have used be

RE: Timeout at C:/Perl/lib/Net/FTP.pm line 741

2003-01-07 Thread Dan Muey
What are the parameteres that are different and which are the same? Is then one ftp server set to timeout after xx amount of seconds? The message means ( not a dictionary definition ) basically that the server hasn't seen aby action for a specified period of time and said good bye to your script.

Re: How to substract words

2003-01-07 Thread John W. Krahn
Alex Demmler wrote: > > Hi folks! Hello, > I have a problem with pattern matching. > I want do find the difference between two words. I have tried, but donot get > it work. Any tips? > > Example: > > 1. Word = helloRed > 2. Word = hello > --- > Result = Red my $word1 = 'hello

RE: Can't make Storable

2003-01-07 Thread Kipp, James
scott looks like you are missing some libraries on your machine. namely libgcc. do a google search for libgcc_s.so.1 or use whatever package installer debian uses and verify this library is there. if not, install it > -Original Message- > From: Scott Lutz [mailto:[EMAIL PROTECTED]] > Sen

Timeout at C:/Perl/lib/Net/FTP.pm line 741

2003-01-07 Thread Aman Thind
Hi all , I have currently two ftp uploads being made from my machine. I am using the Net::FTP for the recursive transfer of product builds to germany. While one script is successfully transferring, the other is aborting with the following error : Timeout at C:/Perl/lib/Net/FTP.pm line 741 Both

RE: tailing a text file

2003-01-07 Thread wiggins
One way is answered in the FAQ, don't know if it is the most efficient. perldoc -q 'tail' http://danconia.org On Tue, 7 Jan 2003 04:23:22 -0800 (PST), Admin-Stress <[EMAIL PROTECTED]> wrote: > Hi, > > Anyone have the fastest and efficien way to

Re: tailing a text file

2003-01-07 Thread Tanton Gibbs
If you want it continually updated you might try File::Tail http://search.cpan.org/author/MGRABNAR/File-Tail-0.98/Tail.pm otherwise, use File::ReadBackwards http://search.cpan.org/author/URI/File-ReadBackwards-0.99/ReadBackwards.pm Tanton - Original Message - From: "Admin-Stress" <[EMAIL

Re: How to substract words

2003-01-07 Thread Dave K
$ perl -e ' $minuend = 'red'; $subtra = 'Hellored'; $res = $subtra =~ s/$minuend//; print $minuend, "\t", $subtra, "\t", $res;' red Hello 1 $res flags success/fail. If you would like $subtra to remain unchanged assign $dif = $subtra then $res = $dif =~ s/$minuend//; HTH "Pavle Lukic" <[EMAI

Re: How to substract words

2003-01-07 Thread Pavle Lukic
Alex This is one way to resolve the issue: $x = substr($a,0,index($a,$b)).substr($a,index($a,$b)+length($b)); I would like to see a solution in terms of regex. Cheers Pavle - Original Message - From: "Alex Demmler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 06, 2

problem with proxy server and modules installation

2003-01-07 Thread Prasad K M
Hi all, Firstly I wasn't able to test my perl scripts which used cgi/html/LWP cause I wasn't able to connect to the net. I guess some settings have to be done but not aware as to what...Please note that I am behind a proxy server. Secondly I had this problem while installing modules from CPAN .I

tailing a text file

2003-01-07 Thread Admin-Stress
Hi, Anyone have the fastest and efficien way to tail a text file ? suppose I have a text file "example.txt" and I want to print the last X lines. Thanks. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo

Re: Search and Replace Lines

2003-01-07 Thread John W. Krahn
Evan N Mr Niso/Lockheed Martin Kehayias wrote: > > Hello all, Hello, > I was hoping someone could steer me in the right direction for a scripting > problem I am having. The problem I am experiencing is using sed and vi. > The solution I am attempting can most likely be done in perl but not sure

How to substract words

2003-01-07 Thread Alex Demmler
Hi folks! I have a problem with pattern matching. I want do find the difference between two words. I have tried, but donot get it work. Any tips? Example: 1. Word = helloRed 2. Word = hello --- Result = Red Thanks Alex -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Can't make Storable

2003-01-07 Thread Scott Lutz
I need some pointers as to why the Storable module won't compile on my Intel/Debian machine. I am not sure if recompiling DynaLoader would help, so if any one has any ideas, I would be most grateful. This has failed using both CPAN and using the older 2.05 version I have. Here is the complete ou

Phantom Line Numbers

2003-01-07 Thread Christopher D . Lewis
I'm writing a little toy tool to teach myself more Perl than I have used before, and I am puzzled by error messages I get when trying to run and debug it: syntax error at ./nudice-01c line 187, near "sub displayResults " syntax error at ./nudice-01c line 305, near "sub rollRequest" syntax error

Re: Excel

2003-01-07 Thread David Eason
Are you creating the Excel files on a Windows system? If so, it looks like Win32::OLE would be your best bet: http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl-5.6/faq/Windo ws/ActivePerl-Winfaq12.html You may need to read up on the Office object model, too. http://msdn.microsoft.com/

Search and Replace Lines

2003-01-07 Thread Kehayias, Evan N Mr NISO/Lockheed Martin
Hello all, I was hoping someone could steer me in the right direction for a scripting problem I am having. The problem I am experiencing is using sed and vi. The solution I am attempting can most likely be done in perl but not sure how. If anyone has any suggestions on how to accomplish it in pe

Re: Help!!!

2003-01-07 Thread Desmond Coughlan
Le Mon, Jan 06, 2003 at 11:55:11AM -0500, Jose Vicente Paredes Loor a écrit ... > I am looking for a script(or a group of them) to monitor my network,i > mean, i want to ping from one server and collect the data in some web page > maybe, and show the ping result from all my servers in only one pa

How to substract words

2003-01-07 Thread Alex Demmler
Hi folks! I have a problem with pattern matching. I want do find the difference between two words. I have tried, but donot get it work. Any tips? Example: 1. Word = helloRed 2. Word = hello --- Result = Red Thanks Alex -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

RE: Help!!!

2003-01-07 Thread Joel Biss
In windows you can use /Start/Programs/Accessories/System Tools/Scheduled Tasks or 'at' from the cmd prompt to schedule your perl program to run every minute or so. -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: 06 January 2003 16:46 To: 'George Schlossnagle'; [E

sorting an id like a.12.34

2003-01-07 Thread Konrad Foerstner
Hi Folks! My problem: I have a file of ids like a.12.34 or z.9.234 and want to sort it into a new file. As the sort function sorts digit by digit I can't use it (not so easy). Additionally the data file is quite big (11M) so I don't know if it is okay to work with such big array. I hope someone c

Get photos from an FTP site

2003-01-07 Thread Michael Kramer
I've been having some problems with this little code two major issues. What I'm tring to do is get Photos off an FTP site: I have a text file with about 4000 lines and on each line is an eight digit number "30635325". I take all of the is an put it into an array. Then I have to change the

Debugging Problem: Phantom line numbers!

2003-01-07 Thread Christopher D . Lewis
Dear all, I'm writing (as a practice piece, all the better to learn Perl coding) what is for me a big, complicated program which has lots of options and output possibilities. And ... heh, heh ... it isn't working. My problem is that the errors Perl coughs up end with: syntax error at ./nudic