Re: The very un-useful 'premature end of script headers' error me ssage

2003-03-28 Thread Cool Hand Luke
1. You *MUST* examine the server's error log. Prematue end of script headers is just a generic message put out by Apache when it couldn't find the response header your script should have put out. Any error messages output by Perl or your script will be found in the error log. Until you can

Re: accessing excel!

2003-03-28 Thread Lenonardo
[EMAIL PROTECTED] (Tim Fletcher) wrote in news:[EMAIL PROTECTED]: hi all, does anyone know how to access an excel sheet? $thanks On windows - use Win32:Ole. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

IIS saves '.pl' file - not execute

2003-03-28 Thread Lenonardo
I have a simple Perl CGI script that reads a directory, displays two file lists filtered on extension. The user then selects a file from either list and the script calls another CGI script to process the file. The CGI script is working with POST method. I activate the request using a javascript

Re: The very un-useful 'premature end of script headers' error message

2003-03-28 Thread Cool Hand Luke
Hello All, I think I figured it out, (so far). I 'm pretty sure that it has to do with perl 5.003 disliking the looping with the my $pair syntax. As a work around, I changed this foreach my $pair (split(/[;]/, $submission)) { # Convert plus to space $pair =~ y/+/ /;

Re: safe system()?

2003-03-28 Thread drieux
On Friday, Mar 28, 2003, at 11:01 US/Pacific, Jerry LeVan wrote: Let's say that I want to use a command (e.g., md5) on a file. No problem; just use: system(md5 $file); [..] Yeah, this probably has some holes... # to be safe, quote shell metacharacters $command =~

RE: Replacing/deleting text in a text file, part deux

2003-03-28 Thread Scot Robnett
Anything I can do to make this an easier question? No responses...maybe I didn't ask the question the right way or made it confusing as to what I am trying to do? Would it help to split it up? Thanks for any advice... Scot R. -Original Message- From: Scot Robnett [mailto:[EMAIL

RE: safe system()?

2003-03-28 Thread Bob Showalter
drieux wrote: ... think about the case of $file = '/path/to/file ; ( find / -print | xargs rm -r -f )'; system(md5 $file); DO NOT TRY THAT ONE AT HOME KIDDIES Wouldn't system('md5', $file); Be safer, since the list form of system() bypasses the shell? Consider: $ perl

RE: Replacing/deleting text in a text file, part deux

2003-03-28 Thread Bob Showalter
Scot Robnett wrote: Anything I can do to make this an easier question? No responses...maybe I didn't ask the question the right way or made it confusing as to what I am trying to do? Would it help to split it up? Thanks for any advice... ... foreach $record(sort(@records)) {

RE: Replacing/deleting text in a text file, part deux

2003-03-28 Thread Scot Robnett
Ahhh, the famous 'map' function - haven't tried it, so I guess it's about time to give it a try. I wasn't too familiar with 'exists' either...thanks for the advice. - Scot Robnett -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 2:23 PM

Printing all values except. . .

2003-03-28 Thread Kim Forbes
Hello all, I want to first give a group thanks to everyone who helped me with my first script. I used CGI.pm and everything works fine. Now, I want to display on the screen all form parameters except 2. I tried using: my $query = CGI-new(); my @names = $query-param; foreach my $name ( @names )

RE: Printing all values except. . .

2003-03-28 Thread Scot Robnett
This is untested my $query = new CGI; my %names = $query-Vars; foreach my $key(keys(%names)) { print $key\: $names{$key}\n if (($key eq 'name') or ($key eq 'email')); } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: safe system()?

2003-03-28 Thread wiggins
On Fri, 28 Mar 2003 12:00:09 -0800, drieux [EMAIL PROTECTED] wrote: On Friday, Mar 28, 2003, at 11:01 US/Pacific, Jerry LeVan wrote: And BEFORE wiggins whines at me for not pointing at putting stuff that could be in a Module INTO a Module,

RE: The very un-useful 'premature end of script headers' error message

2003-03-28 Thread Bill Burke
I added a chat room at my site http://www.speakerscorner.us . You are welcome there and we can discuss PERL in real time. Don't quit the user group though, you won't want to miss anything -Original Message- From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003

RE: The very un-useful 'premature end of script headers' error message

2003-03-28 Thread Bill Burke
Thanks for the edification. You have been one of the most prolific contributors to the group, so I take no umbrage. Truly, you write it as perl, but the books label it PERL (Practical Extraction and Reporting Language). Please remember this is a beginners group which shares your enthusiasm, but

Re: INFO PLEASE

2003-03-28 Thread Scott R. Godin
Eric Walker wrote: how can I see where modules are installed no matter if they are personal or come with perl also how can I tell what functions are available for them. Thanks There's my ModuleReport script -- http://www.webdragon.net/mr/ There's still a few things I'd like to do with it,

Re: perl DBI and mysql

2003-03-28 Thread jaws
when i run the program like this: [EMAIL PROTECTED] util]# ./addvpdnuser.pl sampleusername, samplepassword,sampledescription,sampleattr DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1 at ./addvpdnuser.pl line 17, line 1. DBD::mysql::st execute failed: Duplicate entry 'sample'

Re: perl DBI and mysql

2003-03-28 Thread Dave K
Jaws, DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1 at ./addvpdnuser.pl line 17, line 1. DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1 at ./addvpdnuser.pl line 17, line 1. [EMAIL PROTECTED] util]# This is probably happening because the table has a

Re: perl DBI and mysql

2003-03-28 Thread jaws
What will I do to get my script working properly? Thanks for your help. At 04:17 AM 3/28/2003 -0500, Dave K wrote: Jaws, DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1 at ./addvpdnuser.pl line 17, line 1. DBD::mysql::st execute failed: Duplicate entry 'sample' for key 1

Re: perl DBI and mysql

2003-03-28 Thread Rob Anderson
Jaws, This looks like your script is working fine, but the insert your trying to do is in error. I'd guess that your just trying to add a row with a duplicate key, and that's what DBI is complaining about, because of a contraint on the database. You could try different keys, or the INSERT

Re: perl DBI and mysql

2003-03-28 Thread jaws
Thanks Ill try that. At 09:26 AM 3/28/2003 +, Rob Anderson wrote: Jaws, This looks like your script is working fine, but the insert your trying to do is in error. I'd guess that your just trying to add a row with a duplicate key, and that's what DBI is complaining about, because of a

Re: String removal

2003-03-28 Thread Aim
Hi, A very helpful member of this list assisted me in coming up with the following: substr ($fastaseq{$key}, rand (length $fastaseq{$key}), 3) = ; This bit of code removes a single character, randomly, but not from the very first 3. it does the removing from the values of %fastaseq. I hope it

Re: Synchronization of FTP servers

2003-03-28 Thread Jenda Krynicky
From: Aman Thind [EMAIL PROTECTED] This is a typical situation in companies with development teams spread around the globe. I have FTP servers - in India , US Switzerland. Builds are being made in India and being put on the Indian server. Any tips how I could transfer the contents to

redirection to various html files based on IP list

2003-03-28 Thread Martin Hudec
Hello, I need to make script which will go through file with IP addresses (one IP per line), and then compare each line to $ENV{'REMOTE_ADDR'}, and if it is equal then it will load first html to browser, otherwise it will load second html. Can anyone help me with this please? -- Martin Hudec

RE: CGI:Push

2003-03-28 Thread wiggins
On Thu, 27 Mar 2003 15:00:39 -0800, David Cheng [EMAIL PROTECTED] wrote: Hi all, 1. Is Server Push feature only supported by Netscape but not by IE? If yes, is there anyway we can do similar tricks with IE? I know I can achieve the same goal

writing in UTF8

2003-03-28 Thread Laurent_Coudeur
Hi all, I have to print a report in UTF8 Is there any options to format the file to UTF8 while creationg it then print into it safely? like open (XLIFF,$path1\\$_); print XLIFF $header$header2$filename ; is there a module to do this or am i lost in limbo and missed the doc? Laurent coudeur

Variable scoping, static variable

2003-03-28 Thread Rob Anderson
I'm trying cache a function to help speed it up. My function lives inside a module, and is being called from a seperate script. It works if I do the following. foreach my $count (1..10) { print $count . test(one) . \n; } print \n; -- module sub routine sub test { my $param

Re: Variable scoping, static variable

2003-03-28 Thread Janek Schleicher
Rob Anderson wrote at Fri, 28 Mar 2003 14:45:07 +: -- module sub routine sub test { my $param = shift; my $cache_key = param=$param; if (exists $cache{$cache_key}) { return $cache{$cache_key}; } sleep 1; $cache{$cache_key} = $param .

Net::Ping Cannot redirect output !

2003-03-28 Thread Ramprasad
I have written a simple script that runs file when I run on command line but fails when I redirect its output I cant beleive this , it seems so impossible can anyone help me $!=1; use Net::Ping; @host_array = DATA; $p = Net::Ping-new(icmp); $p-bind(192.168.2.211); # Specify source interface of

Re: Variable scoping, static variable

2003-03-28 Thread Rob Anderson
Thanks but I don't see how this could work. I've tried using it, but to no avail Janek Schleicher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Anderson wrote at Fri, 28 Mar 2003 14:45:07 +: -- module sub routine sub test { my $param = shift;

RE: Variable scoping, static variable

2003-03-28 Thread Shishir K. Singh
Try using it like this - use strict; my $cache = {}; test(hello0,$cache); test(hello1,$cache); test(hello0,$cache); test(hello3,$cache); sub test { my $param = shift; my $cache = shift; my $cache_key = param=$param; if (exists

RE: strange chacaters

2003-03-28 Thread Dan Muey
Are you serious? How in the world can we help if there's no context at all? What does this have to do with perl? I would assume '2 dimensional' and '3 dimensional' since it looks like graphic stuff but, again, see above and this link :: http://www.catb.org/~esr/faqs/smart-questions.html I

strange chacaters

2003-03-28 Thread Mike Blezien
I came accross some characters, while process various files that contain characters like this: Animations/2D/Animals Camers/3D/videos what exactly are the '2D' and '3D' designate... an extra space of some sort ?? TIA ;) -- MikemickaloBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder

Re: strange chacaters

2003-03-28 Thread Mike Blezien
My mistake, I got the wrong information. Dan Muey wrote: Are you serious? How in the world can we help if there's no context at all? What does this have to do with perl? I would assume '2 dimensional' and '3 dimensional' since it looks like graphic stuff but, again, see above and this link

Enumerating available modules

2003-03-28 Thread Steve Gilbert
Does anyone know of a way to enumerate all the available modules on a system? TIA Steve __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- To unsubscribe, e-mail: [EMAIL

Re: Enumerating available modules

2003-03-28 Thread Frank Wiles
.--[ Steve Gilbert wrote (2003/03/28 at 09:28:17) ]-- | | Does anyone know of a way to enumerate all the | available modules on a system? | `- I'm not sure why you'd want to do it, but does it. #!/usr/bin/perl use

RE: :Ping Cannot redirect output !

2003-03-28 Thread Bakken, Luke
$!=1; $! contains error text, if I remember correctly off the top of my head. Use $| = 1 instead for autoflush. This shouldn't cause redirect problems, tho. use Net::Ping; @host_array = DATA; $p = Net::Ping-new(icmp); $p-bind(192.168.2.211); # Specify source interface of pings foreach

Re: Enumerating available modules

2003-03-28 Thread Rob Dixon
Frank Wiles wrote: .--[ Steve Gilbert wrote (2003/03/28 at 09:28:17) ]-- Does anyone know of a way to enumerate all the available modules on a system? I'm not sure why you'd want to do it, but does it. #!/usr/bin/perl use File::Find; my $count = 0;

Re: Net::Ping Cannot redirect output !

2003-03-28 Thread Rob Dixon
Ramprasad wrote: I have written a simple script that runs file when I run on command line but fails when I redirect its output I cant beleive this , it seems so impossible can anyone help me $!=1; Should be $| = 1 for autoflush. Or, more neatly: use IO::Handle; autoflush STDOUT;

$from_address

2003-03-28 Thread Robbie Staufer
Hi, I have a perl script that takes in form data and generates and email with the data to be sent to me. I'm getting the error message Error:Bad or missing From address: '$from_address'. The webmaster says I'm using the correct from address, so, any ideas about this error message? Thanks.

Worm

2003-03-28 Thread Rob Dixon
Guys. Watch out for a mail with 'Microsoft Mail Service' as a subject. It has an executable attachment which I'm sure isn't benign. /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: $from_address

2003-03-28 Thread Bakken, Luke
$from_address = [EMAIL PROTECTED]; $to_address = [EMAIL PROTECTED]; $subject = ESMF Registration Form; %mail = ( SMTP= 'finster.scd.ucar.edu', from= '$from_address', to = '$to_address', subject = '$subject', ); $mail{body} =

Re: $from_address

2003-03-28 Thread Pete Emerson
You need to leave off the single quotes around $from_address, $to_address, and $subject. %mail = ( SMTP= 'finster.scd.ucar.edu', from= $from_address, to = $to_address, subject = $subject, ); Mar 28, 2003 at 12:12pm from Robbie Staufer: RS

Re: $from_address

2003-03-28 Thread Rob Dixon
Robbie Staufer wrote: Hi, I have a perl script that takes in form data and generates and email with the data to be sent to me. I'm getting the error message Error:Bad or missing From address: '$from_address'. The webmaster says I'm using the correct from address, so, any ideas about this

Re: $from_address

2003-03-28 Thread Rob Dixon
Robbie Staufer wrote: Here's what I have: $from_address = [EMAIL PROTECTED]; $to_address = [EMAIL PROTECTED]; $subject = ESMF Registration Form; I should have pointed out that here single quotes are just what you want, to stop it expanding arrays @sweb and @scd. That way you wouldn't need to

newbie module question

2003-03-28 Thread Leon
Hi everyone, I am really really new to perl. I know this is dumb but I am using perl in the win 32 environement (perl 5.8.0 build 804) from active state. I am trying to figure out how to install modules. Where do you get them from? How do you install them? Other things I need to know?

Re: $from_address

2003-03-28 Thread Kevin Meltzer
$from _address will not interpolate in single quotes. No quotes needed around $from_address, $to_address or $subject. Cheers, Kevin On Fri, Mar 28, 2003 at 12:12:44PM -0700, Robbie Staufer ([EMAIL PROTECTED]) said something similar to: Hi, I have a perl script that takes in form data and

cobol - perl ??

2003-03-28 Thread Jeff Westman
Hi, I've got some files, that were written with a COBOL program, so I have fields that have been created with COMP (binary) picture clauses. The problem is now I need to read this file into a perl program. Here's what I have: 05 RECORD-TYPEPIC X. 05 LOC-ID

RE: newbie module question

2003-03-28 Thread Hanson, Rob
Tricky question... Try using PPM first, it is a utility that comes with ActiveState Perl. It installs from the ActiveState module repository. From the command line... C:\ppm Once in PPM you can search and install... search Foo install Foo::Bar help ...But not all modules are available

RE: cobol - perl ??

2003-03-28 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Jeff Westman wrote: Hi, I've got some files, that were written with a COBOL program, so I have fields that have been created with COMP (binary) picture clauses. The problem is now I need to read this file into a perl program. Here's what I have: 05 RECORD-TYPEPIC X.

How to pull all attachments from an email and save as unique ids?

2003-03-28 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I have one email which has 100 attachments (mail ids) which are not unique and when I save attachments via Outlook and it comes back repeatedly saying that this file already exists, do you want to replace. I am not even sure where to start, just know that Perl will have a way to

RE: cobol - perl ??

2003-03-28 Thread Jeff Westman
David, Thanks, I was just now finding out the same thing (architecture is 2 bytes for PIC S9(1) through PIC S9(5). Much thanks! -Jeff --- Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] wrote: Jeff Westman wrote: Hi, I've got some files, that were written with a

Re: Enumerating available modules

2003-03-28 Thread Janek Schleicher
Steve Gilbert wrote at Fri, 28 Mar 2003 09:28:17 -0800: Does anyone know of a way to enumerate all the available modules on a system? Have a look to the CPAN module ExtUtils::Installed Greetings, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

db query help!

2003-03-28 Thread Jasmine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi perl gurus, I m afraid I need some help here urgently. Could anyone see whats wrong with the way I query the database? Whats DBI::st=HASH(0x8240a10) ? Any help is appreciated Thanks! the $query variable returns -- DBI::st=HASH(0x8240a10)

RE: How to pull all attachments from an email and save as unique ids?

2003-03-28 Thread David Olbersen
David, Take a look at perlmonks.org, somebody wrote a script that does something very similar to what you're looking for. Specifically, http://www.perlmonks.com/index.pl?node_id=12287 has a good starting point! It uses the MIME tools if memory serves me... -- David

RE: db query help!

2003-03-28 Thread Bob Showalter
Jasmine wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi perl gurus, I m afraid I need some help here urgently. Could anyone see whats wrong with the way I query the database? Whats DBI::st=HASH(0x8240a10) ? Any help is appreciated Thanks! DBI::st=HASH(0x8240a10) is the way Perl

grab input from a stdout

2003-03-28 Thread Leon
Hi again, I have a questions regarding stdout. Basically I have a script that looks like this: system(reg DELETE HKCR\\AppID\\OvEpSeMain.EXE /f) die no $!; system(reg DELETE HKCR\\AppID\\OvEpSeMain.EXE /f) die no $!; system(reg DELETE HKCR\\AppID\\OvEpSeMServer.EXE /f) die no $!; system(reg

RE: How to pull all attachments from an email and save as unique ids?

2003-03-28 Thread Wagner, David --- Senior Programmer Analyst --- WGO
David Olbersen wrote: David, Take a look at perlmonks.org, somebody wrote a script that does something very similar to what you're looking for. Specifically, http://www.perlmonks.com/index.pl?node_id=12287 has a good starting point! It uses the MIME tools if memory serves me...

RE: grab input from a stdout

2003-03-28 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Leon wrote: Hi again, I have a questions regarding stdout. Basically I have a script that looks like this: system(reg DELETE HKCR\\AppID\\OvEpSeMain.EXE /f) die no $!; system(reg DELETE HKCR\\AppID\\OvEpSeMain.EXE /f) die no $!; system(reg DELETE HKCR\\AppID\\OvEpSeMServer.EXE /f)

db query help! - part 2

2003-03-28 Thread Jasmine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi thanks .. for telling me tht DBI dont accept $! erm i still have problems though. Theres actually data in the this table made up of 2 columns. But, apparently my query keep returning 0 and new which I cant understand why. #!/usr/bin/perl -w

howto: open/create a file as executable

2003-03-28 Thread Ken Lehman
Is it possible to open/create a file with open that does not exist and give it a umask that makes it executable, say for the purpose of generating shell scripts? For example, say open OUT_FILE, MAGIC_UMASK, /scripts/new_script; where the current umask is 2. Is the only option to chmod the file

Re: $from_address

2003-03-28 Thread John W. Krahn
Robbie Staufer wrote: Hi, Hello, I have a perl script that takes in form data and generates and email with the data to be sent to me. I'm getting the error message Error:Bad or missing From address: '$from_address'. The webmaster says I'm using the correct from address, so, any ideas

Re: Variable scoping, static variable

2003-03-28 Thread John W. Krahn
Rob Anderson wrote: I'm trying cache a function to help speed it up. Have a look at the Memoize module at CPAN. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Newbie Help Needed! Mail Problem!

2003-03-28 Thread Palm Optins
Hello All. I have a admin script for a protected members area. In it, I can email all the members to let them know the Updates of the program. For some unknown reason, it keeps sending out double emails for each address. Can someone tell me what I did wrong? Here's the code I used for the

running a script thru a webpage

2003-03-28 Thread Christopher M Burger
Hello everyone. I have written a perl program that will take a tar file and untar it then move file from the untarred direcories to it's directory on the webserver. However, when I run the program thru a webpage it does not untar the file. If I run the program localy it works fine. I have even

Re: howto: open/create a file as executable

2003-03-28 Thread John W. Krahn
Ken Lehman wrote: Is it possible to open/create a file with open that does not exist and give it a umask that makes it executable, say for the purpose of generating shell scripts? Yes. For example, say open OUT_FILE, MAGIC_UMASK, /scripts/new_script; where the current umask is 2. Is

RE: How to pull all attachments from an email and save as unique ids?

2003-03-28 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Wagner, David --- Senior Programmer Analyst --- WGO wrote: David Olbersen wrote: David, Take a look at perlmonks.org, somebody wrote a script that does something very similar to what you're looking for. Specifically, http://www.perlmonks.com/index.pl?node_id=12287 has a good starting

Re: Net::Ping Cannot redirect output !

2003-03-28 Thread Ramprasad
Rob Dixon wrote: Ramprasad wrote: I have written a simple script that runs file when I run on command line but fails when I redirect its output I cant beleive this , it seems so impossible can anyone help me $!=1; Should be $| = 1 for autoflush. Or, more neatly: use IO::Handle;