Hi all,
I want to make my web site and I don't know if it is a good idea to use many
CGI scripts to write html pages.
The server where I have my page doesn't allow SSI and I can't write HTML
pages that contains counters, etc, and I need to write the whole page as a
CGI script.
1. Do I have
Hi all,
I want to read and sort a comma separated file like:
abc,Metallica,Larry
bcd,Megadeth,Wall
cde,Ozzy,Perl
I want to be able to sort the line using all the 3 columns.
I am a beginner in Perl and I don't know to use MySQL yet.
Is it possible to do what I want without a database?
Thank
This may be what you are looking for:
Put your receiving variables html into a cgi prog, pass the variables
with the submit button to this cgi prog in which, I think, you can
still use your html templates as long as they are accessed by the
full url. Let me know if this works out.
Hi
Oh thank you, now I don't understand anything! smile
I will try it, but please tell me something.
If I will do it this way, the file will be downloaded on my server then
downloaded to the client's machine?
Thank you!
Teddy,
My new email address is [EMAIL PROTECTED]
- Original Message
I have this obscure problem, that I feel should be really easy to solve.
But, I can't figure it out. I've been skimming trough both Learning Perl and
Programming Perl, but I suddenly feel blind to the code.
Here are some snips from the code:
print header(), start_html(Registrering til
Ok, how would I do that? I am new to all of this perl/cgi stuff, sorry for
what I am sure is a moronic question.
-Kevin
-Original Message-
From: Scot Robnett [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 07, 2002 11:42 AM
To: [EMAIL PROTECTED]; 'mailing list'
Subject: RE: I need CGI
No. MySQL would be overkill for an application like this unless you're talking about
several thousand lines. Otherwise you can just use something like...
my $foo = /path/to/file;
open(INFILE,$foo);
my @records = INFILE;
close(INFILE);
for(@records) {
chomp;
my ($rec,$band,$artist) =
I am not familiar with cvsweb.cgi, but it looks like the path you define is definitely
in @INC. Did you try placing a copy of strict.pm elsewhere and unshifiting into @INC
with a BEGIN block just to test it? It shouldn't be necessary with strict but I'm at a
loss considering what you show as
Google won't currently index dynamic pages such as .cgi or .cfm. However, they have
recently begun indexing pages served over SSL in addition to indexing HTTP-served
pages, so security-conscious programmers (hopefully that includes all of us) should be
aware of this. I have a link to this
On Fri, 5 Apr 2002 10:07:45 -0500 , [EMAIL PROTECTED] (Andrew
Hughes) wrote:
I have a tab delimited flat text-file database (hotels.txt) with hotel info
from all 50 states in the following fields:
$available (1=available; 0=unavailable)
$location_num (numbers 1-50)
$location_txt
$city
On Sun, 7 Apr 2002 01:11:16 -0500, [EMAIL PROTECTED] (Kevin Queen) wrote:
Can't locate strict.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.6.1/i486-linux /usr/local/lib/perl5
/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/i486-linux
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/li
Javascript seems to work pretty well for this.
body onLoad=window.open('somefile.zip')
If you put this in a page, the visitor will be prompted to download the file
as soon as the page is fully loaded.
Best Regards,
JOSHUA D. HAYDEN
- Original Message -
From: Octavian Rasnita [EMAIL
That will work for people that have Javascript enabled in their browsers, which is the
majority, but it's not everyone. Better to handle it server side to guarantee it works
(or at least you will have more of a guarantee than with client side Javascript).
Have you looked into the LWP
Here is the code:
..sub velgarrangement{
print start_form(), hr;
print p(Velg arrangement: , popup_menu(arrangement, \@arrangement));
print p(submit(Velg));
print end_form(), hr();
registrer();
}
What happens now is that velgarrangement() and registrer() are both printed
to the screen at the
What's the easiest way to get yesterday's date from localtime? I need it in
this format: (for today) 070402.
Here is the code used for today's date:
($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = localtime();
$mon++;
$year %= 100;
$theDate = sprintf(%02u%02u%02u, $mday, $mon, $year);
Troy May wrote:
What's the easiest way to get yesterday's date from localtime? I need it in
this format: (for today) 070402.
use Date::Calc qw{ Today Add_Delta_Days };
my @date = Add_Delta_Days(Today, -1);
printf Yesterday: %02u%02u%02u,
$date[2], $date[1], substr($date[0], -2);
From: Moonlit Submit [EMAIL PROTECTED]
Hi,
Now I'm getting this error:
Content-type: text/html
Software error:
Server error: 503 5.0.0 Need RCPT (recipient)
How do I fix that?
Well, first ... I'd recomend using some custom function instead of
die() to report errors. Something like:
From: Matthew Harrison [EMAIL PROTECTED]
I have a database table that I am querying through DBI. The field I
want to fetch could be field1 x 200 records. I need these fields to
populate a drop-down html menu.
The field I am grabbing is the name field for a list of people.
On Sat, Apr 06, 2002 at 11:32:01PM -0800, John W. Krahn wrote:
And if you really want to get cute you can put it all on one line:
substr( $ARGV[0], $_, 1 ) eq $ARGV[1] and $cnt++ for 0 .. length(
$ARGV[0] ) - 1;
print $cnt;
I count two lines ;-)
Both of these are a little obfuscated, but
On Saturday, April 6, 2002, at 08:53 , Leon wrote:
[..]
Whats the code for refreshing a browser assuming the url to be refreshed
is
http://www.perl.com/
are you writing the client side? or the server side?
From the server side cgi/mod_perl I would recommend that you
check into how to set
Hello all,
Is it possible to export an Access query on an Access database to a text
file. So what I want to do is connect to an Access database then simply
run an SQl query on the database/table. From there I need the results of
that query to be exported to a comma delimited text file. Has
Hay, i am using apache with active state perl i think and i have created a message
board in cgi. I would like it so that whenever people press enter and want to leave a
line in between their posts it is displayed as having a blank line in between. For
Example:
User writes:
Hi
Hello
CGI
Robert Brandtjen [[EMAIL PROTECTED]] quoth:
*
*contains only about 9 of over 100 installed PM's - how can I update it
*to see all of them ?
You shouldn't ever need or want to manually edit perllocal yourself.
e.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Moonlit-
You should read the responses people give you a little more closely.
The example Chas gave you was for the Mail::Sendmail module, if I remember
correctly. He also mentioned that you could use Mail::Sender as an
alternative.
-Original Message-
From: Jenda Krynicky
To:
On Fri, 5 Apr 2002 16:59:00 -0800 , [EMAIL PROTECTED] (Timothy Johnson)
wrote:
Hey, is there anybody out there than can give me a really short example of
retrieving text from an Entry box? I see in the documentation that you use
the $entry-gtget, but there aren't any syntax examples.
What I
To access (no pun intended) the Access database, you might want to look into
Win32::ODBC or one of the DBI modules (I haven't had to use them so I can't
be more specific). You can get Win32::ODBC at http://www.roth.net/perl, or
from the PPM repository at http://www.roth.net/perl/packages.
As
Zentara, you are my hero. I still don't understand why they wrote the
documentation the way they did, but that was the missing link I was looking
for.
-Original Message-
From: zentara
To: [EMAIL PROTECTED]
Sent: 4/7/02 10:54 AM
Subject: Re: Calling all tk users
On Fri, 5 Apr 2002
On Sun, 07 Apr 2002 13:54:40 -0400, zentara [EMAIL PROTECTED] wrote:
On Fri, 5 Apr 2002 16:59:00 -0800 , [EMAIL PROTECTED] (Timothy Johnson)
wrote:
Hey, is there anybody out there than can give me a really short example of
retrieving text from an Entry box? I see in the documentation that you
No offense, but I don't see how you can expect an answer when you never
posted any code. We can't tell what you're doing wrong if we don't know
what you're doing. As a side note, you might want to check out the cgi
beginners list.
-Original Message-
From: @fro @ndy
To: [EMAIL
1) open (FILE, yourfile.txt) ; for (@yourdata) { s/\n/p/g; print FILE
$_\n }close (FILE);
2) open (FILE, yourfile.txt) ; while (FILE) { s/\n/p/g; print } close
(FILE);
- Original Message -
From: @fro @ndy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 07, 2002 10:33 PM
What's the easiest way to get yesterday's date from localtime? I need it in
this format: (for today) 070402.
Here is the code used for today's date:
($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = localtime();
$mon++;
$year %= 100;
$theDate = sprintf(%02u%02u%02u, $mday, $mon, $year);
Subtract number of seconds in a day 86400 from time:
($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = localtime(time - 86400);
Will give you yesterday.
Mutliply by 2 - 2 days ago, 3 - days ago, etc.
Wags ;)
-Original Message-
From: Troy May
Hi,
i want to set a timer around a system command, so that IF the command runs
longer than x seconds
send email to the sysadmin
Note: i *DO NOT* want to kill the process - simply want to send a warning
that it is taking longer
than expected
ie
$maxtime=60;# 60 seconds
Try the alarm function.
Tor.
Darren Edgerton wrote:
Hi,
i want to set a timer around a system command, so that IF the command runs
longer than x seconds
send email to the sysadmin
Note: i *DO NOT* want to kill the process - simply want to send a warning
that it is taking longer
than
Hello All,
I am currently NOW trying to access an Access database filename.mdb
from a shared drive on my Unix box. Now all I want to do is extract
data from an SQL query from this database? Can this be done? I don't
think I will need to use Win32::ODBC but instead something else like
On Apr 8, Darren Edgerton said:
i want to set a timer around a system command, so that IF the command runs
longer than x seconds
$maxtime=60;# 60 seconds
system(some_command_that_takes_longer_than_60secs);
Here's how I'd do it:
{
local $SIG{ALRM} = \send_email;
alarm 60;
---BeginMessage---
Hello All,
I am currently NOW trying to access an Access database filename.mdb
from a shared drive on my Unix box. Now all I want to do is extract
data from an SQL query from this database? Can this be done? I don't
think I will need to use Win32::ODBC but instead
37 matches
Mail list logo