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
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
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
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
-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
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
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
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- :)
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
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
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
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.
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.
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
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!
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
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
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!
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
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 =
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
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
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
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
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
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
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
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,
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
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
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
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
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]
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
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,
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
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
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,
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
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/,
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
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
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
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.
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';
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
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
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
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
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
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
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/
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
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
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 =
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
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/
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
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:
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
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
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
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,
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:
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;
: }
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
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
67 matches
Mail list logo