[13507] in Perl-Users-Digest
Perl-Users Digest, Issue: 917 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 27 03:07:17 1999
Date: Mon, 27 Sep 1999 00:05:12 -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: <938415911-v9-i917@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 27 Sep 1999 Volume: 9 Number: 917
Today's topics:
'print' and 'warn' difference (bug report) <kg@olympiakos.com>
Re: a question of buttons <flavell@mail.cern.ch>
Re: chatacter spacing <madebeer@igc.apc.org>
Command Line CGI Script <admin@gatewaysolutions.net>
Re: Help need with Gifgraph module on Win32 (Martien Verbruggen)
Help with perl on NT4.0 <rick@lowcountry.net>
Re: how to "use" my variables in modules (Abigail)
Re: how to "use" my variables in modules (Abigail)
Re: How to create files from CGI script? (Kragen Sitaker)
Re: injecting "my" varibales into caller's scope (Sean McAfee)
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Inserting HTML into document using PERL <ihatzi@asus.net>
Re: Multiple Option <dave@stahr.com>
Re: Multiple Option <flavell@mail.cern.ch>
Re: Multiple Option <bowman@montana.com>
Re: Multiple Option <dwoods@ucalgary.ca>
Re: Multiple Option (Martien Verbruggen)
Q on file rights for CGI process <tavi367@ibm.net>
Re: Randomize array..... <bowman@montana.com>
Re: Randomize array..... <madebeer@igc.apc.org>
Re: Randomize array..... (Abigail)
Re: remove the html tag in the file (Kragen Sitaker)
Re: remove the html tag in the file (Abigail)
Re: security question <madebeer@igc.apc.org>
Stanford Perl Mongers 9/28, Palo Alto Printers Inc Book <flash@pobox.com>
Re: WEB server in Pearl (Rob & Sylvia)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 27 Sep 1999 00:24:54 -0400
From: Kiriakos Georgiou <kg@olympiakos.com>
Subject: 'print' and 'warn' difference (bug report)
Message-Id: <m3aeq93rs9.fsf@gate7.olympiakos.com>
I have found a difference in the way 'print' and 'warn' output the
exact same string. I find the way 'print' handles it more convenient.
I include a small test program which should output the exact same
string twice, but it doesn't. In case you wonder why on earth I'd put
one or more \0 at the end of perl strings, I find it pretty convenient
to allocate a perl string with something like $str = "\0" x 256; so
then I can pass this $str to a 'char *' argument of a C function that
has been wrapped via SWIG. The C function can deposit something
interesting back to $str.
regards,
Kiriakos Georgiou
# beginning of test script (tested with perl5.005_03)
$s = "naughty\0";
print "$s string\n";
warn "$s string\n";
# end of test script
------------------------------
Date: Mon, 27 Sep 1999 02:57:28 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: a question of buttons
Message-Id: <Pine.HPP.3.95a.990927025136.11244B-100000@hpplus03.cern.ch>
On Sun, 26 Sep 1999 jlsimms@hotmail.com wrote:
> Unfortunately, using multiple buttons on a form isn't as easy as many
> would like it to be.
Fortunately, it's trivial. But some folks can't even handle that.
> You are correct - most people handle the
> situation with a scriptiing language.
You mean like Perl? What do you suppose would be wrong with that, then?
Did you expect to handle it with a chainsaw? A banana? A dead parrot?
> The problem is easy if you just
> wanted, say, a submit button and a cancel button (not simply a reset
> button)
<BUTTON...> is indeed codified in HTML4.0, but it doesn't actually work
in a WWW context, because most browsers don't support it as documented
(I think I can make an honourable exception here, namely Lynx).
Perhaps if you'd explain what you mean exactly by a "cancel button" then
it might not be so bad.
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Ah, so.
------------------------------
Date: Sun, 26 Sep 1999 23:39:29 -0700 (PDT)
From: Michael de Beer <madebeer@igc.apc.org>
Subject: Re: chatacter spacing
Message-Id: <APC&1'0'50775dc6'9dd@igc.apc.org>
Robert wrote:
>When the second .pl file reads that data and prints it to a web page, it
>places the text the same way, all words on the same line. This stretches
>the page because the text doesn't wrap.
I can think of two easy things:
a) don't put the text in <PRE></PRE> tags. HTML will reformat it for you.
b) see perldoc -q reformat to reformat your text into sensible sized lines.
-Michael
------------------------------
Date: Sun, 26 Sep 1999 21:35:38 -0500
From: "Scott Beck" <admin@gatewaysolutions.net>
Subject: Command Line CGI Script
Message-Id: <rutlqhcq3i594@corp.supernews.com>
While running a script from the command line
I understand that the script takes on the UID of the user
running the script.
Tell me if this is wrong. If it is the rest of this question is moot.
I need to create a directory as the standard User Nobody or what ever on
that server is the equivalent to what CGIs run as.
I thought about chown but it is not a very portable solution since not all
servers support this from non-root users.
Does someone know how I can do this from a script that has to be ran on the
command line?
Thanks,
--
Scott Beck
------------------------------
Date: Mon, 27 Sep 1999 01:34:05 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Help need with Gifgraph module on Win32
Message-Id: <hQzH3.123$Oy.3683@nsw.nnrp.telstra.net>
In article <eoyH3.1441$s82.7626@news1.online.no>,
"Trond Michelsen" <mike@crusaders.no> writes:
> The newest version of the GD module (v1.6+) does not support the
> GIF-format. IIRC the author can't afford the royality Unisys
> demands from authors of software that generates gif-images, so now
> the GD-package is for generating png-images instead. The GIFgraph
> module has been updated, and is now called PNGgraph.
Almost correct, but not entirely. GIFgraph and PNGgraph are not the
same thing. PNGgraph is GIFgraphs code, slightly reworked to work with
the new version of GD, but it has not been done by me, because I
basically didn't have the time to fix this.
I am currently working on creating some version of this code that can
work with both types of GD (old and new), and move it into a better,
less obsolete name space (GD::graph, or GDgraph or something like
that). At that point in time GIfgraph will become a wrapper around the
new package, and hopefully, so will PNGgraph.
If someone can convince my boss and my family that I really need to
sit down and work on this for a few hours, then possibly it'll be done
soon :)
Martien
--
Martien Verbruggen |
Interactive Media Division | Failure is not an option. It comes
Commercial Dynamics Pty. Ltd. | bundled with your Microsoft product.
NSW, Australia |
------------------------------
Date: Thu, 23 Sep 1999 21:23:27 GMT
From: Rick <rick@lowcountry.net>
Subject: Help with perl on NT4.0
Message-Id: <37EA9A4F.39843276@lowcountry.net>
I am trying to get the following file to work on a windows NT machine, I
have used this file successfully on Linux and HPUX machines in the past.
I get no errors reported in the event viewer, auditing is turned on.
I get no errors in the web server error log.
I get successful accesses in the web server access log.
It seems to be doing everything but writing the file, any help would be
greatly appreciated.
I am using NT4.0 and activeperl build 519
The code is pasted below.
Thanks
Rick
#######################################
# For web transfer #
# of files #
# original author unknown #
#######################################
use CGI qw(:standard);
print header();
print start_html(" Send Mail File ");
print strong("Version "),$CGI::VERSION,p;
print h1(" Send Mail File ");
@types = ('count lines','count words','count characters');
# Start a multipart form.
print start_multipart_form(),
"Enter the file to process:",
filefield('filename','',45),
br,
checkbox_group('count',\@types,\@types),
p,
reset,submit('submit','Process File'),
p,
endform;
# Process the form if there is a file name entered
$\=""; #output field separator;
$/="\r\n";
if ($file = param('filename')) {
unless ($file =~m/.txt$/ || $file =~ m/.xls$/ || $file=~m/.doc$/ ||
$file=~m/.tpm$/) {
print ' Be sure to keep the EXACT same filename, as
this is how the program recognizes the attachment. One of the
following file extensions
<i>must</i> be used: <b><font color=ff0000> .txt, .xls, .doc,
.tpm</font></b>';
}
else {
$tmpfile=tmpFileName($file);
@filename1=split(/\\/, $file);
$file2 = $filename1[$#filename1];
print hr(),
h2($file),
h3(
a({href=>"c:\mailfile\$file2"},"$file2") );
# my($lines,$words,$characters,@words) = (0,0,0,0);
###########################################################
open (OUTFILE,">c:\mailfile\$file2");
binmode (OUTFILE);
$cnt = 0;
while ($bytesread=sysread($file,$buffer,1024))
{
$cnt = $cnt + $bytesread;
syswrite(OUTFILE,$buffer,$bytesread);
}
close OUTFILE;
##############################################
}
print "cnt = $cnt";
}
------------------------------
Date: 27 Sep 1999 01:49:28 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: how to "use" my variables in modules
Message-Id: <slrn7uu5a8.8gi.abigail@alexandra.delanet.com>
Jeff Greer (jgreer@showmethenet.com) wrote on MMCCXVII September MCMXCIII
in <URL:news:37f09515.81652593@news-server.kc.rr.com>:
!!
!! I am a computer scientist, but newbie Perl programmer. I'm
!! having trouble with visibility, scope, and lifetime of "my"
!! variables across modules. How do I use "my" variables across
!! using "use" ? I've gone through my O'reilly Perl books but I
!! don't think they explain what I am trying to do very well.
!!
!! Here is my code. Why can't I use $jeff in test.pl? How do I
!! make this work?
You can't. 'my' variables are lexical scoped. Their scope continues
to the end of their enclosing block, or to the end of the file they
are declared in.
A my variable will not be visible in a different file, unless you use
eval tricks.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 27 Sep 1999 01:53:33 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: how to "use" my variables in modules
Message-Id: <slrn7uu5ht.8gi.abigail@alexandra.delanet.com>
Jeff Greer (jgreer@showmethenet.com) wrote on MMCCXVII September MCMXCIII
in <URL:news:37f1a9e1.86976468@news-server.kc.rr.com>:
&& [posted and emailed]
&&
&& Thanks for the input. I want to use good programming conventions
&& by avoiding global variables. What is a good way to get
&& variables from .pm files? I want to use "use strict;" in my
&& files. Is this even possible?
Yes. You probably want to use the Exporter module. Read its manpage.
&& I would like my code to run fast.
Don't we all? You make your code run fast my using fast algorithms.
If the way you declare variables is depending on the speed, you are on
the wrong track. If you are that good that that is the only way to get
a speed increase, you wouldn't be asking these questions. And you also
would realize that if such speed gains are absolutely vital, you wouldn't
have picked Perl in the first place.
&& Don't all global variables bind at runtime?
I don't know what you mean by that. Bind to what?
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 27 Sep 1999 02:11:18 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: How to create files from CGI script?
Message-Id: <anAH3.984$J66.115080@typ11.nn.bcandid.com>
In article <37EDAEFC.C929A798@desertigloo.com>,
David P. Schwartz <davids@desertigloo.com> wrote:
>This strikes me as very unusual and unexpected behavior. Is there some
>chance that
>directories named "protected" are set to behave differently than normal?
>Or perhaps
>even subdirs beneath tmp (it's possible, but unlikely)?
No. What part of it strikes you as unusual and unexpected? That I
couldn't rm or mv the file?
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Sun Sep 26 1999
43 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 27 Sep 1999 01:48:22 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <G1AH3.67$Gn.17028@news.itd.umich.edu>
In article <37ed72e0@cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting mailed to cited author]
>:So all you need is to run a query that returns one row, and store the
>:contents of that row in some variables? Why not just write a subroutine
>:that executes the query and returns the row, letting you store the return
>:values any way you want?
>Better yet, use global variables, not return lists.
>Better yet, don't call a subroutine. Do it in-line.
>Better yet, don't use Perl. Machine language would be faster.
Without the context provided by your other articles here on the newsgroup,
that "courtesy cc" was pretty cryptic.
Personally, I think courtesy cc's are rude. It's essentially the same as
saying "Maybe you're following the discussion on Usenet and maybe you
aren't, but what *I* have to say is so important I want to make *sure* you
read it."
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: 26 Sep 1999 20:54:21 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37eedc5d@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
mcafee@waits.facilities.med.umich.edu (Sean McAfee) writes:
:Personally, I think courtesy cc's are rude. It's essentially the same as
:saying "Maybe you're following the discussion on Usenet and maybe you
:aren't, but what *I* have to say is so important I want to make *sure* you
:read it."
I get a lot of thank-you notes about this, outnumbering complaints
10 to 1. And the people who say thank you are much more in need than
the bitchers are. Of course, selfish people always think they deserve
special treatment even if it hurts ten times the number of innocents.
I don't really think this forum deserves any more help at all, from me,
or from anyone. You can suffer by yourselves.
--tom
--
"Sex education classes in our public schools are promoting incest."
--Jimmy Swaggart, TV preacher, self-described pornography addict who paid
prostitutes to commit "pornographic acts"; hypocrite
------------------------------
Date: Mon, 27 Sep 1999 02:49:31 -0400
From: "Ion Hatzithomas" <ihatzi@asus.net>
Subject: Inserting HTML into document using PERL
Message-Id: <7sn4jd$sbr$1@winter.news.rcn.net>
How do I insert an extra html line using PERL.
Lets say I have this html doc...
<br><br>
<p>Click here to search</p>
<br><br>
And I want to display...
<br><br>
<a href="http://www.yahoo.com"><img src="yahoo.gif"></a>
<p>Click here to search</p>
<br><br>
can I insert some PERL script to fill in the missing URL? Like This...
<br><br>
geturl.pl
<p>Click here to search</p>
<br><br>
I donot want to use SSI..
Can it be done?
Thanx
------------------------------
Date: Mon, 27 Sep 1999 06:06:03 GMT
From: "Dave Stahr" <dave@stahr.com>
Subject: Re: Multiple Option
Message-Id: <fPDH3.421$zG3.7482@news.rdc1.ne.home.com>
Assuming you're using CGI.pm, just use a simple foreach loop....this will
simply print out your values for you...
foreach ($query->param('formfieldname') ) {
print "$_\n";
}
If you don't use CGI.pm ... well, I'm sorry. You should be. :-)
Dave
webmaster <webmaster@outsource2000.com> wrote in message
news:37EEE0FD.FDC02D9F@outsource2000.com...
> Hello,
>
> Can someone help me and tell me how to handle multiple selection from a
> dropbox in my form? I have a form that let user to choose from a
> dropbox. User can hold CTRL key down a select multiple choices. How do I
> pass this choices into my script?
>
> Please help
>
> Sincerely,
>
> Martin
>
------------------------------
Date: Mon, 27 Sep 1999 02:50:19 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Multiple Option
Message-Id: <Pine.HPP.3.95a.990927024806.11244A-100000@hpplus03.cern.ch>
On Sun, 26 Sep 1999, webmaster wrote:
> Can someone help me and tell me how to handle multiple selection from a
> dropbox in my form?
Those who can write programs don't need to ask. The rest of us use
CGI.pm.
What you doing posting to a group that hasn't existed for several years?
[f'ups set]
--
"The carping of gurus may show the way to enlightenment"
(from an ob.dic on c.l.p.m)
------------------------------
Date: Sun, 26 Sep 1999 19:21:31 -0600
From: bowman <bowman@montana.com>
Subject: Re: Multiple Option
Message-Id: <37EEC69B.50029F03@montana.com>
Alan J. Flavell wrote:
>
> What you doing posting to a group that hasn't existed for several years?
> [f'ups set]
Ah, but it is so quiet and peaceful on c.l.p. Abigail *knows* it
doesn't exist, and never flames away.
------------------------------
Date: Sun, 26 Sep 1999 23:00:43 -0700
From: Dan Woods <dwoods@ucalgary.ca>
Subject: Re: Multiple Option
Message-Id: <7smu2n$kcg@ds2.acs.ucalgary.ca>
... in regards to posting on obsolete comp.lang.perl
Ok, so I'm curious about something else. I can understand why changes
were made, but what is the history as to why there's no
"comp.lang.perl.cgi" ? Users are directed to go to
"comp.infosystems.www.authoring.cgi" instead. Was it to avoid
duplication, or did this group not want to answer CGI questions ?
It seems that having c.l.p.c would become more obvious to newbies
that this other group is where they should ask their CGI questions.
Just wondering...Dan.
------------------------------
Date: Mon, 27 Sep 1999 05:38:33 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Multiple Option
Message-Id: <tpDH3.247$Oy.6498@nsw.nnrp.telstra.net>
In article <7smu2n$kcg@ds2.acs.ucalgary.ca>,
Dan Woods <dwoods@ucalgary.ca> writes:
> ... in regards to posting on obsolete comp.lang.perl
>
> Ok, so I'm curious about something else. I can understand why changes
> were made, but what is the history as to why there's no
> "comp.lang.perl.cgi" ? Users are directed to go to
For the same reason that there are no groups like comp.lang.c.cgi,
comp.lang.python.cgi, comp.mail.sendmail.cgi, comp.lang.perl.sql,
alt.fan.furry.beings.mentioned.in.cgi.programs, and
comp.lang.perl.control.cucumber.greenhouse.watering-systems.
Perl has no direct bearing on CGI. CGI has no direct bearing on Perl.
If there had to be a group in every language for any protocal or
interface implementable in that language, the number of groups would
quickly explode, and useful groups like
alt.tv.dinosaurs,barney.die.die.die and alt.fan.howard-stern.fartman
would be squeezed out of existence.
Now, we don't want that, do we?
Martien
--
Martien Verbruggen |
Interactive Media Division | Never hire a poor lawyer. Never buy
Commercial Dynamics Pty. Ltd. | from a rich salesperson.
NSW, Australia |
------------------------------
Date: Sun, 26 Sep 1999 20:20:51 -0500
From: <tavi367@ibm.net>
Subject: Q on file rights for CGI process
Message-Id: <37eec6bf_4@news1.prserv.net>
I have a CGI Perl script that runs fine on my NT, it runs fine from the
infoboard shell prompt, but it fails when run as a CGI process.
This script uses DB_File. At the shell prompt, the scripts creates and reads
a file just fine.
I created a 'tmp' (777) directory in my cgi-bin directory to place these
files I need to create and use.
As prompt Process, the script:
- creates the file
- places data in the file
- reads data from the file.
As CGI Process, the script:
- creates the file
- places data in the file
- it can not read data from the file.
The file as properties values of
Script from the prompt:
-rw-r----- 1 walter 24 Sep 26 20:47 text
Script run as CGI process:
-rw-r----- 1 nobody 24 Sep 26 20:55 text
I tried placing these files in the system '/tmp', in a 'tmp' directory (777)
of my $HOME.
All these locations gave me the same results, or lack there of.
So, my question is....
What do I need to do to have my CGI processes create files and read and
write to these files?
Please help me.
Walter
------------------------------
Date: Sun, 26 Sep 1999 19:11:53 -0600
From: bowman <bowman@montana.com>
Subject: Re: Randomize array.....
Message-Id: <37EEC459.7B4A2C68@montana.com>
Abigail wrote:
>
> `` 2: create your array of n elements. select a random element from 1 to
> `` n-1 and swap it with element 0.
>
> And that algorithm is *wrong*. Think about it.
Er, would you be happier if I said, pick a random element fron the set,
and swap it with the (n-1)th element, unless you selected the last
element, then why bother? That is the first iteration of the
fisher_yates_shuffle in the FAQ, is it not?
--
Bear Technology Making Montana safe for Grizzlies
http://people.montana.com/~bowman/
------------------------------
Date: Sun, 26 Sep 1999 15:23:19 -0700 (PDT)
From: Michael de Beer <madebeer@igc.apc.org>
Subject: Re: Randomize array.....
Message-Id: <APC&1'0'50775dc5'5d3@igc.apc.org>
>I'm just learning perl for couple of days,
Great.
You should know that the most of your questions will be answered in the
documentation and FAQs. Before posting questions here, next time please
read the FAQ. If you have an unix computer,
perldoc perl
perldoc perldoc
perldoc perlfaq
If you have a windows95 computer, the perlfaq probably came as HTML
documents in your perl distribution, and is probably an menu item in your
start menu.
>and i encountered a problem on
>randomize the array elements and put the result into another array...
This, for example, is a FAQ. To read the excellent answers,
perldoc -q random
HTH
-Michael
------------------------------
Date: 27 Sep 1999 01:38:30 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Randomize array.....
Message-Id: <slrn7uu4lm.8gi.abigail@alexandra.delanet.com>
bowman (bowman@montana.com) wrote on MMCCXVIII September MCMXCIII in
<URL:news:37EEC459.7B4A2C68@montana.com>:
<> Abigail wrote:
<> >
<> > `` 2: create your array of n elements. select a random element from 1 to
<> > `` n-1 and swap it with element 0.
<> >
<> > And that algorithm is *wrong*. Think about it.
<>
<> Er, would you be happier if I said, pick a random element fron the set,
<> and swap it with the (n-1)th element, unless you selected the last
<> element, then why bother? That is the first iteration of the
<> fisher_yates_shuffle in the FAQ, is it not?
Yes. And the difference is that you pick a random element from the
*entire* set, while in your first suggestion you excluded the first
element, thereby making sure many permutation will never show up
after a shuffle.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 27 Sep 1999 01:41:08 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: remove the html tag in the file
Message-Id: <UWzH3.947$J66.100765@typ11.nn.bcandid.com>
In article <slrn7ut2ht.88i.abigail@alexandra.delanet.com>,
Abigail <abigail@delanet.com> wrote:
>I never said I could do all three in half a line, but I can do all three
>in a single line:
>
>Printing the tags first, then the text:
>perl -MLWP::Simple -e '$_ = get ("URL"); print /<([^>*])>/, />([^<]*)</'
I think your first * and ] are transposed.
Running
perl -ne 'print /<([^>]*)>/, />([^<]*)</'
with the input
<html>invalid text<head>more bad stuff<title>title</title></head><body></body></html>
produces "htmlinvalid text" as output, which is not quite right; it
only fetched the first "tag" and text. I think you wanted a /g:
perl -ne 'print /<([^>]*)>/g, />([^<]*)</g'
, which produces "htmlheadtitle/title/headbody/body/htmlinvalid
textmore bad stufftitle" as output, given the same input, which is
correct.
>Really? Prove it. Don't come with stupid examples that don't work.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Sun Sep 26 1999
43 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 27 Sep 1999 01:42:29 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: remove the html tag in the file
Message-Id: <slrn7uu4t5.8gi.abigail@alexandra.delanet.com>
Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCCXVII September
MCMXCIII in <URL:news:7sm40l$dmq$1@gellyfish.btinternet.com>:
<>
<> At this point I might add that I got mailed by someone from rebol.com:
<>
<> <QUOTE>
<> </QUOTE>
<>
<> Sounds like some sort of crusade to me.
<>
<> What was that other 'language' that they were pushing like this last year ?
I cannot remember another language. But last year, they were pushing Rebol
in the Perl community as well. I once downloaded a version. It would go
into an infinite loop on start up. They claimed that bug has been fixed
since, but still, *any* testing on their part would have revealed the bug.
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 26 Sep 1999 15:17:40 -0700 (PDT)
From: Michael de Beer <madebeer@igc.apc.org>
Subject: Re: security question
Message-Id: <APC&1'0'50775dc4'468@igc.apc.org>
The Other Michael wrote
>if my perl cgi script run ok with the -T( taint check )
>does this mean that it is safe and can not be used
>to hack my server?
No, it means its less likely you have an accidental hole.
Read perldoc perlsec
Here is a small piece of perlsec:
[With taint]
If you try to do something insecure, you will get a fatal
error saying something like "Insecure dependency" or
"Insecure $ENV{PATH}". Note that you can still write an
insecure system or exec, but only [...] explicitly [...]
HTH,
-Michael
------------------------------
Date: 27 Sep 1999 02:50:26 GMT
From: Flash Sheridan <flash@pobox.com>
Subject: Stanford Perl Mongers 9/28, Palo Alto Printers Inc Bookstore Cafe
Message-Id: <7smm1i$2ce$1@samba.rahul.net>
The Stanford Perl Mongers meet at 8pm on the last Tuesday of each month.
The next meeting will be on September 28th; this will be a joint meeting
with the Stanford Newton User Group, which meets on the second and fourth
Tuesday of each month.
Printers Inc Bookstore Cafe,
310 California Ave,
Palo Alto, California
For more information, send mail to flash@pobox.com, or go to the Stanford
Perl Mongers home page, http://pobox.com/~flash/spam/
--
<LI><a href="http://pobox.com/~flash">Flash Sheridan</a>
<LI><a href="http://pobox.com/~spug">Stanford PalmPilot User Group</a>
<LI><a href="http://pobox.com/~flash/spam">Stanford Perl Mongers</a>
------------------------------
Date: Mon, 27 Sep 1999 07:45:59 +0200
From: Rob.van.Son@hum.uva.nl (Rob & Sylvia)
Subject: Re: WEB server in Pearl
Message-Id: <Rob.van.Son-2709990745590001@stol-117-2.uva.studentennet.nl>
There are many small and some large Perl WWW servers. It's actually very
easy to write one. Look in CPAN: mhttpd server by Jerry LeVan
(levan@eagle.eku.edu) or my own CGIservlet.pl derived from it.
Rob van Son
Rob.van.Son@hum.uva.nl
In article <164c000c.f00d98d1@usw-ex0108-059.remarq.com>, rommelhere
<rommelhereNOroSPAM@YAHOO.COM.invalid> wrote:
>Hello All,
>I'm a perl newbie. i have to write a Webserver in perl.
>
>Please suggest resources\modules and possible approach i
>should take.
>
>Any help will be greatly appreciated,
>regards,
>
>rommel
>
>
>
>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
>The fastest and easiest way to search and participate in Usenet - Free!
--
Rob & Sylvia
Van Son Bruisten
Rob.van.Son@hum.uva.nl
------------------------------
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 917
*************************************