Re: Using strict and configuration files

2002-05-29 Thread Carl Franks
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

Re: Problem in retrieving param from cookie

2002-04-10 Thread Carl Franks
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,

Re: Tell a friend - Help!

2002-04-10 Thread Carl Franks
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

Re: How can i put the html code in my cgi?!?

2002-03-06 Thread Carl Franks
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

Re: Very serious security hole in your script

2002-03-01 Thread Carl Franks
> 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 > >

Re: off topic : frames html question

2002-02-27 Thread Carl Franks
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

Re: Very serious security hole in your script

2002-02-26 Thread Carl Franks
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]

Re: permissions question

2002-02-25 Thread Carl Franks
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

Re: WML header

2002-02-15 Thread Carl Franks
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]

WML header

2002-02-14 Thread Carl Franks
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]

Re: CGI perl html urgent

2002-01-07 Thread Carl Franks
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]

apache localhost cookies

2002-01-03 Thread Carl Franks
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

Re: Script expiring

2001-12-21 Thread Carl Franks
> 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

Re: HTML Cleaner-Upper Module

2001-12-20 Thread Carl Franks
> 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

Re: Cgi scripts not running...

2001-12-18 Thread Carl Franks
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

Re: multiple image upload CGI/perl

2001-12-18 Thread Carl Franks
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

use strict

2001-12-17 Thread Carl Franks
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

Re: help with open function

2001-12-11 Thread Carl Franks
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")

Re: graphic manipulation program

2001-12-07 Thread Carl Franks
>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]

Re: graphic manipulation program

2001-12-07 Thread Carl Franks
>> 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

graphic manipulation program

2001-12-07 Thread Carl Franks
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 --

Re: why wont images in webpages created with perl show up?

2001-12-05 Thread Carl Franks
> 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

Re: "\n" in Perl

2001-12-05 Thread Carl Franks
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

Re: why wont images in webpages created with perl show up?

2001-12-05 Thread Carl Franks
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

Re: accessing yahoo mail through text mode/shell

2001-11-29 Thread Carl Franks
> > 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

FW: Cookie Help PLEASE!

2001-11-21 Thread Carl Franks
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:

quotemeta regex

2001-10-29 Thread Carl Franks
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

Re: Browser Redirection

2001-10-12 Thread Carl Franks
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

Re: Browser Redirection

2001-10-12 Thread Carl Franks
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

Re: Re: Getting Stared with CGI.pm

2001-10-11 Thread Carl Franks
- >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)

2001-10-10 Thread Carl Franks
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

browser redirection

2001-10-10 Thread Carl Franks
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

browser redirection

2001-10-10 Thread Carl Franks
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

Re: Getting Stared with CGI.pm

2001-10-10 Thread Carl Franks
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

Browser Redirection

2001-10-10 Thread Carl Franks
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