why, when i try to run one of my cgi scripts do i get a bad
interpreter, file not found error? my shebang line is correct and works
for every other perl script i run on that server. btw the script in
question is the ikonboard forum solution from www.ikonboard.com. does
anyone know of any bugs
Emm... I think this mail would better go to CGI list ...
[...]
#! /usr/local/bin/perl
print Content-type: text/html\n\n;
if ($ENV{'HTTP_USER_AGENT'} =~ /Mozilla 4/
and not $ENV{'HTTP_USER_AGENT'} =~ /compatible/i ) {
print surly.cgi;
} else {
print tipsy.cgi;
}
No... I believe. I've digging on this topic for very very long
time on my Win32, Sambar and Apache server.
I can't print any image out without \r\n\r\n, where \n\n is for
text file only. Why? I don't know =) Guess, because \r\n is for
*binmoded data*.
And without binmode STDOUT and IMAGE
-Original Message-
From: Mat Harris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 4:51 AM
To: [EMAIL PROTECTED]
Subject: bad interpreter
why, when i try to run one of my cgi scripts do i get a bad
interpreter, file not found error? my shebang line is
correct and
thanks, that was it. the fact that it came as a windows zip should have
given it away instantly.
thanks
On Wed, Aug 21, 2002 at 08:34:39 -0400, Bob Showalter wrote:
-Original Message-
From: Mat Harris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 4:51 AM
To:
On Wed, 21 Aug 2002 17:08:18 +0800, [EMAIL PROTECTED] (Connie Chan)
wrote:
#! /usr/local/bin/perl
use strict;
my $version = do_sth_detect_browser_ver();
my $page = 'surly.cgi';
if ($version = 4) { $page = 'tipsy.cgi' }
print Content-type: text/html\n;
You shouldn't print the regular header with
On Wed, 21 Aug 2002 09:51:09 +0100, [EMAIL PROTECTED] (Mat
Harris) wrote:
why, when i try to run one of my cgi scripts do i get a bad
interpreter, file not found error? my shebang line is correct and works
for every other perl script i run on that server. btw the script in
question is the
form method=post action=file_upload.cgi name=my_form enctype
=multipart/form-data
you need to send the enc_type...
I have an OLD, but still halfway decent tutorial at:
http://www.webreview.com/1998/08_14/developers/08_14_98_3.shtml
Brent
we all know already, what it looks like, when we have a form like
this:
form method=get action=/cgi-bin/blabla.cgi
input type=hidden name=AREA value=1
input type=hidden name=EXT value=bla
input type=submit name=submit
/form
will be this as a link:
At 05:56 PM 08/21/02 +0800, Connie Chan wrote:
No... I believe. I've digging on this topic for very very long
time on my Win32, Sambar and Apache server.
I can't print any image out without \r\n\r\n, where \n\n is for
text file only. Why? I don't know =) Guess, because \r\n is for
*binmoded
[.]
#!/usr/local/bin/perl -w
use strict;
open IMAGE, 'test.jpg' or die Failed to open image $!;
my $buf_chunk_size = 1024 * 16;
my $buffer;
binmode IMAGE;
binmode STDOUT;
print Content-Type: image/jpeg\n\n;
print $buffer while read IMAGE, $buffer, $buf_chunk_size;
-Original Message-
From: David Zhuo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 1:12 PM
To: Connie Chan
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; cgi mailing list
Subject: Re: Help!! Retrieving Image File
where do you get the impression that \n\n is for text
On Wed, 2002-08-21 at 10:44, Bob Showalter wrote:
-Original Message-
From: David Zhuo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 1:12 PM
To: Connie Chan
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; cgi mailing list
Subject: Re: Help!! Retrieving Image File
-Original Message-
From: David Zhuo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 1:41 PM
To: Bob Showalter
Cc: [EMAIL PROTECTED]
Subject: RE: Help!! Retrieving Image File
On Wed, 2002-08-21 at 10:44, Bob Showalter wrote:
-Original Message-
From:
where do you get the impression that \n\n is for text file and \r\n\r\n
is for binary data??? did you get that somewhere? \r\n\r\n is OS
specific but \n\n is portable. does Win32 and UNIX-ish use the same
crlf? your best beat is to use \n\n where Perl will
translate(transparently in the
hi ,
that's correct .
$| can have only 2 values. either 1 or 0. its undocumented but the behaviour is same
everywhere.
-
Get a bigger mailbox -- choose a size that fits your needs.
http://uk.docs.yahoo.com/mail_storage.html
on Tue, 20 Aug 2002 22:32:00 GMT, [EMAIL PROTECTED] (Rasoul
Hajikhani) wrote:
Can anyone recommend a good string search module? I want to be
able to get possible combinations, permutations, sounds like,
etc... for a given string which will be someone's name.
Thanks in advance.
Did you
Hi all,
file=`ls $ja`;
#Here the output is a list of files:
cp.exe
eula.txt
test2.vbp.mkelem
test3.vbp
# I want to grep for files with .dsp or .vbp extensions here, if the
number of files with extension .dsp or .vbp is 1 i should exit saying
project exists. or else send mail.
am i
[EMAIL PROTECTED] (Perl-Krackedpress) writes:
// check the email fields for validity
^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$
That will invalidate lots of proper email addresses. For example
anything in the .info domain.
For example [EMAIL PROTECTED] is also a valid email
Hi all,
I want to use perl compiled in 64 bits. Do you think perl 5.6.1 is mature
enough regarding 64 bits compliance ? Do you have already test it ?
Then I want to load Shared libraries produced with XS. I would like to be
able to load either 32 bits or 64 bits shared libraries with the same
Dizzy74 wrote at Wed, 21 Aug 2002 03:55:38 +0200:
Im wondering how does one know what modules are available?
Is there a master list with accompanying methods?
Or is CPAN the only source?
http://cpan.org/
Sometimes CPAN seems much too cryptic for a beginner(at least from my view).
Javeed Sar wrote at Wed, 21 Aug 2002 09:50:02 +0200:
@file=`ls $ja`;
#Here the output is a list of files:
cp.exe
eula.txt
test2.vbp.mkelem
Should this file matched too or not ?
I assume in my solution that it isn't.
test3.vbp
# I want to grep for files with .dsp or .vbp
on Wed, 21 Aug 2002 08:02:02 GMT, [EMAIL PROTECTED] (Javeed Sar)
wrote:
# I want to grep for files with .dsp or .vbp extensions here,
if the number of files with extension .dsp or .vbp is 1 i
should exit saying project exists. or else send mail.
am i doing the right thing?
No you
Sorry!! again, failed to send to the list
-- Forwarded message --
Date: Thu, 22 Aug 2002 00:29:11 +0530 (IST)
From: Sudarshan Raghavan [EMAIL PROTECTED]
To: Javeed SAR [EMAIL PROTECTED]
Subject: Re: regular expression
On Wed, 21 Aug 2002, Javeed SAR wrote:
# I want to grep
I learnt something about this for days only, so don't
know if there are bugs here :
# Create a package glob_vars.pm #
package glob_vars;
require Exporter;
our @ISA = qw (Exporter);
our @EXPORT = qw (%VARS)
our %VARS = ();
$VARS{sth_a} = 'sth_a';
$VARS{sth_b} = 'sth_b';
1;
# End of package #
I am working on a Win32 system, what now I am to do is checking and
blocking spams on my mail server. Recently, I use a software mail server
to receving mails, but, there is not filter features. What my approach is to
write my own mail server. So can block address, or matched content pattern
have a look at this. is has quite a good multithread-capable server.
http://www.perldoc.com/perl5.6.1/pod/perlipc.html#Sockets--Client-Server-Communication
On Wed, Aug 21, 2002 at 05:47:49 +0800, Connie Chan wrote:
I am working on a Win32 system, what now I am to do is checking and
blocking
No... I believe. I've digging on this topic for very very long
time on my Win32, Sambar and Apache server.
I can't print any image out without \r\n\r\n, where \n\n is for
text file only. Why? I don't know =) Guess, because \r\n is for
*binmoded data*.
And without binmode STDOUT and IMAGE
Is it possible to test if a hash variable is set? My thinking is something kinda
like this:
if ( $hashname[variable] ) {
do something smart again ;
}
that's $hashname{variable}, not [variable]...
Yes, you can do that, but if you also turned on warnings,
you will receive a warning.
Hello!
did somebody here ever used the safe.pm module?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Where do I start from to begin with perl cookies
I plan to have cookies for session management
Thanx
Ram
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hi everybody,
i am using Net::Telnet module.
it works fine for some users while for others it give this error message:
Timed-out:waiting for command prompt
I think this problem is concern with mounting of home directory of users.
How can i get rid of this problem.
*
Thanks in
on Wed, 21 Aug 2002 11:18:54 GMT, [EMAIL PROTECTED] (Ashish
Srivastava) wrote:
i am using Net::Telnet module.
it works fine for some users while for others it give this error
message: Timed-out:waiting for command prompt
I think this problem is concern with mounting of home directory of
Hi,
I'm trying to substitute all references to a date (of the format
MMDD) in a file to the current date. I'm obviously doing something
wrong here ('cause it doesn't work!:}), as no change is made to the
config.ini file.
the $date variable is derived form another part of my script.
Oops, I think you confused me with someone else. I did not ask this
question.
Shawn
[EMAIL PROTECTED]
on Wed, 21 Aug 2002 11:33:06 GMT, [EMAIL PROTECTED] wrote:
I'm trying to substitute all references to a date (of the format
MMDD) in a file to the current date. I'm obviously doing
something wrong here ('cause it doesn't work!:}), as no change is
made to the config.ini file.
open
Hello,
I am very new to Perl, wonder if someone can help me
with this... if I have:
@arr1 = qw (one two three four five);
@arr2 = qw (two four);
How can I remove all elements from @arr2 from @arr1 so
the new array will be @newarr = (one three five)??
Many thanks.
Priss
On Wed, 21 Aug 2002 [EMAIL PROTECTED] wrote:
Hi,
I'm trying to substitute all references to a date (of the format
MMDD) in a file to the current date. I'm obviously doing something
wrong here ('cause it doesn't work!:}), as no change is made to the
config.ini file.
the $date
use hashes.
my %HASH;
$HASH{$_}++ foreach @arr1;
delete $HASH{$_} foreach @arr2;
@arr1 = keys %HASH;
@arr1 now has ( one three five );
-Original Message-
From: Priss [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 8:54 AM
To: [EMAIL PROTECTED]
Subject: Remove elements
On Wed, 21 Aug 2002, Priss wrote:
Hello,
I am very new to Perl, wonder if someone can help me
with this... if I have:
@arr1 = qw (one two three four five);
@arr2 = qw (two four);
This is a faq, perldoc -q intersection
Although for this kind of operations a hash might be better option.
See inline comment:
-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 8:58 AM
To: 'Priss'; [EMAIL PROTECTED]
Subject: RE: Remove elements in an array from a different array
use hashes.
my %HASH;
$HASH{$_}++ foreach @arr1;
On Tue, 20 Aug 2002 15:25:41 -0700 (PDT), [EMAIL PROTECTED] (Dave
Smith) wrote:
I'm trying to write a program that will redirect people looking at a
site using Netscape 4. (I have a header that looks good in Mozilla,
Netscape 6, and IE, but looks pretty crappy in Netscape 4).
I'm new at
Thanks, but I forgot to mention in the beginning that i need to make this
modification only ONCE in my file- the character comes up every few
lines, but I only want the title ALIGNMENTS in the beginning..i.e, it
shd not replace all the s in my file..
?
sorry about that!
-thanks,
nandita
On
On Wed, 21 Aug 2002, Nandita wrote:
Thanks, but I forgot to mention in the beginning that i need to make this
modification only ONCE in my file- the character comes up every few
lines, but I only want the title ALIGNMENTS in the beginning..i.e, it
shd not replace all the s in my file..
?
Hi all,
Below is my session log showing me trying to install Device::SerialPort. Can
anyone tell me why it's failing please.
Gary
cpan install Device::SerialPort
Running install for module Device::SerialPort
Running make for C/CO/COOK/Device-SerialPort-0.12.tar.gz
Is already unwrapped into
At 05:56 PM 08/21/02 +0800, Connie Chan wrote:
No... I believe. I've digging on this topic for very very long
time on my Win32, Sambar and Apache server.
I can't print any image out without \r\n\r\n, where \n\n is for
text file only. Why? I don't know =) Guess, because \r\n is for
*binmoded
[.]
#!/usr/local/bin/perl -w
use strict;
open IMAGE, 'test.jpg' or die Failed to open image $!;
my $buf_chunk_size = 1024 * 16;
my $buffer;
binmode IMAGE;
binmode STDOUT;
print Content-Type: image/jpeg\n\n;
print $buffer while read IMAGE, $buffer, $buf_chunk_size;
Is there any way to have a perl script move one directory into
another like:
$ mkir one two
$ mv one two
$ ls two
one
without having to use system?
I tried
use File::Copy;
mkdir 'one';
mkdir 'two';
move('one', 'two');
but this renames one to two and
Check out Win32::FileOp.
-Original Message-
From: David Richardson
To: [EMAIL PROTECTED]
Sent: 8/21/02 8:48 AM
Subject: Moving directories
Is there any way to have a perl script move one directory into
another like:
$ mkir one two
$ mv one two
$ ls two
one
without
use hashes.
my %HASH;
$HASH{$_}++ foreach @arr1;
delete $HASH{$_} foreach @arr2;
@arr1 = keys %HASH;
@arr1 now has ( one three five );
Perhaps If you want to maintain the order in the array, you might use it this way:
my %HASH;
my %hORD;
my $count = 0;
$HASH{$_} = ($count++) for @arr1;
Hi,
why you dont use 2 split or 2 substr
ethernet t and pos are letter the rest is number
if you get the position of the last letter you just have to split the
string, one for the string the rest for the details. That should be quicker.
Pierre
From: Shawn [EMAIL PROTECTED]
To: [EMAIL
At 05:47 PM 8/21/02 +0800, Connie Chan wrote:
I am working on a Win32 system, what now I am to do is checking and
blocking spams on my mail server. Recently, I use a software mail server
to receving mails, but, there is not filter features. What my approach is to
write my own mail server. So can
Felix Geerinckx wrote:
on Wed, 21 Aug 2002 09:47:49 GMT, [EMAIL PROTECTED] (Connie Chan)
wrote:
What my approach is to write my own mail server. So can block
address, or matched content pattern immediately. But what my first
step is ... how to listening to my SMTP port ? Would anybody
I am writing a script that converts RTF to XML, and this script needs
to read an external data file to form a hash. I plan to make this
script available to anyone who needs it, and am wondering what to do
with this external data file.
Should I simply make the data file available with the script
Felix Geerinckx wrote:
on Wed, 21 Aug 2002 11:33:06 GMT, [EMAIL PROTECTED] wrote:
I'm trying to substitute all references to a date (of the format
MMDD) in a file to the current date. I'm obviously doing
something wrong here ('cause it doesn't work!:}), as no change is
made to the
@h{@arr1}=();
delete @h{@arr2};
print join(\n,keys %h),\n;
david
Priss wrote:
Hello,
I am very new to Perl, wonder if someone can help me
with this... if I have:
@arr1 = qw (one two three four five);
@arr2 = qw (two four);
How can I remove all elements from @arr2 from @arr1 so
the
do the following:
mkdir two;
chdir two;
mkdir one;
if you need to do something else, you need to move back to where you are
after the second mkdir
david
David Richardson wrote:
Is there any way to have a perl script move one directory into
another like:
$ mkir one two
$ mv one
on Wed, 21 Aug 2002 17:30:17 GMT, David wrote:
Felix Geerinckx wrote:
s/\d{8}/$date/g;
s/\d{8}/$date/go;
Why are you introducing the compile-once-modifier when there is no
variable to interpolate in the pattern?
Also, if you are taking on the job of correcting other posters'
How does one create a program to:
1. log into a secure web site which requires a username and password
2. click, or go to a specific web page within the site, parsing info
from it
3. from data received from page, repeat step 2
Ed Andrews
[EMAIL PROTECTED]
515-707-2000 phone
866-299-0676
On Wednesday, August 21, 2002, at 10:06 , Paul Tremblay wrote:
I am writing a script that converts RTF to XML, and this script needs
to read an external data file to form a hash. I plan to make this
script available to anyone who needs it, and am wondering what to do
with this external data
Howdy Zentara,
That one is closer than what my code was doing. It's printing out the
tipsy.cgi (that reads Netscape 4 page), instead of surly.cgi
(reading anti-Netscape 4 page).
But it directs IE 6, Mozilla 1, and Netscape 4.7 to the Netscape 4
page, instead of only the Netscape 4.7 page to
where do you get the impression that \n\n is for text file and \r\n\r\n
is for binary data??? did you get that somewhere? \r\n\r\n is OS
specific but \n\n is portable. does Win32 and UNIX-ish use the same
crlf? your best beat is to use \n\n where Perl will
translate(transparently in the
a lot of info/detail is missing, the following might be able to get you
started:
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
my $usr = 'user';
my $psw = 'psw';
foreach my $url (qw(url1 url2 url3 url4)){
my $req = new HTTP::Request GET = $url;
- Original Message -
From: zentara [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 9:14 PM
Subject: Re: browser redirect
On Tue, 20 Aug 2002 15:25:41 -0700 (PDT), [EMAIL PROTECTED] (Dave
Smith) wrote:
I'm trying to write a program that will redirect
Felix Geerinckx wrote:
s/\d{8}/$date/go;
Why are you introducing the compile-once-modifier when there is no
variable to interpolate in the pattern?
oops.. just realize that... better pay more attention next time :-)
Also, if you are taking on the job of correcting other posters'
hi... i'm trying to use AppConfig, but i'm getting the following error:
dir: no such variable at /home/sheila/loserspool/loserspool.conf line 1
when running this code:
code
$config = AppConfig-new ({ERROR = sub {die shift}});
$config-file ('/home/sheila/loserspool/loserspool.conf');
/code
If I wanted to have a multiple if statement how would I do that.
For example I would like to say
IF this and that and they are true
Do this
Would it look like this?
if ($url_array[$index] eq False|| $url_array[$index] eq false||
$url_array[$index] eq FALSE||) {
Do this
This does not seem to be
Hi I am having trouble getting the following script to
work. This is a script that I have inherited and am
hacking to get it work.
In this code, the following check is failing:
# Enter Foreach Loop
foreach $net (keys %nets) {
print Inside Foreach Loop\n;
print The value of \$net is :
Janek Schleicher wrote:
John W. Krahn wrote at Tue, 20 Aug 2002 22:43:55 +0200:
You can use \d instead of [0-9], \D instead of [^0-9] and \S instead of
[^\s].
/^(\D+)(\d+ |)(\d+\/\S+)(.*)$/
^^^
That's still an ugly and slow way to have an optional match
better write
On Wednesday, August 21, 2002, at 02:26 , [EMAIL PROTECTED] wrote:
[..]
p0: there is a virtue in
my $got_back = DTK::Flying::Wombat::flap(@funny);
since you know exactly what module you got that flap() from.
the alternative here is that you opt for what are known as
'utility classes'
Okay, I've got it figured out. Thanks for you help. I'll just
redirect the print commands to run the new headers depending on
browser versions.
--Dave
#!/usr/local/bin/perl5
use CGI qw(:all); # 'cause I'm lazy like that
print header(), start_html();
if ($ENV{HTTP_USER_AGENT} =~
On Wednesday, August 21, 2002, at 03:46 , Dave Smith wrote:
[..]
Okay, I've got it figured out. Thanks for you help. I'll just
redirect the print commands to run the new headers depending on
browser versions.
[..]
if ($ENV{HTTP_USER_AGENT} =~ /Mozilla\/4/i
and not
Hi,
I am trying to parse a large text file (10 MB, 400K lines) with the
following code. This is running FreeBSD-Stable (dual proc, 1GB ram),
however I keep receiving messages that I am out of memory, or that the
query timed out. I need to parse a file with email addresses to sort
out garbage.
I'm using Komodo from Active State and find it very slow when running code.
Can anyone recommend a Windows based app that provides an IDE that I can run
perl code in? I'm totally new to perl and would prefer not using notepad to
write perl code and then using the dos window for output. Any
74 matches
Mail list logo