Well, I finally got the meta redirect to work also with the following
syntax and positioning:
print "Content-type: text/html\n\n";
print "";
Actually, anywhere after the Content line.
Thanks to all who helped. I'm new to this and it looks like a great group.
Perl/cgi is an incredibly rich lan
Evan wrote:
> I am trying to learn the foreach loop. Is there a
> place on the web where there are examples for the
> foreach?
There's good, quick example on Perl Monks:
http://www.perlmonks.org/index.pl?node=foreach%20loops&lastnode_id=954
> Basically I have an array of X elements and
> I want
The first place in your array is 0, There are a couple of examples of
foreach that I don't mind giving:
my @array = qw{this is the example of the array we will use for this
example};
foreach(@array) {
print $_."\n"; # current element is $_
}
or if you need the index of
Jason, this solved both the immediate jump problem and the
conditional! Wow. Thanks.
So, it seems one cannot output any html before redirecting, since that
requires the print "Content-type: text/html\n\n";
statement. Interestingly, if I start with just a print "\n\n;", the
program download
I am trying to learn the foreach loop. Is there a place on the web where there are
examples for the foreach? Basically I have an array of X elements and I want to go
from the first element (is it zero?) to the last. I have a variable containing the
number of elements in the array. If the array
On Tue, 07 Aug 2001 17:05:19 -0700, Walt Sanders wrote:
>Simon, thanks for the tip, but I've tried this more than once. I've used
>the meta tag many times in my html programming, but for some reason, when
>I put it into a .cgi program the browser just bounces back and forth to
>and from the .cgi
Simon, thanks for the tip, but I've tried this more than once. I've used
the meta tag many times in my html programming, but for some reason, when I
put it into a .cgi program the browser just bounces back and forth to and
from the .cgi and the .html. It only shows the .cgi output, but it bli
I need a perl script to access directorys that are not
world readable. I did set the "setuid" bit for this script.
When I start it says:
Cant´t do suid
My OS is SuSE Linux 7.0 (Kernel 2.2)
any help welcome
thanx
Patrik
doesn't the location need to be first thing sent? that's how it is in PHP.
if you want to force them to a page after displaying a bunch of stuff to the
screen you'll need to use a
-deno
- Original Message -
From: "Walt Sanders" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROT
It's an exclusive OR situation:
At the very beginning of your output, you can either output HTML (print
'Content-type: text/html\n\n';) OR output a location (print 'Location:
http://www.mysite.com\n\n';), but not both.
I just recently learned this little trick: This is pretty useful to use when
Ladies and Gentlemen,
I am executing a script from the client, which should internally call a
script of a remote server and i have to pass argument from the client. Any
help regarding this is much appreticated.
Thank you very much for your time.
SureshA
[EMAIL PROTECTED]
No, the # was just to be sure nothing strange happens in email.
Here are the two little test programs I've been using to try different things.:
#!/usr/local/bin/perl5
use strict;
use CGI qw( :standard );
print "Content-type: text/html
On Fri, Jul 06, 2001 at 12:27:14PM +0500, Rizwan wrote:
> Where can I find a systax highlighting module for perl in perl.
> I want to call it from within the script and pass a perl script file to be
> syntactically highlighted..
I haven't tried it, but if you want the output to be HTML you might
Gurus:
As a learning exercise I'm writing my own web-based POP3 client, and
wish to be able to handle emails which are MIME-encoded. So I'm looking
for perhaps a module which will take the full message, give me back
headers I want, and parse the body and return it in a form that could
be dumped
I use vi everyday. vi rules! Universally available (I also use gVIM
for Windoze); no silly configuration files; most of the needed commands
are only one or two keystrokes! Live is good!
Dennis ;-)
anton wrote:
>
> I've listen to you all about the editors problem
> Is anybody out there still
>
> This will tell you why or how something might be going wrong and what your
> pwd is. Also, you should check the parent directory in which you are
> trying to make this directory for directory permissions (seteuid) which can
> cause the directory to be created the same as the parent directory.
>I need to do an if(condition) load a .html, or load unless(condition).
Try:
print "Location: $url1\n\n" if (condition);
print "Location: $url2\n\n" unless (condition);
>or, in another case, when a certain .cgi is called, have it immediately
>load a new .html.
print "Location: $url\n\n";
As a beginner, I'm going nuts trying to do something in a .cgi program that
should be trivial:
I need to do an if(condition) load a .html, or load unless(condition).
or, in another case, when a certain .cgi is called, have it immediately
load a new .html.
I use an isp service running Apache,
If you got a precompiled version then it was compiled with highlighting
turned off. Just recompile it. If you compiled it yourself then you
somehow did so with highlighting turned off. ./configure --help when
compiling should be helpful.
At 08:19 PM 7/7/2001 +0200, Matija Papec wrote:
>"Wi
You should do some error checking...
#!/usr/bin/perl -w
use strict;
use Getcwd;
my $dir = "cody";
mkdir("$dir",0770) or warn("Could not mkdir $dir in ".getcwd.": $!\n");
This will tell you why or how something might be going wrong and what your
pwd is. Also, you should check the parent direc
On Fri, Jul 06, 2001 at 12:27:14PM +0500, Rizwan wrote:
> Where can I find a systax highlighting module for perl in perl.
> I want to call it from within the script and pass a perl script file to be
> syntactically highlighted..
I haven't tried it, but if you want the output to be HTML you might
"Wine, Michael" <[EMAIL PROTECTED]> wrote:
>YES!
>Try http://www.vim.org for a 'vi on steroids'...
>
>If you area vi freak, you'll love vim!
:) Somehow it isn't my favorite, besides it says that syntax coloring
":syn-on" isn't implemented, huh? Guess I'm stuck with some weird version.
>-Orig
On Sat, Jul 07, 2001 at 10:48:14AM -0500, [EMAIL PROTECTED] wrote:
> #!/usr/bin/perl -w
>
> use strict;
>
> my $dir = "cody";
> mkdir("$dir",0770);
>
>
> i am running this in my home directory on a linux machine, so i have full
> rights. when i run this however, the permissions on the director
>> Why don't you just do print qq~
>>http://my.host.com/name_of_file.xxx";>Click to getfile~;
>>and let the browser handle the rest for you.
>>
>>Because in that case, files like .txt or .html would appear in the browser
>>instead of being downloaded to my harddrive. This is not very helpfull
>>
I found link with printed book :
Teach Yourself Perl 5 in 21 days
David Till
http://www.vel-kladusa.net/Perl21/Perl21/index.htm
At 11:13 AM 7/7/01 -0400, [EMAIL PROTECTED] wrote:
> > Why don't you just do print qq~
>http://my.host.com/name_of_file.xxx";>Click to getfile~;
>and let the browser handle the rest for you.
>
>Because in that case, files like .txt or .html would appear in the browser
>instead of being downloaded
#!/usr/bin/perl -w
use strict;
my $dir = "cody";
mkdir("$dir",0770);
i am running this in my home directory on a linux machine, so i have full
rights. when i run this however, the permissions on the directory are:
drwxr-x---2 cmenzes cmenzes 1024 Jul 7 10:39 cody/
which translates
I'm not quite sure you're understanding what form the output will be in when
it gets into your script, but one question at a time:
The first question will vary slightly from dbd to dbd. However, in all cases
you will need to install DBI. After DBI, install the DBD for the the type of
connection y
> Why don't you just do print qq~
http://my.host.com/name_of_file.xxx";>Click to getfile~;
and let the browser handle the rest for you.
Because in that case, files like .txt or .html would appear in the browser instead of
being downloaded to my harddrive. This is not very helpfull (having those
Hello,
I have been tasked with writing a script that will prompt the user for a
ticket number,some other info, and a sql query. The script should create a
directory based on ticket number (easy enough) create files in the directory
that contains info based on second query, and then and here is wh
On Sat, Jul 07, 2001 at 12:43:56AM -0500, Hal Wigoda wrote:
> Does anyone have the code to produce a list of files in a directory??
perldoc -f readdir
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
At 13:24 06.07.2001 -0400, Aaron Petry wrote:
Oops.
>>>chomp(@f1fname = );
>>
>>I would do this:
>>my $line = ;
>>chomp $line;
>>@f1fname = split(/,/, $line);
>>
>>and then some error checking:
>>
>>print "Field counts do not match!\n" if(scalar(@f1fname) != $f1fnum);
>
>Actually, if I had been t
Why don't you just do
print qq~http://my.host.com/name_of_file.xxx";>Click to get file~;
and let the browser handle the rest for you.
At 16:12 06.07.2001 -0400, [EMAIL PROTECTED] wrote:
>This problem might not be entirely related to Perl, but I'm pretty sure
>Perl can help solve it.
>
>Here is
33 matches
Mail list logo