[15980] in Perl-Users-Digest
Perl-Users Digest, Issue: 3392 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 16 14:10:40 2000
Date: Fri, 16 Jun 2000 11:10:29 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <961179029-v9-i3392@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 16 Jun 2000 Volume: 9 Number: 3392
Today's topics:
Re: Editor question <se97hs@dmu.ac.uk>
Re: flock() and blocking lock? (Marc Haber)
Re: flock() and blocking lock? (Marc Haber)
gui Perl? bradley_johnston@my-deja.com
Re: HTML by e-mail with Perl Problem (uses Net::SMTP) <Peter.Dintelmann@dresdner-bank.com>
I can't figure this one out... (Newbie question) (David Bell)
Re: I can't figure this one out... (Newbie question) <uri@sysarch.com>
Re: Name/Value pair for a hyperlink? <flavell@mail.cern.ch>
Re: Name/Value pair for a hyperlink? <care227@attglobal.net>
Re: need quick regexp help! michaeljgardner@my-deja.com
Re: need quick regexp help! <lr@hpl.hp.com>
Re: NT vs Unix detection <lwaibel@cwia.com>
perl generated html response problem <viciousdogs@zdnetmail.com>
Re: perl generated html response problem (Abigail)
Re: perl generated html response problem <lauren_smith13@hotmail.com>
Re: perl generated html response problem <care227@attglobal.net>
Re: Perlmagick and CGI bann3094@my-deja.com
Re: problems with swig and/or MakeMaker <gedichte@lycosmail.com>
Re: Recruiting for a perl CGI expert (David H. Adler)
Referer Security : http://username:password URL's <makau@multimania.com>
Re: Referer Security : http://username:password URL's <care227@attglobal.net>
Re: regex to capture numbers from string <abe@ztreet.demon.nl>
regular expressions: lazy vs greedy matt2876@my-deja.com
Re: regular expressions: lazy vs greedy <W.Hielscher@mssys.com>
Re: regular expressions: lazy vs greedy <kevinc@millfilm.co.uk>
Re: regular expressions: lazy vs greedy <abe@ztreet.demon.nl>
Re: regular expressions: lazy vs greedy <aqumsieh@hyperchip.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 16 Jun 2000 16:08:24 +0100
From: Haris Siakalis <se97hs@dmu.ac.uk>
To: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Editor question
Message-Id: <394A42E8.7026F48A@dmu.ac.uk>
Tom i didn't mean that.
I meant to give me on the right or somewhere a list of
certain portions of my program source.
Just a list, to parse the source code and display shortcuts to it
somewhere.If you check source Insight you will undestand
what i mean.
http://www.sourcedyn.com/images/fullb.gif
Thanks
Tom Phoenix wrote:
>
> On Fri, 16 Jun 2000, Haris Siakalis wrote:
>
> > What i am after and i cannot find is
> > an editor that will break my perl program into subroutines
>
> pico can do that. :-)
>
> Oh, you want it done automatically? Do the resulting subroutines have to
> run correctly? :-)
>
> Unless you want something different than you're saying, there's no useful
> tool that does what you want. If you want your program broken into
> subroutines, write it that way. There's no program out there that will do
> your job for you.
>
> Cheers!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 16 Jun 2000 16:26:19 GMT
From: usenet-9947@marc-haber.de (Marc Haber)
Subject: Re: flock() and blocking lock?
Message-Id: <394a54fb@news.ivm.net>
Tom Phoenix <rootbeer@redcat.com> wrote:
>On Fri, 16 Jun 2000, Marc Haber wrote:
>> if( open FH, "< $FHNAME" )
>> {
>> print "trying to hget lock on $FHNAME\n";
>> unless( flock( FH, LOCK_EX ) )
>
>On most systems I've seen, you can't get an exclusive lock if you don't
>have write permission.
My script runs with root privileges, and the file is located in a mode
777 directory.
>Try a shared lock if you're only reading. Cheers!
Even with a shared lock, my flock() call doesn't block.
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: Fri, 16 Jun 2000 16:27:50 GMT
From: usenet-9947@marc-haber.de (Marc Haber)
Subject: Re: flock() and blocking lock?
Message-Id: <394a5556@news.ivm.net>
nobull@mail.com wrote:
>usenet-9947@marc-haber.de (Marc Haber) writes:
>> I understand the docs that the flock( FH, LOCK_EX ) call only returns
>> if the lock has been successfully acquired. Hence, the "unless" clause
>> marked A should never be executed. However, in a real environment, I
>> keep getting "can't get lock on <filename>: Device or resource busy"
>> errors.
>
>I'm guessing this means that whatever structure is used to store the
>queue of outstanding locks has reached some upper-bound.
The machine I am working on isn't that busy. I don't believe that.
>This is almost certainly an OS issue related to the implementation of
>the flock() syscall and not a Perl one.
I'll probably go asking the Linux groups then.
>Incidenly you say this is on Limux and my Linux flock() manpage does
>not mention EBUSY as a possible return and nor does the kernel source.
>The kernel source (but not the manpage) indicates that you'll get
>ENOLCK (37 = No record locks available). Maybe you have an older
>kernel that returns EBUSY rather than ENOLCK.
That system is still running 2.0.36.
>> What am I doing wrong here? Is there some kind of timeout after which
>> even a blocking call to flock() will return without having acquired
>> the lock?
>
>Timeout? Do you mean flock() is not retuning EBUSY immediately?
If EBUSY means the error number that $! translates to "device or
resource busy", I get that pretty immediately.
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: Fri, 16 Jun 2000 16:16:11 GMT
From: bradley_johnston@my-deja.com
Subject: gui Perl?
Message-Id: <8idjrn$tak$1@nnrp1.deja.com>
What is WPERL.exe? Is it a gui version of Perl.EXE? It seems to run my
Perl script in the Windows NT environment with out the ugly DOS window
flashing by.
Thanks,
Bradley
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 16 Jun 2000 17:28:15 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: HTML by e-mail with Perl Problem (uses Net::SMTP)
Message-Id: <8idh26$3ss8@intranews.dresdnerbank.de>
Hi,
joel_ricker@my-deja.com schrieb in Nachricht
<8idf24$p8m$1@nnrp1.deja.com>...
>and I'm getting a little ahead of myself by trying to cobble together a
>script for sending out e-mails in HTML format. I found a script in the
>archives of libwww-perl
> Could someone give me a hand with it?
>
>uses Net::Smtp;
better use ...
I expected something like
$smtp->datasend( ' --------------5ADEC09B1959CE2F1D69C2F9--' );
before you end the data (just to finish the MIME part).
Best regards,
Peter Dintelmann
------------------------------
Date: 16 Jun 2000 16:22:10 GMT
From: db7654321@aol.comspamsux (David Bell)
Subject: I can't figure this one out... (Newbie question)
Message-Id: <20000616122210.03025.00000029@ng-ch1.aol.com>
Hello! I've been writing a little perl program to keep track of users
connecting to the internet. I'm very new to perl (I bought 'Learning Perl' a
couple weeks ago. Good book), and programming in general, and have run into
some problems that I can't figure out. Please respond in small words. :) Here
is the code (after a few hours of fiddling with it.) :
--
#!/usr/bin/perl -w
$true = "no";
$num = 0;
$userfile = "/home/david/perl/users";
open(USER, "$userfile");
$user = <USER>;
@users = qw($user);
close(USER);
open(USERINFO, "id -un|");
$userinfo = <USERINFO>;
close(USERINFO);
chomp ($userinfo);
open(WRITEUSER, ">>$userfile");
while($true eq "no") {
if ($users[$num] eq $userinfo) {
print "\n\tYou're already using the internet.\n\n";
$true = "yes";
} elsif ($num < 10) {
$num = ++$num;
} else {
print WRITEUSER "$userinfo ";
print "\n\tYou're on the list now!\n\n";
$true = "yes";
}
}
close(WRITEUSER);
--
I want the program to look for the user's username in the file (as an array)
'/home/david/perl/users', and if it's not there, to put it in the file.
'/home/david/perl/users' is being writen to, but somehow, the program still
doesn't work.
When run, I get this error:
--
Name "main::user" used only once: possible typo at ./test3 line 6.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
Use of uninitialized value at ./test3 line 15.
You're on the list now!
--
It looks like perl is complaining about $users not being @users, but isn't it
incorrect to use @users? I'm running perl-5.00503-10 on Redhat linux 6.1.
Tell me if I've forgotten to mention anything important. Any help is greatly
appreceated!
-------------------------
David Bell - Otherwise known as DB7654321
Remember to remove nospam, notrash or anything odd looking from my email
address. :)
------------------------------
Date: Fri, 16 Jun 2000 16:48:00 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: I can't figure this one out... (Newbie question)
Message-Id: <x7wvjp608w.fsf@home.sysarch.com>
>>>>> "DB" == David Bell <db7654321@aol.comspamsux> writes:
DB> #!/usr/bin/perl -w
good, you use -w. that is warning you about your (potential) bugs
learn to use strict as well.
DB> open(USER, "$userfile");
no need for the quotes there, in fact it is wrong in many case.
and ALWAYS check for the success of opne and other system calls
open(USER, $userfile) || die "can't open $userfile $!" ;
DB> $user = <USER>;
DB> @users = qw($user);
that is a very bogus line. it is assigning the string '$user' to the
first element of @users. it is surely not what you intend. and it is the
cuase of your loop warning.
DB> open(USERINFO, "id -un|");
no checking for success
DB> open(WRITEUSER, ">>$userfile");
one more time, no checking
DB> while($true eq "no") {
DB> if ($users[$num] eq $userinfo) {
that is the line in the warning. you onl have one element in @users, so
when the loop counter $num > 1 you are using uninitialized slots of @users.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Fri, 16 Jun 2000 16:54:40 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Name/Value pair for a hyperlink?
Message-Id: <Pine.GHP.4.21.0006161653490.8722-100000@hpplus03.cern.ch>
On Fri, 16 Jun 2000, Drew Simonis wrote:
> > I find I know which spec to consult when there's
> > something I need, and can rattle off RFC2616 or iso-8859-7 with the
> > rest of them.
>
> You mean there are _others_?
Well I'm struggling with H.323 and starting on MPLS at the moment.
Or did I misinterpret what you meant?
;-)
------------------------------
Date: Fri, 16 Jun 2000 11:18:48 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Name/Value pair for a hyperlink?
Message-Id: <394A4558.1F5C72FE@attglobal.net>
"Alan J. Flavell" wrote:
>
> On Fri, 16 Jun 2000, Drew Simonis wrote:
>
> > > I find I know which spec to consult when there's
> > > something I need, and can rattle off RFC2616 or iso-8859-7 with the
> > > rest of them.
> >
> > You mean there are _others_?
heh... I meant others that can rattle off RFCs and iso docs.
(why do I have a disturbed mental image of lots of Brits )
. o O (gathering in a pub and discussing RFCs over a pint of bitter)
(AND why am I silenty envious! )
------------------------------
Date: Fri, 16 Jun 2000 15:24:31 GMT
From: michaeljgardner@my-deja.com
Subject: Re: need quick regexp help!
Message-Id: <8idgqp$qok$1@nnrp1.deja.com>
In article <39468CA2.1711D54A@no_email.com>,
Young <no_email@no_email.com> wrote:
> $info2 = "BEGINstart aldsf asdflj end end2 end3FINISH";
> $info2 =~ s/start.*end//g;
>
> print $info2;
>
> I get "BEGIN3FINISH" but what I want is:
>
> "BEGIN end2 end3FINISH"
>
> In other words, I want to remove every string beginning with 'start'
and
> ending with 'end', but I don't want any occurrences of 'end' within
the
> removed strings.
>
> How do I do it? Thanks in advance!
>
> Young
>
Young,
Can you use a "word boundary" metacharacter after "end" in your regex.
I think the word boundary metacharacter is \b or \B.
Michael
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 16 Jun 2000 09:36:38 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: need quick regexp help!
Message-Id: <MPG.13b3f7768fb7803e98ab8a@nntp.hpl.hp.com>
In article <8idgqp$qok$1@nnrp1.deja.com> on Fri, 16 Jun 2000 15:24:31
GMT, michaeljgardner@my-deja.com <michaeljgardner@my-deja.com> says...
...
> Can you use a "word boundary" metacharacter after "end" in your regex.
> I think the word boundary metacharacter is \b or \B.
I think so to, one or the other. But before I posted my conjecture in
this newsgroup, I would have the courtesy to check the documentation.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 16 Jun 2000 09:01:40 PDT
From: Larry R. Waibel <lwaibel@cwia.com>
Subject: Re: NT vs Unix detection
Message-Id: <VA.00000038.02d07a81@cwia.com>
In article <8iarpr$rdt$1@soap.pipex.net>, Paul D.Smith wrote:
> Will $OSNAME aka $^O do for you?
>
Thanks for the reply but no. That gets put into the compiler when it's
compiled as an indication of the system it was compiled on. But we're using
Rational's "ccperl" that comes with their tool and that value is not set. So
I'm looking for some way to determine exactly which system I'm actually
running on, not which system Perl was compiled on. Any other
ideas/techniques?
------------------------------
Date: Fri, 16 Jun 2000 12:59:32 -0400
From: "verio" <viciousdogs@zdnetmail.com>
Subject: perl generated html response problem
Message-Id: <U1t25.5675$HD6.167914@iad-read.news.verio.net>
When I execute the following code called from a web browser, I keep getting
this error message:
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
Thank you for your suggestion
Your idea will be taken under consideration.
When I look at the source being sent back to the browser it has <p><p><pre>
prepended to the html code and </pre> at the end.
I have tried printing this to a file, but the problem html tags don't show
up there. In fact, the file will pass verification of html specs at
validator.w3.org
HELP!
print ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\"
\"http://www.w3.org/TR/REC-html40/strict.dtd\">");
print ("<html>");
print ("<head>");
print ("<meta http-equiv=\"Content-Type\"");
print ("content=\"text/html; charset=iso-8859-1\">");
print ("<meta name=\"GENERATOR\" content=\"Microsoft FrontPage Express
2.0\">");
print ("<title>Suggestion Confirmation</title>");
print ("</head>");
print ("<body bgcolor=\"#FFFFFF\">");
print ("<h2 align=\"center\">Thank you for your suggestion</h2>");
print ("<h3 align=\"center\">Your idea will be taken under
consideration.</h3>");
print ("</body>");
print ("</html>");
viciousdogs@zdnetmail.com
------------------------------
Date: 16 Jun 2000 13:50:56 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: perl generated html response problem
Message-Id: <slrn8kkra7.mjh.abigail@alexandra.delanet.com>
verio (viciousdogs@zdnetmail.com) wrote on MMCDLXXXI September MCMXCIII
in <URL:news:U1t25.5675$HD6.167914@iad-read.news.verio.net>:
<> When I execute the following code called from a web browser, I keep getting
<> this error message:
<>
<> CGI Error
<> The specified CGI application misbehaved by not returning a complete set of
<> HTTP headers. The headers it did return are:
<>
<>
Well, duh, isn't that bloody obvious?
There are *NO* headers at all.
It isn't Perls job to generate the headers for you; Perl is totally
CGI unaware. Just like C or Python.
If you run a Perl program in an environment that expects output in a
certain format, and you don't generate said output, then that's a fault
in your program logic. It would be the same problem regardless of the
language. Hence, the question is off topic here.
If you need any information on the CGI protocol, either read the half
sheet specification of it, or ask in a CGI related newsgroup. Down
the hall, to your left. Just follow the smell.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
------------------------------
Date: Fri, 16 Jun 2000 10:40:12 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: perl generated html response problem
Message-Id: <8idool$lk5$1@brokaw.wa.com>
verio <viciousdogs@zdnetmail.com> wrote in message
news:U1t25.5675$HD6.167914@iad-read.news.verio.net...
> When I execute the following code called from a web browser, I keep
getting
> this error message:
>
> CGI Error
> The specified CGI application misbehaved by not returning a complete set
of
> HTTP headers. The headers it did return are:
>
>
> Thank you for your suggestion
> Your idea will be taken under consideration.
>
> print ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\"
> \"http://www.w3.org/TR/REC-html40/strict.dtd\">");
> print ("<html>");
> print ("<head>");
> print ("<meta http-equiv=\"Content-Type\"");
> print ("content=\"text/html; charset=iso-8859-1\">");
> print ("<meta name=\"GENERATOR\" content=\"Microsoft FrontPage Express
> 2.0\">");
> print ("<title>Suggestion Confirmation</title>");
> print ("</head>");
> print ("<body bgcolor=\"#FFFFFF\">");
> print ("<h2 align=\"center\">Thank you for your suggestion</h2>");
> print ("<h3 align=\"center\">Your idea will be taken under
> consideration.</h3>");
> print ("</body>");
> print ("</html>");
Considering I know next to nothing about CGI or HTML, I'd have to guess that
you are not returning a complete set of HTTP headers. It isn't a Perl
problem. Your Perl code has no errors (except maybe an over-abundance of
print()s). You may want to check another group about authoring CGI programs
(like comp.infosystems.authoring.*).
Lauren
------------------------------
Date: Fri, 16 Jun 2000 13:56:56 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: perl generated html response problem
Message-Id: <394A6A68.E3E1BCEC@attglobal.net>
Abigail wrote:
>
> If you need any information on the CGI protocol, either read the half
> sheet specification of it, or ask in a CGI related newsgroup. Down
> the hall, to your left. Just follow the smell.
>
What smell!
------------------------------
Date: Fri, 16 Jun 2000 16:46:55 GMT
From: bann3094@my-deja.com
Subject: Re: Perlmagick and CGI
Message-Id: <8idllo$up8$1@nnrp1.deja.com>
Hi Tom,
Thanks for replying to my message. I not having a problem with a CGI
script, I having problems getting Perlmagick to work properly in the
script.
Roger
In article
<Pine.GSO.4.10.10006141005260.5301-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@redcat.com> wrote:
> On Wed, 14 Jun 2000 bann3094@my-deja.com wrote:
>
> > when I run the script from the command line the script
> > works fine, but if I run the script as a CGI,
>
> When you're having trouble with a CGI program in Perl, here's a handy
> troubleshooting guide to get you back on track.
>
> http://www.smithrenaud.com/public/troubleshooting_CGI.html
>
> Hope this helps!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 16 Jun 2000 18:04:11 +0200
From: Johannes <gedichte@lycosmail.com>
Subject: Re: problems with swig and/or MakeMaker
Message-Id: <394A4FFB.5A4F8573@lycosmail.com>
Tom Phoenix wrote:
> On Fri, 16 Jun 2000, Johannes wrote:
>
> > Running "perl Makefile.pl", I end up with a Makefile that produced only
> > errors like:
> > make: Fatal error: Don't know how to make target `Makefile.PL'
> >
> > Does anybody know what I have done wrong?
>
> Maybe you're calling it "Makefile.pl" when everybody expects it to be
> called "Makefile.PL"? :-)
Thanks a lot, this was really a problem.
But shouldn't swig create the Makefile.PL file by its own?
The file I created now creates a Makefile that doesn't compile,
most probably because I had an error in the Makefile.PL.
This is the content of the file:
use ExtUtils::MakeMaker;
WriteMakefile(
'NAME' => 'user_auth',
'OBJECT' => 'user_auth.o user_auth_wrap.o'
);
Did I forgot something?
thanks in advance
Johannes
>
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 16 Jun 2000 16:01:49 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Recruiting for a perl CGI expert
Message-Id: <slrn8kkjrd.s5k.dha@panix6.panix.com>
On Fri, 16 Jun 2000 08:09:54 -0500, Russ Jones <russ_jones@rac.ray.com> wrote:
>"David H. Adler" wrote:
>>
>> On Fri, 9 Jun 2000 14:26:10 +1000, Russell Banks
>> <russellb@decideinteractive.com> wrote:
>>
>> >If you fit the following job description, please contact us by email
>>
>> You have posted a job posting or a resume in a technical group.
>>
>
>etc etc etc
>
>I'm pretty sure that "David H. Adler" is a bot, too.
Don't I wish! It would make life *so* much easier... :-/
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
perl -e '$"=q-Just Another Perl Hacker-; push @x, $_ for (qw+* *+);
print "@x\n"' #requires perl 5.004_05 or later
------------------------------
Date: Fri, 16 Jun 2000 16:18:46 GMT
From: Makau Divangamene <makau@multimania.com>
Subject: Referer Security : http://username:password URL's
Message-Id: <8idk0i$tc7$1@nnrp1.deja.com>
I have noticed that when you click a link within a
http://un:pw@www.url.com/... document, the full URL containing the
password is sent to the visited url through the $ENV{HTTP_REFERER}
variable, which is extremely dangerous ...
However I have found out that sometimes the "un:pw" part is hidden (by
the http server?).
If you want to verify this, go to : www.club-fripons.com
At the bottom of the page, it will show you the FULL URL you came from!
Is there any way to prevent this, apart from redefining the referer
with the LWP's modules?
THANKS
PS : I know this message is more targeted to the cgi-authoring group
but that newsgroup seems to be just plain dead (after posting a
message, you usually get a reply after 2 days, if someone actually
replies ...). CLPM has a far better responsiveness of only a few
minutes (no kidding) what's more I don't think my message is so
offtopic, so please don't ignore =)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 16 Jun 2000 13:19:05 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Referer Security : http://username:password URL's
Message-Id: <394A6189.C0217464@attglobal.net>
Makau Divangamene wrote:
> If you want to verify this, go to : www.club-fripons.com
> At the bottom of the page, it will show you the FULL URL you came from!
Nice. Thanks for posting a link to that web-trash. Welcome to
my killfile.
>
> PS : I know this message is more targeted to the cgi-authoring group
Then you should have posted there, but its probably off topic
there too. Closer, but still a miss. I would check the HTTP
specs, and maybe then post in a newsgroup specific to the HTTP
implementation.
> but that newsgroup seems to be just plain dead (after posting a
> message, you usually get a reply after 2 days, if someone actually
I bet thats sooner than you'll get the kind of response you want
from this group.
> replies ...). CLPM has a far better responsiveness of only a few
> minutes (no kidding) what's more I don't think my message is so
> offtopic, so please don't ignore =)
Ignore an off topic posting? No way, they are just too easy to flame.
I'm being nice, because I really don't like flaming, but your
laziness and impatience is no reason to post off topic, and it is
_very_ off topic.
------------------------------
Date: Fri, 16 Jun 2000 17:16:55 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: regex to capture numbers from string
Message-Id: <4cgkksodh82ao38bbud9c3o5743v6danh4@4ax.com>
On Fri, 16 Jun 2000 03:50:15 GMT, Bob Walton <bwalton@rochester.rr.com>
wrote:
> Hmmm...I think what you want to do is a bit too complicated for a single
> substitute. Maybe something like this would work:
>
> while(<DATA>){
> my @a;
> s/[^:]+:([^,]+),/push @a,$1/eg;
> map {s/\D+//g} @a;
Or you could write those three lines as one (slight variation for
removing non-digits) and not destroy $_ in the process:
my @a = map { tr/0-9//cd; $_ } /[^:]+:([^,]+),/g;
> print join(' ',@a)."\n";
> }
> __DATA__
> fieldnameX:;8990380993;,fieldnameY:999999,
> fieldnameX:;89903xx80993;,fieldnameY:999999,
> fieldnameX:899xlll03xx80993,fieldnameY:999999,
--
Good luck,
Abe
------------------------------
Date: Fri, 16 Jun 2000 15:37:42 GMT
From: matt2876@my-deja.com
Subject: regular expressions: lazy vs greedy
Message-Id: <8idhk3$rd5$1@nnrp1.deja.com>
Hi,
this is probably a subtility is the use of the lazy +?
How can I insert dots (\.) between two commas? For example:
foo,,,bar,,and,,co
foo,.,.,bar,.,and,.,co
Thanks for your help.
Matt.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 16 Jun 2000 18:12:24 +0200
From: Wolfgang Hielscher <W.Hielscher@mssys.com>
Subject: Re: regular expressions: lazy vs greedy
Message-Id: <394A51E8.249E8AE3@mssys.com>
matt2876@my-deja.com wrote:
> [snip]
> How can I insert dots (\.) between two commas? For example:
>
> foo,,,bar,,and,,co
>
> foo,.,.,bar,.,and,.,co
Hi,
my $a = "foo,,,bar,,and,,co";
$a =~ s/,(?=,)/,\./go;
print "$a\n";
perfectly solves the described problem.
HTH
Wolfgang
------------------------------
Date: 16 Jun 2000 17:05:49 +0100
From: Kevin Campbell <kevinc@millfilm.co.uk>
Subject: Re: regular expressions: lazy vs greedy
Message-Id: <sz3dmd8vc2.fsf@vic.millfilm.co.uk>
On Fri, 16 Jun 2000 15:37:42 GMT, matt2876 wrote:
matt> Hi, this is probably a subtility is the use of the lazy +?
matt> How can I insert dots (\.) between two commas? For example:
matt> foo,,,bar,,and,,co
matt> foo,.,.,bar,.,and,.,co
$_=q(foo,,,bar,,and,,co);
while(s/,,/,.,/){};
print;
is one way to do it.
kevin
--
Kevin Campbell
kevinc@millfilm.co.uk +44 (0) 20 7287 4041 ext. 306
Mill Film, 40-41 Great Marlborough St, London, W1V 1DA UK
------------------------------
Date: Fri, 16 Jun 2000 18:24:01 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: regular expressions: lazy vs greedy
Message-Id: <1ukkkso55m9afac9o4k71tqahk0hsp2r84@4ax.com>
On Fri, 16 Jun 2000 15:37:42 GMT, matt2876@my-deja.com wrote:
> Hi,
Hi,
>
> this is probably a subtility is the use of the lazy +?
>
> How can I insert dots (\.) between two commas? For example:
>
> foo,,,bar,,and,,co
>
> foo,.,.,bar,.,and,.,co
Using a positive look-ahead assertion:
my $str = 'foo,,,bar,,and,,co';
$str =~ s/,(?=,)/,./g;
print "$str\n";
more information:
perldoc perlre
--
Good luck,
Abe
------------------------------
Date: Fri, 16 Jun 2000 17:19:08 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: regular expressions: lazy vs greedy
Message-Id: <7ag0qdy25u.fsf@merlin.hyperchip.com>
Wolfgang Hielscher <W.Hielscher@mssys.com> writes:
> matt2876@my-deja.com wrote:
> > [snip]
> > How can I insert dots (\.) between two commas? For example:
> >
> > foo,,,bar,,and,,co
> >
> > foo,.,.,bar,.,and,.,co
>
> Hi,
> my $a = "foo,,,bar,,and,,co";
> $a =~ s/,(?=,)/,\./go;
> print "$a\n";
> perfectly solves the described problem.
True, but a couple of nit picks:
1) You don't need to backwack the dot in the replacement part of the
regexp since that is simply in string context. A dot has no special
meaning there.
2) You don't need the /o modifier since it affects only any variables
that appear in the regexp. Since there are no vars, the /o is
useless.
--Ala
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 3392
**************************************