Wiggins D'Anconia wrote:
Philip Pawley wrote:
I want to be able to adapt my web-files, as they are being served, so that older
browsers get an xhtml 1.0-transitional version instead of the default xhtml 1.1
version. This will involve replacing the DOCTYPE declaration and, also, various xhtml
On Tue, 18 Feb 2003 10:39:25 +, Philip Pawley [EMAIL PROTECTED] wrote:
snip
Thanks for the suggestions. The problem is I need to start from someone requesting
an html file, not someone calling a script.
How can I do it?
mod_perl. I
on di, 18 feb 2003 16:43:22 GMT, Scott Lutz wrote:
What I am attempting to do, is do a server side form action
redirect based on a regex on a field from the form. It now seems that
this is just going to POST the form data, and leave the user hanging.
Is HTTP::Request the best way to direct
On Tuesday, Feb 18, 2003, at 08:43 US/Pacific, Scott Lutz wrote:
What I am attempting to do, is do a server side form action redirect
based on a regex on a field from the form.
[..]
[Mon Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature
end of script headers:
On Tuesday, Feb 18, 2003, at 10:33 US/Pacific, Scott Lutz wrote:
[..]
Thanks for the input drieux!
All of the information that I have found has said that you can not
change the form action using IE, which is why I was led to the server
side method. I will try the javascript, to see how it
Thanks for the input drieux!
All of the information that I have found has said that you can not change the form
action using IE, which is why I was led to the server side method. I will try the
javascript, to see how it works!
Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax:
Hi ,
is it possible to access file attributes in a Win32 environment via Perl.
I am interested not only in getting the DOS attributes like creation and
modified date, but also the stuff that can be
found on the second tab folder of the Properties dialog: File Version,
Description, Product
on Tue, 18 Feb 2003 08:42:11 GMT, [EMAIL PROTECTED] (Zeno Jauch)
wrote:
is it possible to access file attributes in a Win32 environment
via Perl. I am interested not only in getting the DOS attributes
like creation and modified date, but also the stuff that can be
found on the second tab
Rgíón «hávkú [EMAIL PROTECTED] wrote in message
003001c2d474$f6f76b20$[EMAIL PROTECTED]">news:003001c2d474$f6f76b20$[EMAIL PROTECTED]...
Hello all.
I've reading some messges relating to the use of modules.
How can I know what modules are installed in the server???
I have my site hosted on
Hi,
can anyone explain how to detect the module?
Can't locate loadable object for module HTML::Parser in @INC (@INC contains: lib
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
This is a vary slightly modified version of the example in the docs, and yet it
returns no more data than this in my log :
[Mon Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature end of script
headers: /var/cgi-bin/parse.cgi
Any help with what might be missing would be great
Here
I am writing a script that will read from a file named myfiles not stdin and print
the lines containing the following words everywhere or 'nowhere.
#!/usr/bin/perl
#use strict
while () {
chomp;
if (/^everywhere$|^nowhere$/)
print
}
How do I invoked the file myfiles
Madhu Reddy wrote:
Hi,
I have following script, basically this will
ding the duplicate rows in a file...
I am getting following warnings
Use of uninitialized value at Audit_WTN.pl line 133,
FH_IN_FILE chunk 18.
Use of uninitialized value at Audit_WTN.pl line 133,
FH_IN_FILE chunk 19.
Rob Dixon wrote:
Madhu Reddy wrote:
Hi,
I have following script, basically this will
ding the duplicate rows in a file...
I am getting following warnings
Use of uninitialized value at Audit_WTN.pl line 133,
FH_IN_FILE chunk 18.
Use of uninitialized value at Audit_WTN.pl line
on Tue, 18 Feb 2003 00:57:57 GMT, [EMAIL PROTECTED] (Scott
Lutz) wrote:
This is a vary slightly modified version of the example in the
docs, and yet it returns no more data than this in my log : [Mon
Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature end
of script headers:
Scott Lutz wrote:
This is a vary slightly modified version of the example in the docs,
and yet it returns no more data than this in my log :
[Mon Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature
end of script headers: /var/cgi-bin/parse.cgi
Any help with what might be missing
Hi
I am trying to run one perl script on APACHE server.My server is running well.I have
installed perl properly and it is configured with apache and also running well with
out any error.Now my web server is on UNIX system.I am saving my scripts in web
dirctory of server.When I tries to run the
Pankaj Kapare wrote:
Hi
I am trying to run one perl script on APACHE server.My server is running well.I have
installed perl properly and it is configured with apache and also running well with
out any error.Now my web server is on UNIX system.I am saving my scripts in web
dirctory of
--- Bryan Harris [EMAIL PROTECTED] wrote:
Wild, I had no idea perl supported all these notations...
LOL!!! There are more
TMTOWTDI: There's More Than One Way To Do It.
I'd like to concatenate two variables--
$newVar = $old1 . $old2;
-- where $old1 might be undefined. Is there any
Run it from the command line on the Apache machine and see if there are
any warnings. They would go out ahead of the HTTP headers and cause a
similar result.
--- R. Joseph Newton [EMAIL PROTECTED] wrote:
Pankaj Kapare wrote:
Hi
I am trying to run one perl script on APACHE server.My
if (/^everywhere$|^nowhere$/)
Any help is appreciated.
while () { print if /(every|no)where/ }
Are the anchors relevant?
while() { print if /^(every|no)where$/ }
__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
do {
my $empty;
$empty ++;
};
Also, the do() is superfluous here, isn't it?
It invokes some overhead (unless the optimizer squashes it out, which I
suspect)
Of course, the whole block is superfluous.
It's an expensive no-op, like saying undef(); on a line by
That's pretty common. A guy in our office prefers:
my $doc = \n;
$doc .= \tThe various lines of text his program will print\n;
$doc .= \tif you call it with no arguments, which he types\n;
$doc .= \tin quotes and indiviually appends with the dot op\n;
$doc .= \n;
to what I
From: Madhu Reddy [mailto:[EMAIL PROTECTED]]
sub log_msg() { print LOG @_\n; }
Won't work. By defining the function as
sub log_msg() {
with an explicit set of empty parens, you've promised Perl that it will
never receive any arguments, so the compiler enforces that. Perl's
prototyping can
--- Bernhard van Staveren [EMAIL PROTECTED] wrote:
In general my coding style is a bit condensed, I grew up
with Turbo Pascal and was taught to condense everything
(whether or not that was a good call by the teacher,
beats me) so I'm used to it.
I got my first real programming job in a shop
Are you certain it's installed?
--- Tom Beer [EMAIL PROTECTED] wrote:
Hi,
can anyone explain how to detect the module?
Can't locate loadable object for module HTML::Parser in @INC (@INC
contains: lib
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005
On Tue, Feb 18, 2003 at 07:33:05AM -0800, Paul wrote:
Yes it is! I can locate it via find in the subdirectory HTML under
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd and permissions
should also be appropriate!
It simply won't run and I get spam overfilling my inbox. I installed
it even
Hello guys,
I have just installed PERL/Apache and mod_perl, but this last one
gave me an error when I try to compile. Could anyone help me?
Thi is the error:
bash-2.05# make make test
cd src/modules/perl make -f Makefile.modperl
make[1]: Entering directory
I think I am going to move this over to the CGI list!
:o)
Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.pacificonline.com
-Original Message-
From: Scott Lutz
Sent: February 17, 2003 4:58 PM
To: [EMAIL PROTECTED]
Subject:
Paul wrote:
if (/^everywhere$|^nowhere$/)
Any help is appreciated.
while () { print if /(every|no)where/ }
Are the anchors relevant?
while() { print if /^(every|no)where$/ }
I've no idea. It's just that it seemed unlikely that the line
would contain only that word! I guess
Paul wrote:
do {
my $empty;
$empty ++;
};
Also, the do() is superfluous here, isn't it?
It invokes some overhead (unless the optimizer squashes it out, which
I suspect)
Of course, the whole block is superfluous.
It's an expensive no-op, like saying
Hi, all.
I was reading the perlsub docs and hit this speedbump:
NOTE: The behaviour of a my statement modified with a
statement modifier conditional or loop construct (e.g. my
$x if ...) is undefined. The value of the my variable
may be undef, any previously assigned value,
--- Rob Dixon [EMAIL PROTECTED] wrote:
Paul wrote:
do {
my $empty;
$empty ++;
};
Also, the do() is superfluous here, isn't it?
I was trying to show something that would return a value in
the same way as a subroutine block (so that I didn't need a
Again, from perlsub
Under
When to Still Use local()
3. You want to temporarily change just one element of an
array or hash.
You can localize just one element of an aggregate.
Usually this is done on dynamics:
{
local
I don't even know where to start with this error. Can anyone point me in
the right direction?
I'm running Perl 5.6.0 on Linux RH7.2, 2.4.7-10 kernel
FirebirdSS 1.0.2.908-0 as Interbase server.
This machine has been running for 6 months, and Perl and Interbase have
been happily working
Hello list,
What would be the safest way to create user accounts on a 2.4.x Linux system with
perl. Currently, I'm running a script that feeds options to 'useradd', but it is a
very sloppy method. The only reason i don't do this by hand is often several accounts
need to be created at once,
On Tue, 18 Feb 2003 09:18:26 -0800 (PST), Paul [EMAIL PROTECTED] wrote:
Hi, all.
I was reading the perlsub docs and hit this speedbump:
NOTE: The behaviour of a my statement modified with a
statement modifier conditional or loop
Personally I think using the operating system tools (useradd) is probably
the safest way to add a user minus from manually editing passwd,group files
and manually creating the directory yourself.
-Original Message-
From: Brian McGraw
To: [EMAIL PROTECTED]
Sent: 2/18/03 1:35 PM
Subject:
I got my first real programming job in a shop that was all KR C with
tons of legacy code written by people who had taught themselves the
language Believe me, I hacked like a machete never could, and
statements like
band = intmax(strtok(NULL,seps)[0]-64,0);
were considered *quite*
Ok here go's , I'm just starting to Learn Perl and it's a very slow
process.
I have this script the calculates the sum a bunch of numbers and prints
the final number to file, but my problem is I would like the number to have
a floating $sign but I'm sure how do this
Any help would be
Hi, all.
I was reading the perlsub docs and hit this speedbump:
NOTE: The behaviour of a my statement modified with a
statement modifier conditional or loop construct (e.g. my
$x if ...) is undefined. The value of the my variable
may be undef, any previously
James Parsons wrote:
Ok here go's , I'm just starting to Learn Perl and it's a very slow
process.
I have this script the calculates the sum a bunch of numbers and
prints the final number to file, but my problem is I would like the
number to have a floating $sign but I'm sure how do
James Parsons wrote:
Ok here go's , I'm just starting to Learn Perl and it's a very
slow process.
Super! Lots of help available here. Suggestion #1: Use a meaningful subject
line; something like Print floating dollar sign would have been better
than Simple Perl Script (Perl Script is
Paul wrote:
--- Rob Dixon [EMAIL PROTECTED] wrote:
Paul wrote:
do {
my $empty;
$empty ++;
};
Also, the do() is superfluous here, isn't it?
I was trying to show something that would return a value in
the same way as a subroutine block (so that
From: James Parsons [EMAIL PROTECTED]
I have this script the calculates the sum a bunch of numbers and
prints the final number to file, but my problem is I would like the
number to have a floating $sign but I'm sure how do this
printf (%7.2f\n,$total);
The number comes out as
--- Bernhard van Staveren [EMAIL PROTECTED] wrote:
band = intmax(strtok(NULL,seps)[0]-64,0);
I know barely enough C to hang myself with but the above does make
sense, in a real twisted way :D
lol -- as I said, that was tame. ;0)
I don't know really, usually the projects I write for
Paul wrote:
Hi, all.
I was reading the perlsub docs and hit this speedbump:
NOTE: The behaviour of a my statement modified with a
statement modifier conditional or loop construct (e.g. my
$x if ...) is undefined. The value of the my variable
may be undef, any
Paul wrote:
Hi, all.
I was reading the perlsub docs and hit this speedbump:
NOTE: The behaviour of a my statement modified with a
statement modifier conditional or loop construct (e.g. my
$x if ...) is undefined. The value of the my variable
may be undef, any
--- James Parsons [EMAIL PROTECTED] wrote:
I have this script the calculates the sum a bunch of numbers and
prints the final number to file, but my problem is I would like the
number to have a floating $sign but I'm sure how do this
printf (%7.2f\n,$total);
The number comes out as
James Parsons wrote:
Ok here go's , I'm just starting to Learn Perl and it's a very slow
process.
I have this script the calculates the sum a bunch of numbers and
prints the final number to file, but my problem is I would like the
number to have a floating $ sign but I'm sure how do
Paul wrote:
@a = 'A'..'Z';
{ my @a = (0..9);
{ local $a[3] = 'foo';
print join '|', @a, \n;
}
print join '|', @a, \n;
}
print join '|', @a, \n;
prints
==
0|1|2|foo|4|5|6|7|8|9|
0|1|2|3|4|5|6|7|8|9|
A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|
my $x = do { code };
works, because do flips the context, expecting a block and
returning a value.
I hadn't actually thought of it that way, but it's remarkably well
explained. Well done.
Thanks!
That way I can say
my $fh = do { local $_ };
open $fh, $file or die $!;
Ah,
Paul wrote:
my $x = do { code };
works, because do flips the context, expecting a block and
returning a value.
I hadn't actually thought of it that way, but it's remarkably well
explained. Well done.
Thanks!
That way I can say
my $fh = do { local $_ };
open $fh,
James Parsons wrote:
Ok here go's , I'm just starting to Learn Perl and it's a very slow
process.
I have this script the calculates the sum a bunch of numbers and prints
the final number to file, but my problem is I would like the number to have
a floating $sign but I'm sure how do
--- Rob Dixon [EMAIL PROTECTED] wrote:
NOTE: The behaviour of a my statement modified with a
statement modifier conditional or loop construct (e.g. my
$x if ...) is undefined. The value of the my variable
may be undef, any previously assigned value, or possibly
--- david [EMAIL PROTECTED] wrote:
my $x++ for(1..10);
Now there's one I hadn't thought of!
Does $x even exist after that statement? Or is it scoped to the
*implied* block?
lol -- neat. :)
Still, I wish the wording of the warning were different.
Paul
Paul wrote:
Either I'm misunderstanding the code, the docs, or both, but I think
it's the docs. What are they trying to say? Merely that
my $x = 1 if 0;
might not set the variable?
let me put it this way. do you know the difference of:
if(0){
my $x = 1;
}
and:
my $x = 1
Paul wrote:
--- david [EMAIL PROTECTED] wrote:
my $x++ for(1..10);
Now there's one I hadn't thought of!
Does $x even exist after that statement? Or is it scoped to the
*implied* block?
lol -- neat. :)
yes it does but not with the value you expect. even if you can guess what
the
From: Paul [EMAIL PROTECTED]
--- Rob Dixon [EMAIL PROTECTED] wrote:
NOTE: The behaviour of a my statement modified with a
statement modifier conditional or loop construct (e.g. my $x
if ...) is undefined. The value of the my variable may be
undef, any previously
my $fh = do { local *_ };
That doesn't do anything useful either. My guess is that Perl will
attempt to stringify the typeglob and put something like
qw( *package::_ ) into $x.
You sure? Somebody once told me to use
my $fh = do { local *FH };
because local saves the previous value
--- david [EMAIL PROTECTED] wrote:
Paul wrote:
@a = 'A'..'Z';
{ my @a = (0..9);
{ local $a[3] = 'foo';
print join '|', @a, \n;
}
print join '|', @a, \n;
}
print join '|', @a, \n;
prints
==
0|1|2|foo|4|5|6|7|8|9|
0|1|2|3|4|5|6|7|8|9|
--- Jenda Krynicky [EMAIL PROTECTED] wrote:
Replace the whole paragraph with
DO NOT DO THIS!
Now that parses. ;o]
__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--
To unsubscribe, e-mail:
--- david [EMAIL PROTECTED] wrote:
let me put it this way. do you know the difference of:
if(0){ my $x = 1; }
and:
my $x = 1 if(0);
Several. The primary *difference* I see is that in your version, the
scome of $x is limited to the block of the if statement, where in mine,
it would be
my $x++ for(1..10);
Does $x even exist after that statement? Or is it scoped to the
*implied* block?
yes it does but not with the value you expect. even if you can
guess what the value is, don't expect Perl won't change that in
future version. that's all the doc trying to tell you:
Paul wrote:
Lexicals aren't in the symbol table.
my $foo;
*can't* be accessed as $pack::foo, because it isn't IN a package.
true.
Locals, on the otherhand, *have* to be package variables that can be
tracked by $pack::foo syntax. So how can
my @bar;
allow
local
Paul wrote:
--- david [EMAIL PROTECTED] wrote:
let me put it this way. do you know the difference of:
if(0){ my $x = 1; }
and:
my $x = 1 if(0);
Several. The primary *difference* I see is that in your version, the
scome of $x is limited to the block of the if statement, where in
From: Paul [EMAIL PROTECTED]
--- david [EMAIL PROTECTED] wrote:
Paul wrote:
@a = 'A'..'Z';
{ my @a = (0..9);
{ local $a[3] = 'foo';
print join '|', @a, \n;
}
print join '|', @a, \n;
}
print join '|', @a, \n;
prints
==
--- Jenda Krynicky [EMAIL PROTECTED] wrote:
From: Paul [EMAIL PROTECTED]
--- david [EMAIL PROTECTED] wrote:
Paul wrote:
@a = 'A'..'Z';
{ my @a = (0..9);
{ local $a[3] = 'foo';
print join '|', @a, \n;
}
print join '|', @a, \n;
}
print
Lexicals aren't in the symbol table.
my $foo;
*can't* be accessed as $pack::foo, because it isn't IN a package.
true.
Locals, on the otherhand, *have* to be package variables that can
be tracked by $pack::foo syntax. So how can
my @bar;
allow
local $bar[2];
to localize
$domain =~ m/((\w+)\.(\w+)$)/;
my($dom) = $URI =~ m{://([^/:]+)};
What I was trying to get was just the domain without any
subdomains,
ie what you would register with a registrar
Ah. Sorry, I misunderstood.
Nothing comes to mind off the top of my head.
Oh well, thanks
So seems the concensus. I will be trying to adapt a module type system for it.
Thanks
Dan
Dan Muey wrote:
To share configuration variables in one place for lots and lots of
scripts to use instead of having to put them in each script
and then
on echanges and having to go through
Thanks! I 'll give her a go that route.
I like the idea just need time to do it then polish it up.
Thanks
Dan
Well, any other ideas on how I can have a hundred scripts
all use the
same settings and make it easy to change any of them at
will without
having to go edit a hundred
So seems the concensus. I will be trying to adapt a module type
system for it.
Feel free to post for assistance.
We learn more that way, lol ;o]
__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
Paul wrote:
Lexicals aren't in the symbol table.
my $foo;
*can't* be accessed as $pack::foo, because it isn't IN a package.
true.
Locals, on the otherhand, *have* to be package variables that can
be tracked by $pack::foo syntax. So how can
my @bar;
allow
local $bar[2];
Greetings!
The script I am trying to improve uses sendmail. Before I install the
script on its target Unix box, I would like to make sure the sendmail
part of it works. However, I'm working on a Win98 box. Where can I
get a sendmail for this?
Rob, who would have searched the archives if the
David wrote:
Paul wrote:
Not so -- ALL package variables in Perl *are* global, but likewise all
global variables in Perl are package vars. Even $_ is technically
$main::_ so that
$_ = 'foo';
package bob;
print $main::_.\n;
prints foo and the newline.
you are
I don't think sendmail is available for windows machines...
Try something like blat:
http://www.interlog.com/~tcharron/blat.html
On Wed, 2003-02-19 at 11:12, Rob Richardson wrote:
Greetings!
The script I am trying to improve uses sendmail. Before I install the
script on its target Unix
Hi,
This is regarding sending e-mail from perl script
using SMTP
my script is running fine..but i am not getting any
mail which i sent from script...
following is my program
correct me if any thing is wrong in the script.
messages with debug option attached at the end.
Beau E. Cox wrote:
Reading over Friedl's Mastering Regular Expressions, and he gives a
problem on pp. 143-144 where a poorly formed expression takes
might-as-well-be-forever to finish.
I can't replicate the problem.
I'm using 5.8. Have they upgraded that problem away?
I wanted to
Hi Guys,
now it's working fine
there is typeo in e-mail address
i put email address as '[EMAIL PROTECTED]'
here typeo...
actual is redy.ponnolu
now, how to chatch this type of erros in script...
if i put wrong e-mail address...does it bounce back ?
how to check this...
--- Madhu Reddy
Hi,
How to get first line, last line and no of lines in
a file.
is there any perl functions available for that ?
right now what i am doing is
open file
while (FH
{
$lines++;
}
close(FH)
This operation is expensive..
suppose, if file have millions of records,
it will take more time
-Original Message-
From: Madhu Reddy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 1:25 PM
To: [EMAIL PROTECTED]
Subject: How to get 1st line, last line and no of lines in a file
Hi,
How to get first line, last line and no of lines in
a file.
is
Hello,
I was wondering how I would could access arrays of arrays. I would like to
be able to get to (print, for now) the value in each nested array. Here
is what I've been trying:
~~~
#!/usr/bin/perl
@jon = qw/ jon hansfelt 123-1122 /;
@ben = qw/ ben
83 matches
Mail list logo