It depends on what "include" is.
If it is a subroutine...
$content2 = include("helpdesk/support.cgi");
If it is a hash...
$content2 = $include{"helpdesk/support.cgi"};
And what was the error?
Rob
-Original Message-
From: Kyle Babich [mailto:[EMAIL PROTECTED]]
Sent: Thursday, J
s you have other
scripts that you know are working fine.
Rob
-Original Message-
From: Kyle Babich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 8:34 AM
To: Hanson, Robert
Cc: [EMAIL PROTECTED]
Subject: Re: uninitialized value?
Actually I do have the content-type printed:
#!/us
Assuming the Content-type isn't printed at the point the script ends(die,
exit, etc), this won't print either. So you could instead print it to
STDERR so that it shows up in the logs...
print STDERR "Hello $c \n";
Rob
-Original Message-
From: David vd Geer Inhuur tbv IPlib
[mailto:[EMA
> Premature end of script headers:
This could be a lot of things.
> Use of uninitialized value in string eq at index.cgi line 14.
This is merely a warning, not an error. This won't cause a script to fail
(see perldoc perdiag).
The real error (the first one) isn't giving you any clue. Basical
First of all I would strongly recommend using DBI for this. It will allow
you to use flat files now then upgrade to a database later with almost no
code changes.
That being said, there are a few ways you can do this, the simplest being
this:
# untested
my $valid_user = grep "$FORM{username}|$FO
No, I don't believe it is standard.
Type this at the command line, it will answer most if not all of your
questions...
perldoc -q cpan
If you still have questions after that, just ask. As a side note, if you
are using ActivePerl in Windows read this as well "perldoc ppm".
Rob
-Origin
That all depends on if you want to do it server side or client side. I
usually prefer the server side, in which case your Perl script would handle
that. The easiest way is to use some sort of template module, I usually use
HTML::Template.
http://search.cpan.org/search?mode=module&query=HTML::Te
I usually use Session::Apache for that. It will allow for the creation of
session ID's, storing data, and retreival of data. You will need to set up
a table in a database, and then put some code in each page to fetch the
session ID from the querystring or cookie so that it can initialize the
ses
An example?
Sure, here's one.
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello World";
That's all there is to it.
Rob
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 12:31 PM
To: Ha
Here is the short story...
1. All HTTP messages have a header and a body section. The header includes
content type (HTML, text, GIF, etc), the length of the content, login info,
etc, etc. The body contains the actual data.
2. The head and body sections are seperated by a blank line.
3. You ne
Yeah, you will be fine with the spaces.
The browser may(?) URL encode them before sending them to the server. So
your value will look like this when it hits the server:
kayak+touring+rescue+techniques
Or maybe this, which is equivelent:
kayak%20touring%20rescue%20techniques
When you use
: Hanson, Robert
Sent: Thursday, February 14, 2002 12:36 PM
To: 'David Gilden'; [EMAIL PROTECTED]
Subject: RE: removing white space
The first is more efficient, the second is less typing.
And actually the second one is incorrect, it should be this:
Rob
-Original Message-
F
The first is more efficient, the second is less typing.
And actually the second one is incorrect, it should be this:
Rob
-Original Message-
From: David Gilden [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 12:29 PM
To: [EMAIL PROTECTED]
Subject: removing white space
not
allowed or you knew that many users would not have JavaScript available
(unlikely, but stuff happens).
Rob
-Original Message-
From: Camilo Gonzalez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 4:56 PM
To: Hanson, Robert; 'GsuLinuX'; [EMAIL PROTECTED]
Subject
You can do it just like that.
Given this HTML form:
You can use this script:
#!/usr/bin/perl
use CGI qw/:standard/;
print header();
if ( param('button1') ) {
print "Button 1 was pushed!";
}
elsif ( param('button2') ) {
print "Button 2 was pushed!";
}
Camilo, why is that a probl
It looks like that is the answer though, in a roundabout way.
Teddy, if this is for output into an HTML page, no, it won't show up because
< and > are special chars. You need to HTML encode them, manually or
otherwise.
This should work:
$line = "";
print $line;
Rob
-
I wrote this routine to do the conversion for me. When you run it at the
command line is takes a string as input, and prints out the hex val of each
char in the string.
#!/usr/bin/perl
# c2hex.pl - Converts characters to hex values.
my $chars = join(' ',@ARGV);
for ( split(//, $chars) ) {
p
variables,
loops).
HTML::Template is very easy to learn and use, Mason looks like it requires a
little bit more to set it up and learn it.
Rob
-Original Message-
From: Marty Landman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 1:10 PM
To: Hanson, Robert; [EMAIL PROTECTE
Al,
I work with a lot of old code that uses the method Marty exmplained. The
problem I have had with it is that a few years after the original code was
written I find myself rewriting it to use HTML::Templates so that I can
include standard headers/footers and take advantage of the other
HTML::T
If all you need to do is insert a table you could use a server side include
(depending on your web server). It might look like this...
You would place that where you wanted the table to appear and the web server
would insert it right before serving the page.
The other option is to use a templ
This works fine for me...
#!/usr/bin/perl
use CGI;
$query = new CGI;
@values = $query->param('name');
print "Content-type: text/plain\n\n";
print "@values";
Rob
-Original Message-
From: Rahul Garg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 9:45 AM
To: [EMAIL PROTECT
I believe "nocache" is for Netscape only. For IE you should use "expires".
(or was it the other way around) ...So you should use both.
I don't have any references handy, but a value of "0" for expires might
work.
Alternatively you could use a scheme that a lot of ad agencies use. They
append a
The simple answer is that it won't work. SSI's are handled by the web
server, and the web server will not parse your script output for them, it
will only parse HTML files (or shtml depending on your setup).
I've attached a module we use on occation for this specific purpose. It
includes pod if
The only documentation I know of is in Lincoln's CGI.pm book. ...But you
could always check out the source code for the module. Below is the part
that defines each of those sets. Each one exports (enables ...sort of)
certain subroutines.
':html2' => ['h1'..'h6',qw/p br hr ol ul li dl dt dd me
Hmmm... I would have recommended the same thing as a possible solution.
>From what I see in the Perl FAQ there is an experimental C code generator,
and unless you do something special it embeds most of the Perl C code into
it anyway so that eval's can work. And from what I have seen, you can use
25 matches
Mail list logo