Hi,
This is how I do it.
#!/usr/bin/perl -wT
use strict;
my $conf;
unless ($conf = do ('/path/to/config.pl')) {
die ("Could not open file");
}
print $conf->{'var1'}, "\n";
-
Then in a file called "config.pl"
{
var1 => "one",
var2 => "two"
}
-
The "unless" part is just to che
Have you tried the following?
my %answers = $q->cookie("my_cookie");
print "$answers{q1} $answers{q2} $answers{q3}"; #etc...
Carl
> Let's say if I create a cookie with $questions and $answers value pairs
> where $questions consists of q1, q2, q3, q4, q5, while $answers consists of
> a1, a2, a3,
The first line of the script must start with the shebang
#!/perl5/bin/MSwin32-x86
You should not have a comment above it, otherwise the operating system tries
to use the program "Path to perl with shebang symbol" instead of the perl
program
Carl
>
> Thanks for your immediate response. I tried
Are you thinking that CGI stops you using your previous method?
If you need to use some of CGI's features, yet include, for example a table
that doesn't use any dynamic content,
then you CAN still use
print start_html;
print From: "GsuLinuX" <[EMAIL P
> http:[EMAIL PROTECTED]/msg02976.html
Doh!
Please forgive my nonsensical ramblings.
Thanks!
Carl
--
>From: erotomek <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Very serious security hole in your script
>Date: Fri, Mar 1, 2002, 4:55 am
>
>
Rahul,
If I understand you correctly, you want to have lots of links that open new
framesets, without creating a new frameset document for each page to be
opened.
If that's correct, then don't worry, it's not at all off topic!
The general principal is this:
You make all the links go to the same
Erotomek,
As you've changed the subject line, and have not included the original
message, could you please explain whose post this is regarding.
Quite a lot of code is sent to this mailing list!
Thanks,
Carl
p.s. Please don't cc me, I'm on the list.
--
>From: erotomek <[EMAIL PROTECTED]
Andrew,
If your web-server is set up correctly, then no files in the cgi-bin should
be able viewable.
I have .txt files in my cgi-bin, but if I try to view them with a browser, I
get a "No such file or directory" error.
Even if I try to ftp://mysite.com/cgi-bin/file.txt I still can't see it.
Ha
No problem fliptop, the link was Very Good.
Made a great start last night, and got my first cgi WAP site up and running.
Carl
>
>
> sorry, i think i accidentally cc'd you anyway. my bad.
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Does anyone know what header to send for WML pages (WAP), and how to send it
with CGI ?
Thanks,
Carl
Please don't cc me. I'm on the list.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
print <
EndHTML9
When you do this, there must be no spaces before the EndHTML9
i.e.
print <
EndHTML9
Hope this helps,
Carl Franks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
uot;
the cookie path is set to "/cgi-bin"
the cookie expires is set to "+15m"
name and value are set.
When I run the perl script from the command line, the header that's printed
appears o.k.
I can't find any applicable info in the apache FAQ, so any pointers would be
> Hi,
>
> I have a scheduled task that generate a script each 10 minutes
>
> The problem is the following:
>
> When i access this script via browser it is ok... but when the task runs, it
> apear in the screen that the script produced no output... So i have to
> reload it... is there a way to
> I could of swore I saw a message about some Perl module that outputs
> "pretty", properly indented HTML. I can't find the message in my email
> client, so if anyone could help me, I'd be very grateful.
>
the module CGI::Pretty
goto cpan.org if you don't have it installed.
you can test if it's i
Chris,
> I am working within a small network (10 computers). I am trying to
> create a form that people can access through the f: (global drive). They
> will fill in this form, and the results will be processed by my script, and
> emailed to me. I have installed activeperl in the f drivebu
Birgit,
you asked,
> But this only works when the image is uploaded via a form field.
> What I would like to do, however, is to parse content of a textarea field
> for image names and then upload all of them, so there will be no such
> field.
>
> The only workaround I can think of is to use Javas
I have a seperate config file in which I define all of my variables.
(because I'm making a program using several scripts with many common vars)
I was under the impression that by initiating the variable (even in a
seperate file) 'use strict' would be happy.
However, when I run the script, I get l
Also note that the file path is relative to the script that is being run,
not where your perl executable is.
e.g.
if perl is at
e:\perl\bin\perl.exe
and your script is at
e:\scripts\myScript.cgi
and the file is
e:\workflow.txt
then the path needs to read
open("Workflow", "..\workflow.txt")
>www.imagemagick.org
Just read the first paragraph on the home page; it's exactly what I need.
Thank-you very much! :)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
>> Could someone advise me on a program to use.
>> I want to use a command-line program to resize .jpegs, and specify
>> compression.
>> I've not found anything suitable so far.
>> The GD module looks promising, but I can't find useful documentation for it.
>
> have you looked into imagemagic
Hi,
Could someone advise me on a program to use.
I want to use a command-line program to resize .jpegs, and specify
compression.
I've not found anything suitable so far.
The GD module looks promising, but I can't find useful documentation for it.
I'm running linux (slackware).
Thanks
Carl
--
> Here is a small followup question though. After I moved the files, say, to
> directory /var/www/html/files and I tried to reference them from the perl
> generated html with a hard reference...
>
>
>
> it didnt work, however, if I referenced it with a URL...
>
> http://local
This is because you're viewing the output in a web-browser.
If you look at the source code it sends to the browser, you'll see that it
does actually say
Hello
Hello
Hello
Hello
Hello
But the browser doesn't care about that, it's reading the HTML, so it needs
a to create a line break.
So do:
fo
If you use an address such as "report.css" then the .css file must be in the
same folder as the cgi script (usually "/cgi-bin").
If it's not use an address such as "/report.css" for the root of the web
server.
Or "/path-to-script/report.css".
Carl
--
>From: Jeremy Webster <[EMAIL PROTECT
>
> i dont understand, is that because yahoo.mail.com is
> only free mail server (is this script is only working
> in mail.myisp.com ?)
>
> friends..i really need to accessing yahoo.mail or hot
> mail or free mail through text mode, any solutions ?
>
>
>
> thank you very much
I know that hotmail
the two subroutines are actually doing the printing, so change the two lines
in the "#Do Player Login" section
from>>
print &LoadMyCookie;
print &GameStart_page;
to>>
&LoadMyCookie;
&GameStart_page;
(untested)
--
>From: "Andre` Niel Cameron" <[EMAIL PROTECTED]>
>To:
Hi all,
I'm having trouble with a cgi script, the main problem is the snippet below,
is there anything obvious wrong with it?
if (quotemeta $url =~ /$bad/i) {
$error = '1';
}
The rest of the code is posted below.
When I run it (telnet) I get the following error messages:
Use of uninitialized
I know, I just cut the code right back for clarity before posting it (maybe
silly thing to do?)
Thanks
carl
> if (condition) {
> print "Location:page.html\n\n";
> } else {
> print "Content-type: text/html\n\n";
> print "...html...";
> }
> }
BTW, for a Location header, you should an absolu
Thanks everyone who replied,
What I was doing was quite simple, and I know what was going wrong.
I WAS using...
print "Content-type: text/html\n\n";
if (condition) {
print "Location:page.html\n\n";
} else {
print "...html...";
}
}
Whereas I SHOULD have used...
if (condition) {
print "Loca
-
>From: Mark Bergeron <[EMAIL PROTECTED]>
>To: Carl Franks <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: Re: Re: Getting Stared with CGI.pm
>Date: Wed, Oct 10, 2001, 4:02 pm
>
> I don't know if you've tried this one yet?
>
> http:
Sorry about the 3 identical messges that come through for me.
The first two were sent yesterday before I realised this was a mailing list,
and I tried to post them to the news server through outlook express.
Well, I am a beginner !
They didn't get onto the list, and I thought they were lost in
Hi
I'm having trouble using perl to redirect a browser to another page.
the following script works:
#!/usr/bin/perl
print "Location:http://www.mysite.com/page.html\n\n";;
but if the script has the line
print "Content-type:text/html\n\n";
in it first, the redirect doesn't work.
I want to use it
Hi
I'm having trouble using perl to redirect a browser to another page.
the following script works:
#!/usr/bin/perl
print "Location:http://www.mysite.com/page.html\n\n";;
but if the script has the line
print "Content-type:text/html\n\n";
in it first, the redirect doesn't work.
I want to use it
I can recommend a good web tutorial that got me started in perl:
http://www.cgi101.com/class
--
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (David Gilden) wrote:
> Good afternoon,
> This is my first shot at using CGI.pm (using the function-oriented style).
> I can't seem to get m
Hi
I'm having trouble using perl to redirect a browser to another page.
If the script has the line
print "Content-type:text/html\n\n";
in it first, the redirect doesn't work.
e.g.
print "Location:http://www.mysite.com/page.html\n\n";;
I want to use it in a long script which will either redirect
35 matches
Mail list logo