document type = application/vnd.ms-excel

2004-02-26 Thread Moon, John
I am trying to generate a web page with : print $q-header(application/vnd.ms-excel), This tries to launch Excel but I get the error: File cannot be opened because: A declaration was not closed Line 1, Position 1 When I use: print $q-header(text/html), The page displays correctly and I do not

Re: document type = application/vnd.ms-excel

2004-02-26 Thread Andrew Gaffney
Wiggins d Anconia wrote: I am trying to generate a web page with : print $q-header(application/vnd.ms-excel), This tries to launch Excel but I get the error: File cannot be opened because: A declaration was not closed Line 1, Position 1 When I use: print $q-header(text/html), The page displays

RE: What are you really trying to do? - document type = applicat ion/vnd.ms-excel

2004-02-26 Thread Bob Showalter
Moon, John wrote: What I'm trying to do is make my new boss happy! They like everything in Excel. I have a BUNCH of CGI scripts on a SUN Unix generating tons of very nice HTML pages from data in an Oracle database I need to alternately be able to generate the same pages in an Excel

RE: What are you really trying to do? - document type = applicat ion/vnd.ms-excel

2004-02-26 Thread Chris Mortimore
John: I am trying to generate a web page with : print $q-header(application/vnd.ms-excel), This tries to launch Excel but I get the error: File cannot be opened because: A declaration was not closed Line 1, Position 1 When I use: print $q-header(text/html), The page displays

RE: What are you really trying to do? - document type = applicat ion/vnd.ms-excel

2004-02-26 Thread Moon, John
-Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 3:03 PM To: Moon, John; CGI Beginners Subject: RE: What are you really trying to do? - document type = applicat ion/vnd.ms-excel Gotcha, please bottom post... What I'm trying to do is

RE: What are you really trying to do? - document type = applicat ion/vnd.ms-excel

2004-02-26 Thread Wiggins d Anconia
Gotcha, please bottom post... What I'm trying to do is make my new boss happy! They like everything in Excel. Picky picky ;-)... manglement (as drieux would say) has its quirks. I have a BUNCH of CGI scripts on a SUN Unix generating tons of very nice HTML pages from data in an Oracle

Re: document type = application/vnd.ms-excel

2004-02-26 Thread Wiggins d Anconia
I am trying to generate a web page with : print $q-header(application/vnd.ms-excel), This tries to launch Excel but I get the error: File cannot be opened because: A declaration was not closed Line 1, Position 1 When I use: print $q-header(text/html), The page displays correctly and

Re: File name comparisons?

2004-02-26 Thread WC -Sx- Jones
Owen wrote: find2perl . -mtime +'30' -print Wish I could write all my programs like that :-) Well, you can - but you have to tell Perl how to do it *once* then it can always do it. Thats where the Magic ends and the sweat and drinking all night starts... -Bill- :)

Re: Pattern matching problem

2004-02-26 Thread Henry Todd
On 2004-02-26 00:43:21 +, [EMAIL PROTECTED] (Wolf Blaum) said: As I understand Biology, there is 4 nucleotid acids which gives 4**2 combinaions for dupplets. So you need 8 vars to count the occourence of all douplets. Worse for triplets. (24) As I understand genetics, triplets are what

subroutine placement (Layout conventions)

2004-02-26 Thread B McKee
Hi All, I'm slowly creating my Perl Masterpiece (tm) I'll let ya all giggle over it when I'm done :-) At any rate - It's done what I believe you call top-down. I declare the subs, then have the code for the main program, then the subroutine code blocks. My question is what order should

Re: Is there an etc. command in perl?

2004-02-26 Thread Joel
Sorry, I should have said. I'm writing a program to find prime numbers, and what I want it to do is go from 0 to 200 and divide each number by all other numbers. So I want say, 50 to be divided by 1 to 50, but to stop when it finds a modulus. If it were a prime number, it would be divided by

RE: Is there an etc. command in perl?

2004-02-26 Thread Jenda Krynicky
From: [EMAIL PROTECTED] if you are in school project probably the prof will preffer you to do it without using the div or mod operation. Probably he is meening the 'Erosthosthenes algorithm'. Marcos Please DO NOT TOP POST! And I don't think the prof is meening anything.

RE: Is there an etc. command in perl?

2004-02-26 Thread Marcos . Rebelo
From: [EMAIL PROTECTED] if you are in school project probably the prof will preffer you to do it without using the div or mod operation. Probably he is meening the 'Erosthosthenes algorithm'. Marcos Please DO NOT TOP POST! And I don't think the prof is meening anything.

JPG images problem in Perl/Tk

2004-02-26 Thread John
I downloaded bvia ppm the Tk::JPEG (active state) but i recieved the following error. Tk::JPEG object version 800.023 does not match $Tk::JPEG::XS_VERSION 800.024 at C:/Perl/lib/DynaLoader.pm line 225, DATA line 164. Compilation failed in require at gui.pl line 11, DATA line 164. What can i do

RE: Is there an etc. command in perl?

2004-02-26 Thread Jenda Krynicky
From: [EMAIL PROTECTED] From: Jenda From: [EMAIL PROTECTED] if you are in school project probably the prof will preffer you to do it without using the div or mod operation. Probably he is meening the 'Erosthosthenes algorithm'. Marcos Please DO NOT TOP POST!

Re: File name comparisons?

2004-02-26 Thread Wiggins d Anconia
Wiggins d'Anconia wrote: ... So for now we end up with something along these lines: -- UNTESTED -- Well, then get Perl to write one itself: find2perl . -mtime +'30' -print -Sx- Now if find2perl were just extended to actually handle the FTP-ls call or lstat worked

Re: JPG images problem in Perl/Tk

2004-02-26 Thread John
How can i do that? i use win32 perl - Original Message - From: Andrew Gaffney [EMAIL PROTECTED] To: John [EMAIL PROTECTED] Sent: Thursday, February 26, 2004 6:03 PM Subject: Re: JPG images problem in Perl/Tk John wrote: I downloaded bvia ppm the Tk::JPEG (active

newline or CR with join function

2004-02-26 Thread Gregg O'Donnell
Greetings all, Instead of joining my scalars with ',' I'd like each to appear on a newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! my $cfor_edu = join (',',$bs_alma,$bs,$ms_alma,$ms); - Do you Yahoo!? Get better spam protection with Yahoo!

Re: newline or CR with join function

2004-02-26 Thread Tim
At 09:36 AM 2/26/04 -0800, you wrote: Greetings all, Instead of joining my scalars with ',' I'd like each to appear on a newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! my $cfor_edu = join (',',$bs_alma,$bs,$ms_alma,$ms); - Do you Yahoo!? Get

Re: newline or CR with join function

2004-02-26 Thread Tim
Wrong answer, surry! It's that interpolation thing... At 12:45 PM 2/26/04 -0500, you wrote: At 09:36 AM 2/26/04 -0800, you wrote: Greetings all, Instead of joining my scalars with ',' I'd like each to appear on a newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! my $cfor_edu =

Re: Pattern matching problem

2004-02-26 Thread wolf blaum
On Thursday 26 February 2004 12:28, Henry Todd generously enriched virtual reality by making up this one: On 2004-02-26 00:43:21 +, [EMAIL PROTECTED] (Wolf Blaum) said: As I understand Biology, there is 4 nucleotid acids which gives 4**2 combinaions for dupplets. So you need 8 vars to

Re: subroutine placement (Layout conventions)

2004-02-26 Thread James Edward Gray II
On Feb 26, 2004, at 11:47 AM, B McKee wrote: Hi All, I'm slowly creating my Perl Masterpiece (tm) I'll let ya all giggle over it when I'm done :-) At any rate - It's done what I believe you call top-down. I declare the subs, then have the code for the main program, then the subroutine code

Re: subroutine placement (Layout conventions)

2004-02-26 Thread Wiggins d Anconia
On Feb 26, 2004, at 11:47 AM, B McKee wrote: Hi All, I'm slowly creating my Perl Masterpiece (tm) I'll let ya all giggle over it when I'm done :-) At any rate - It's done what I believe you call top-down. I declare the subs, then have the code for the main program, then the

Regular expression with lookbehinds question

2004-02-26 Thread Boris Shor
Hello everyone, I'm trying to implement the following regular expression with a lookbehind: $e1 = ','; $aye =~ s/(?!($e1))\s/\n/g; So this expression replaces spaces with newlines except when they are immediately preceded by a comma. But when I change $e1 = ',|R\.' (English: comma or R.), I

Re: subroutine placement (Layout conventions)

2004-02-26 Thread Rob Dixon
Hi Brian Brian McKee wrote: I'm slowly creating my Perl Masterpiece (tm) I'll let ya all giggle over it when I'm done :-) You shouldn't get any laughter from here. All of us have written a less-than-acceptable Perl script. At any rate - It's done what I believe you call top-down. From your

Re: get external process's output *and* return value

2004-02-26 Thread John W. Krahn
Andrew Gaffney wrote: [snip] open MAKE, make ${makeargs} | or die Can't open MAKE pipe; while (MAKE) { [snip] } print \n; In my case, could I add this code at the end to do what I want? if($?8) { # return code is non-zero print A compilation error occured. Last 15 lines of

Re: Regular expression with lookbehinds question

2004-02-26 Thread Jeff 'japhy' Pinyan
On Feb 26, Boris Shor said: $e1 = ','; $aye =~ s/(?!($e1))\s/\n/g; So this expression replaces spaces with newlines except when they are immediately preceded by a comma. But when I change $e1 = ',|R\.' (English: comma or R.), I get Variable length lookbehind not implemented in regex Because

Re: newline or CR with join function

2004-02-26 Thread Rob Dixon
John W. Krahn wrote: Rob Dixon wrote: Tim wrote: You need another pair of parentheses (spelling -- Jenda??)... I can spell too! 'parentheses' is right! That depends on if you are talking about one parenthesis or many parentheses. On most continents a 'pair' is more than one,

DBI Problem

2004-02-26 Thread Jeremy Bush
Hi, im using DBI to connect to a SQL database in order to serve dynamic content. Some people have reported to me that some fields are blank on my dynamic pages. It is as if the variable that is supposed to hold the data is being returned with no information it it. I have only head reports from

Re: Regular expression with lookbehinds question

2004-02-26 Thread James Edward Gray II
On Feb 26, 2004, at 3:20 PM, Jeff 'japhy' Pinyan wrote: On Feb 26, Boris Shor said: $e1 = ','; $aye =~ s/(?!($e1))\s/\n/g; So this expression replaces spaces with newlines except when they are immediately preceded by a comma. But when I change $e1 = ',|R\.' (English: comma or R.), I get

Re: Merging Hashes

2004-02-26 Thread Andrew Gaffney
Akens, Anthony wrote: Hi, I'm new to hashes, and I've been playing around with the following for a while... I'm just not getting it. I have two hashes, one containing data read in from a file, one with current data. I'd like to merge the two, adding any new keys and values into the hash, and

Module to pull Netstat summary information?

2004-02-26 Thread u235sentinel
Is there a CPAN module to pull netstat summary information from a system? Rather than run 'netstat -s', I was hoping to find some way within perl. What I basically want to do is generate a couple of reports from the summary output. ICMP and TCP information. If someone can point me in the

Re: Module to pull Netstat summary information?

2004-02-26 Thread Jas
I am still new to working with Perl myself but I think I know the anwer to this one... #!/bin/perl use strict; use warnings; my $cmd = system('netstat -s')or die Could not run command: $1; my $cmd = system('netstat -a | grep tcp')or die Could not run command: $1; HTH Jas [EMAIL PROTECTED]

Re: Regular expression with lookbehinds question

2004-02-26 Thread Jeff 'japhy' Pinyan
On Feb 26, James Edward Gray II said: On Feb 26, 2004, at 3:20 PM, Jeff 'japhy' Pinyan wrote: s/(?:(?!,)|(?!R\.))\s/\n/g; ??? I don't think that's gonna work. Let me check... No, doesn't seem to. There is always NOT going to be a proceeding comma OR NOT going to be a proceeding R., so it

RE: Merging Hashes

2004-02-26 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Akens, Anthony wrote: Hi, I'm new to hashes, and I've been playing around with the following for a while... I'm just not getting it. I have two hashes, one containing data read in from a file, one with current data. I'd like to merge the two, adding any new keys and values into the hash,

Re: target practice -- lottery numbers

2004-02-26 Thread James Edward Gray II
On Feb 26, 2004, at 3:54 PM, Cy Kurtz wrote: Hi all. Hello. [snip problem description] The code(try not to laugh out loud): I'll inline some comments. #!/usr/bin/perl #numpick.pl #use strict; This is easily fixed, see below. #use warnings; This problem takes a little more work to fix, but

Re: target practice -- lottery numbers

2004-02-26 Thread Owen
On 26 Feb 2004 16:54:12 -0500 Cy Kurtz [EMAIL PROTECTED] wrote: Hi all. I have a little program here that generates a lottery play slip for the mega-millions game. It selects 50 of the 52 numbers exactly once over 10 tickets of 5 numbers each. It then selects 10 super ball numbers, one for

Array question

2004-02-26 Thread Chris
Hi Guys, I have a problem with e-mail address's and an array. I have some code that will be a documentation spider to go through all our technical documentation, extract e-mail address's and attempt to sort and exclude certain e-mails/patterns. All documentation is in plain text, so no filters,

Re: Array question

2004-02-26 Thread wolf blaum
On Friday 27 February 2004 01:18, Chris generously enriched virtual reality by making up this one: Hi Guys, I have a problem with e-mail address's and an array. I have some code that will be a documentation spider to go through all our technical documentation, extract e-mail address's and

Re: how to remove an element in an array

2004-02-26 Thread John W. Krahn
David Inglis wrote: Is there a command to drop an element from an array, or what is the best way to do this. Any help appreciated. It depends. If you want to remove an element based on its contents then use grep: @array = grep $_ ne 'something', @array; @array = grep !/something/,

Re: Module to pull Netstat summary information?

2004-02-26 Thread John W. Krahn
Jas wrote: I am still new to working with Perl myself but I think I know the anwer to this one... my $cmd = system('netstat -s')or die Could not run command: $1; my $cmd = system('netstat -a | grep tcp')or die Could not run command: $1; If netstat executed successfully then it will return

Perl Installation

2004-02-26 Thread KENNETH JANUSZ
I have downloaded 5.8 from ActiveState. Before I install it are they any Gotchas or glitches that I should know about? Thanks much, Ken Janusz, CPIM

Re: Module to pull Netstat summary information?

2004-02-26 Thread WC -Sx- Jones
John W. Krahn wrote: Jas wrote: I am still new to working with Perl myself but I think I know the anwer to this one... my $cmd = system('netstat -s')or die Could not run command: $1; my $cmd = system('netstat -a | grep tcp')or die Could not run command: $1; If netstat executed successfully then

Re: how to remove an element in an array

2004-02-26 Thread WilliamGunther
In a message dated 2/26/2004 6:04:59 PM Eastern Standard Time, [EMAIL PROTECTED] writes: Is there a command to drop an element from an array, or what is the best way to do this. Any help appreciated. Look into splice. delete doesn't remove elements as you may expect, just...deletes them.

Re: how to remove an element in an array

2004-02-26 Thread David le Blanc
I always just use this, because I hate removing elements and worrying about it: use strict; use warnings; sub remove_el (\@@) { my $array = shift; my @el_rem; for (sort {$b = $a} @_) { if (! exists $array-[$_]) { warn 'element ', $_, ' does not exist';

Re: Perl Installation

2004-02-26 Thread WilliamGunther
In a message dated 2/26/2004 10:06:57 PM Eastern Standard Time, [EMAIL PROTECTED] writes: have downloaded 5.8 from ActiveState. Before I install it are they any Gotchas or glitches that I should know about? Are you on a Windows system? -Will --- Handy Yet

Re: how to remove an element in an array

2004-02-26 Thread zsdc
David Inglis wrote: Is there a command to drop an element from an array, or what is the best way to do this. Any help appreciated. perldoc -f splice Removes the elements designated by OFFSET and LENGTH from an array, and replaces them with the elements of LIST, if any. -- ZSDC -- To

Re: subroutine placement (Layout conventions)

2004-02-26 Thread Jenda Krynicky
From: Wiggins d Anconia [EMAIL PROTECTED] I like most of this answer. I would add that you should drop the declarations of the subs, they are unneeded in Perl and can break some features. This will help to some extent depending on your calling order. ??? 1. The declarations are and are

Re: Merging Hashes

2004-02-26 Thread Jenda Krynicky
From: Andrew Gaffney [EMAIL PROTECTED] Akens, Anthony wrote: I have two hashes, one containing data read in from a file, one with current data. I'd like to merge the two, adding any new keys and values into the hash, and for any keys that exist in both, I'd like the append the values

RE: Merging Hashes

2004-02-26 Thread Jenda Krynicky
From: Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] Akens, Anthony wrote: I have two hashes, one containing data read in from a file, one with current data. I'd like to merge the two, adding any new keys and values into the hash, and for any keys that exist in

Re: how to remove an element in an array

2004-02-26 Thread Paul Johnson
On Sat, Feb 28, 2004 at 07:24:17PM +1100, David Inglis wrote: Is there a command to drop an element from an array, or what is the best way to do this. Any help appreciated. You're looking for splice() perldoc -f splice -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To

how to remove an element in an array

2004-02-26 Thread David Inglis
Is there a command to drop an element from an array, or what is the best way to do this. Any help appreciated. -- Regards David Inglis 0408502342 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Module to pull Netstat summary information?

2004-02-26 Thread u235sentinel
This works however I was hoping perl had a module so I didn't have to run a system application. I've been playing around with modules such as scp, telnet and ftp. I'm curious if there is one for netstat. thanks :-) I am still new to working with Perl myself but I think I know the anwer to

Merging Hashes

2004-02-26 Thread Akens, Anthony
Hi, I'm new to hashes, and I've been playing around with the following for a while... I'm just not getting it. I have two hashes, one containing data read in from a file, one with current data. I'd like to merge the two, adding any new keys and values into the hash, and for any keys that

Re: Recursive Archive::Tar?

2004-02-26 Thread Rob Dixon
Jas wrote: Not sure if this is the way it is supposed to work, but I am not sure how I can get a directory, like a web directory backed up in one step using Archive::Tar. Code... #!/usr/bin/perl use strict; use Archive::Tar; my $bu =

target practice -- lottery numbers

2004-02-26 Thread Cy Kurtz
Hi all. I have a little program here that generates a lottery play slip for the mega-millions game. It selects 50 of the 52 numbers exactly once over 10 tickets of 5 numbers each. It then selects 10 super ball numbers, one for each ticket. It then prints it all out(duh). I wonder if anyone would

Re: Frequency of words

2004-02-26 Thread Rob Dixon
Vishal Vasan wrote: It has worked. Many Thanks, Thanks Vishal. I'm glad it worked for you. It would be good if you show some of your final code. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Recursive Archive::Tar?

2004-02-26 Thread Jas
Not sure if this is the way it is supposed to work, but I am not sure how I can get a directory, like a web directory backed up in one step using Archive::Tar. Code... #!/usr/bin/perl use strict; use Archive::Tar; my $bu = Archive::Tar-create_archive(www.tar,0,glob(/path/to/www/*)); This

Re: newline or CR with join function

2004-02-26 Thread John W. Krahn
Rob Dixon wrote: Tim wrote: You need another pair of parentheses (spelling -- Jenda??)... I can spell too! 'parentheses' is right! That depends on if you are talking about one parenthesis or many parentheses. :-) John -- use Perl; program fulfillment -- To unsubscribe, e-mail:

Re: get external process's output *and* return value

2004-02-26 Thread Andrew Gaffney
John W. Krahn wrote: Andrew Gaffney wrote: [snip] open MAKE, make ${makeargs} | or die Can't open MAKE pipe; while (MAKE) { [snip] } print \n; In my case, could I add this code at the end to do what I want? if($?8) { # return code is non-zero print A compilation error occured. Last 15 lines

Re: newline or CR with join function

2004-02-26 Thread Rob Dixon
Tim wrote: You need another pair of parentheses (spelling -- Jenda??)... I can spell too! 'parentheses' is right! Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: newline or CR with join function

2004-02-26 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Gregg O'Donnell wrote: Greetings all, Instead of joining my scalars with ',' I'd like each to appear on a newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! Use double quotes as in \n, since single quotes will not do the expansion for you. That is \n becomes just

RE: newline or CR with join function

2004-02-26 Thread Bob Showalter
Gregg O'Donnell wrote: Greetings all, Instead of joining my scalars with ',' I'd like each to appear on a newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! my $cfor_edu = join (',',$bs_alma,$bs,$ms_alma,$ms); You need to enclose \n in double quotes. Inside single quotes,

Re: stop

2004-02-26 Thread Rob Dixon
Casey West wrote: For the record the archives don't lie, the thread will be there. That's precisely why rudeness must be kept in check. So we could be rude, except that it will be recorded so we mustn't? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: Count the number of lines in a file without actually iteratin g through the file

2004-02-26 Thread Charles K. Clarkson
Jenda Krynicky [EMAIL PROTECTED] wrote: : : From: WC -Sx- Jones : : undef $/; # Slurp; : : foreach $target (@ARGV) { :@lines = (); : :open (HTML_FILE, $target) or die owie; :@lines = split(/\n/, HTML_FILE); : :print In $target - Seen: . ($#lines + 1) . lines...\n; : }

Re: JPG images problem in Perl/Tk

2004-02-26 Thread Andrew Gaffney
John wrote: I downloaded bvia ppm the Tk::JPEG (active state) but i recieved the following error. Tk::JPEG object version 800.023 does not match $Tk::JPEG::XS_VERSION 800.024 at C:/Perl/lib/DynaLoader.pm line 225, DATA line 164. Compilation failed in require at gui.pl line 11, DATA line 164. What

RE: Is there an etc. command in perl?

2004-02-26 Thread Marcos . Rebelo
if you are in school project probably the prof will preffer you to do it without using the div or mod operation. Probably he is meening the 'Erosthosthenes algorithm'. Marcos -Original Message- From: Joel [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 1:41 PM To: perl