[17858] in Perl-Users-Digest
Perl-Users Digest, Issue: 18 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 8 14:06:16 2001
Date: Mon, 8 Jan 2001 11:05:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <978980712-v10-i18@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 8 Jan 2001 Volume: 10 Number: 18
Today's topics:
Re: [Q] matching many regular expressions [..] <ren.maddox@tivoli.com>
Re: CGI Form read? <wavetable@birdmail.com>
CSV to Excel WK3? (Reto Hersiczky)
Re: File Locking - Need Help <paul_wasilkoff@ucg.org>
Re: HTML stripper (Tad McClellan)
Internal rounding to whole numbers <jhall@ifxonline.com>
Re: Internal rounding to whole numbers (Garry Williams)
Re: Looking for program html form to cgi (Hosehead)
Re: map and chr <aqumsieh@hyperchip.com>
Re: map and chr (Abigail)
Re: Matching special characters in a regular expression (Rafael Garcia-Suarez)
Need help matching multiple if's.. <hinson@home.com>
Re: Net::Telnet and --More-- <thompson_nospam@athenet.net>
Re: Nice list of locally installed modules <dbohl@sgi.com>
Perl Command to Get Web Server Pages root on Apache (MartelLM)
Re: Perl Command to Get Web Server Pages root on Apache (Abigail)
Re: Perl Command to Get Web Server Pages root on Apache (Reto Hersiczky)
Re: Perl with MS Access (Malcolm Dew-Jones)
Re: Problem connecting to POP3 server (Garry Williams)
Re: Random Array (Mark Jason Dominus)
Re: Random Array <joe+usenet@sunstarsys.com>
Re: Random Array <joe+usenet@sunstarsys.com>
Re: Stopping users from exploiting Perl 'interpreter' o (Abigail)
Re: What do you call the => operator? <mdemello@kennel.ruf.rice.edu>
Re: What do you call the => operator? (Anno Siegel)
Re: xs trouble on Win32 (building Win32::API) <bjoern@hoehrmann.de>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 08 Jan 2001 09:54:46 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: [Q] matching many regular expressions [..]
Message-Id: <m3zoh22g55.fsf@dhcp11-177.support.tivoli.com>
Ren Maddox <ren.maddox@tivoli.com> writes:
>
> /\b # word boundary
> (\d{2}) # two-digits
> (?(?{ $1 <= 40 }) (?=) | (?!) ) # check value
> , # comma
> (\d{2}) # two-dits
> \b # word boundary
> (?(?{ $2 > 40 && $2 <= 50 }) (?=) | (?!) ) # check value
> /x;
>
And those "(?=)" conditions aren't even needed. Turns out you can
have an empty yes-pattern by placing the "|" immediately after the
condition.
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Mon, 8 Jan 2001 18:52:31 +0200
From: "Wavetable" <wavetable@birdmail.com>
Subject: Re: CGI Form read?
Message-Id: <93cr31$5o6$1@news.kolumbus.fi>
Thanks
"Jay Flaherty" <fty@mediapulse.com> wrote in message
news:Dxk66.208593$DG3.5010445@news2.giganews.com...
> "Wavetable" <wavetable@birdmail.com> wrote in message
> news:93cea5$lol$1@news.kolumbus.fi...
> > If someone could just post an example of a script used with a form doing
> > nothing but printing out the contents of one text field I would be very
> > grateful =)
>
> http://stein.cshl.org/WWW/software/CGI/cgi_docs.html
>
------------------------------
Date: 8 Jan 2001 16:45:10 GMT
From: fight_against_spam_cut_here_retoh@dplanet.ch (Reto Hersiczky)
Subject: CSV to Excel WK3?
Message-Id: <Xns9023B8A5Dfightagainstspamcuth@195.141.200.222>
Has anyboy an instant solution to convert
a csv file to Excel's *.wk3 format?
CPAN didn't help
Any suggestions welcome.
------------------------------------------------------------------------
Reto Hersiczky cut_here_reto.hersiczky@netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 79 39 fax +41 1 247 70 75
------------------------------
Date: Mon, 8 Jan 2001 11:14:41 -0500
From: "Paul Wasilkoff" <paul_wasilkoff@ucg.org>
Subject: Re: File Locking - Need Help
Message-Id: <t5jpus3a2v1ufa@corp.supernews.com>
Garry, Richard, thanks for your help!
Have a digital been on me!
PAW
------------------------------
Date: Mon, 8 Jan 2001 07:45:18 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: HTML stripper
Message-Id: <slrn95jdiu.1q5.tadmc@tadmc26.august.net>
Olav <nomail@please.not> wrote:
><simonharris44@my-deja.com> wrote in message
>news:93c7mi$a2d$1@nnrp1.deja.com...
>> Could somebody point me in the direction of a regexp or script to strip
>> HTML tags from form submissions (you guessed it - its for a message
>> board)
>>
>
>$string =~ s/<[^>]*>//g;
See the really poor kind of advice you can get by ignoring the FAQs?
The FAQ is peer-reviewed by lots and lots of people. Never know
what kind of qualifications a random answerer on Usenet might or
might not have...
The FAQ gives about a half dozen examples of legal HTML where
the code above will fail.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 08 Jan 2001 18:00:25 GMT
From: "John Hall" <jhall@ifxonline.com>
Subject: Internal rounding to whole numbers
Message-Id: <Zen66.152892$I5.3806225@news1.rdc1.sdca.home.com>
Is it acceptable to allow perl to round the value for me; or is this a bad
thing?
For example:
$indexnum = ($#histList / 3);
Then I use $indexnum to grab a specific item in the array @histList. It
works ok - even though i'm doing nothing to round out the number.
Thanks in advance for any input.
------------------------------
Date: Mon, 08 Jan 2001 18:23:07 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: Internal rounding to whole numbers
Message-Id: <fAn66.3883$UQ5.19331@eagle.america.net>
On Mon, 08 Jan 2001 18:00:25 GMT, John Hall <jhall@ifxonline.com> wrote:
>Is it acceptable to allow perl to round the value for me; or is this a bad
>thing?
>
>For example:
>
>$indexnum = ($#histList / 3);
>
>Then I use $indexnum to grab a specific item in the array @histList. It
>works ok - even though i'm doing nothing to round out the number.
No rounding takes place here. The use of an array element imposes an
integer context on the thing inside the [...]. So your value is
_truncated_ to an integer -- not rounded.
--
Garry Williams
------------------------------
Date: Mon, 08 Jan 2001 17:31:54 GMT
From: rich@mrinter.net (Hosehead)
Subject: Re: Looking for program html form to cgi
Message-Id: <3a59f416.604644@news.artnet.net>
Sorry, It is my understanding that Perl is CGI and since I am
looking for a program that will process a HTML form and
create a CGI script that this would be a place to get an
answer. Since the CGI script will be run on a Linux server
but I need to create the script from a Windows machine
that this group may be able to help.
Where do you suggest that I should have gone?
On 07 Jan 2001 15:46:18 +0000, nobull@mail.com wrote:
>rich@mrinter.net (Hosehead) writes:
>
>> Newsgroups: comp.lang.perl.misc
>> Looking for a windows program...
>
>You have stumbled into the wrong newgroup. This is
>comp.lang.perl.misc, here we discuss issues relating to the computer
>programming language Perl that don't fit elsewhere in the
>comp.lang.perl hierachy.
------------------------------
Date: Mon, 08 Jan 2001 16:09:43 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: map and chr
Message-Id: <7almsmrpo9.fsf@merlin.hyperchip.com>
AvA <a.v.a@home.nl> writes:
> im trying to get a random character in the 0-9a-Z range.
> there is way i have that working (with a subroutine) but i wanted to
> shorten the code.
>
> i create an array that holds the characters, but when i try rand() on
> that array in gives me just odd numbers.
> i didnt use strict in this code (for those who dont like that).
>
> #!/usr/bin/perl
>
> @array = (48..57, 97..122);
>
> @chars = map {chr($_)} @array;
@chars = (0 .. 9, 'a' .. 'z');
> print @chars . "\n"; #to see if they are in there (yes)
> print rand(@chars) . "/n"; #that doesnt do as i intended i.e.
> 0-9a-Z range
print $chars[rand @chars];
> -------------------
>
> what am i missing?
You're missing the wonderful gems in perldoc.
perldoc -q random
will give you the following (among others):
How do I select a random element from an array?
--Ala
------------------------------
Date: 8 Jan 2001 16:46:34 GMT
From: abigail@foad.org (Abigail)
Subject: Re: map and chr
Message-Id: <slrn95jrna.jg1.abigail@tsathoggua.rlyeh.net>
AvA (a.v.a@home.nl) wrote on MMDCLXXXVII September MCMXCIII in
<URL:news:3A59CE04.FD51F8EA@home.nl>:
:: im trying to get a random character in the 0-9a-Z range.
:: there is way i have that working (with a subroutine) but i wanted to
:: shorten the code.
::
:: i create an array that holds the characters, but when i try rand() on
:: that array in gives me just odd numbers.
And why does that surprise you? Where on earth did you get the idea from
to apply rand on an array? Did you look what the manual has to say about
rand?
:: i didnt use strict in this code (for those who dont like that).
::
:: #!/usr/bin/perl
::
:: @array = (48..57, 97..122);
::
:: @chars = map {chr($_)} @array;
::
:: print @chars . "\n"; #to see if they are in there (yes)
:: print rand(@chars) . "/n"; #that doesnt do as i intended i.e.
:: 0-9a-Z range
::
:: -------------------
::
:: what am i missing?
A clue.
First, RTFM to find out how rand works. Then, go to deja.com and find
the gazillion of postings in this group about this very subject.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
------------------------------
Date: Mon, 08 Jan 2001 16:24:54 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Matching special characters in a regular expression
Message-Id: <slrn95jqev.597.rgarciasuarez@rafael.kazibao.net>
Simen Sandelien wrote in comp.lang.perl.misc:
> I want to write a regular expression that performs a validity check on my
> input string $message
>
> It's a requirement that $message must be made up of the letters assigned to
> the $legalChar variable below....
>
> my $legalChar = 'abcdefghijklmnopqrstuvwxyzæøå';
> #ordinary letters
> $legalChar .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ'; #capital letters
> $legalChar .= '0123456789';
> #digits
> $legalChar .= '-/,<=>&#%"!:;@£¥¤§¿';
> #Special characters
> $legalChar .= 'ßäÉÄöÖñÑ éèùìòÇ_üÜà';
> #Special characters
> $legalChar .= '\'\+\*\(\)\$\?\.';
This line is equivalent to
$legalChar .= '\'+*()$?.';
or (more readable)
$legalChar .= q/'+*()$?./;
because the only character that needs to be escaped in single-quoted
strings is '.
> if (!($message =~ m/^[$legalChar]$/ )) {
> # Take measures to get input corrected
> }
You probably meant
if (!($message =~ m/^[$legalChar]*$/ )) { ... }
(note the '*' after the closing brace).
The problem is that the regexp special chars are not quoted.
Fortunately, a perl construct allows to quote pattern metacharacters :
\Q...\E (described in the perlre manpage).
So the correct solution ïs :
if (!($message =~ m/^[\Q$legalChar\E]*$/ )) { ... }
but a more elegant solution is the equivalent test :
if ($message =~ m/[^\Q$legalChar\E]/ ) { ... }
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Mon, 08 Jan 2001 18:26:12 GMT
From: Roger Hinson <hinson@home.com>
Subject: Need help matching multiple if's..
Message-Id: <3A5A0404.1022CCB2@home.com>
Hi all,
I'm trying to take a line I've split into @splitarray and then
recombine it, but after some words I want a comma and space, and after
other words I want only a space. For instance in the below example, I
don't want a comma after the 4th word. This works properly, but if I
say the 4th and 8th with a line showing
if ( ($y != 3) || ($y != 7) ) {
then it doesn't ever drop down to the else. Could someone explain what
am I doing wrong, or what I should do to make it right?
for($y = 0; $y < @splitarray; $y++) {
if ( ($y != 3) ) {
print OUTFILE "$splitarray[$y], ";
}
else {
print OUTFILE "$splitarray[$y] ";
}
}
Roger
------------------------------
Date: Mon, 08 Jan 2001 17:13:38 GMT
From: Paul Thompson <thompson_nospam@athenet.net>
Subject: Re: Net::Telnet and --More--
Message-Id: <6zm66.22034$Ip3.728952@typhoon.mn.mediaone.net>
I use the Cisco "term len 0" command to get rid of the more for that session.
Paul
Neil <neil@alaweb.com> wrote:
: Hi Folks,
: I am having a problem using Net::Telnet when accesing a Cisco router....
: When I run this code... which is a sub in a larger program ... so please
: note that all the variables are defined earlier....
------------------------------
Date: Mon, 08 Jan 2001 10:11:31 -0600
From: Dale Bohl <dbohl@sgi.com>
Subject: Re: Nice list of locally installed modules
Message-Id: <3A59E6B3.2C98524F@sgi.com>
Julien Quint wrote:
>
> "Mark Hamlin" <mark.c.hamlin@bt.com> writes:
>
> > What is the best way to get Perl to report a list of installed modules. My
> > current method is to use the Unix Find command to report the contents of
> > site_perl, which is usefull, but I am really after something that will be
> > more usefull in specification documentation.
>
> perldoc perlmodlib gives the list of modules that are part of the Perl module
> library and perldoc perllocal gives the list of modules that were installed
> from the CPAN (through 'make install').
>
> --
> Julien
Mark,
Try this.
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use File::Find;
print header,
start_html,
h1("Perl Environment: $ENV{SERVER_NAME}"),
p("Perl Version: $]"),
p("CGI.pm Version: $CGI::VERSION"),
p("Library Path (\@INC):"),
ul(li([@INC])),
p('Modules:');
foreach my $dir (@INC) {
my @mods;
find(sub { push @mods, $File::Find::name if /\.pm$/ }, $dir);
print ul(li("$dir"), ul(li([sort @mods])));
}
--
Thanks,
Dale
Dale Bohl
SGI Information Services
dbohl@sgi.com
(715)-726-8406
http://wwwcf.americas.sgi.com/~dbohl/
JAPH
------------------------------
Date: 08 Jan 2001 16:49:23 GMT
From: martellm@aol.com (MartelLM)
Subject: Perl Command to Get Web Server Pages root on Apache
Message-Id: <20010108114923.04511.00000882@ng-mi1.aol.com>
Hi Folks,
I'm running some Perl scripts on Apache and would like to get the fully
qualified servers path to the web server pages folder? Any ideas?
Thanks.
------------------------------
Date: 8 Jan 2001 16:58:35 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Perl Command to Get Web Server Pages root on Apache
Message-Id: <slrn95jsdr.jg1.abigail@tsathoggua.rlyeh.net>
MartelLM (martellm@aol.com) wrote on MMDCLXXXVII September MCMXCIII in
<URL:news:20010108114923.04511.00000882@ng-mi1.aol.com>:
:: Hi Folks,
:: I'm running some Perl scripts on Apache and would like to get the fully
:: qualified servers path to the web server pages folder? Any ideas?
That's mostly a CGI problem. The Perl part of this in answered in
'man perlvar'.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
------------------------------
Date: 8 Jan 2001 17:00:59 GMT
From: fight_against_spam_cut_here_retoh@dplanet.ch (Reto Hersiczky)
Subject: Re: Perl Command to Get Web Server Pages root on Apache
Message-Id: <Xns9023BDF9Afightagainstspamcuth@195.141.200.222>
$docRoot = $ENV{DOCUMENT_ROOT}; # e.g. /usr/local/etc/httpd/htdocs
martellm@aol.com (MartelLM) wrote in <20010108114923.04511.00000882@ng-
mi1.aol.com>:
>Hi Folks,
>I'm running some Perl scripts on Apache and would like to get the fully
>qualified servers path to the web server pages folder? Any ideas?
------------------------------
Date: 8 Jan 2001 09:57:41 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Perl with MS Access
Message-Id: <3a59ff95@news.victoria.tc.ca>
: In article <38C462C3.AA65602E@npv.com>,
: Ruben Fagundo <ruben@npv.com> writes:
: > I would like to write an application on a Linux box in Perl that would
: > open a Microsoft Access Database (.mdb) and reads certain information
: > from it, much like one opens and reads any file.
: >
If you're only reading the data, why not ask access to save the database
in another format, like a flat file or a dbase database ( dbase= Xbase in
DBD). A visual basic routine on the access could automate the process -
simply press a button and save a copy for the linux.
------------------------------
Date: Mon, 08 Jan 2001 18:35:57 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: Problem connecting to POP3 server
Message-Id: <hMn66.3921$UQ5.19331@eagle.america.net>
On Mon, 08 Jan 2001 10:56:17 -0500, Don <don@lclcan.com> wrote:
>Garry Williams wrote:
>> On Mon, 08 Jan 2001 10:34:26 -0500, Don <don@lclcan.com> wrote:
>> >When I tried the --> telnet localhost 110
>> >
>> >I get --> +OK POP3 localhost v7.64 server ready
>> >
>> >This tells me that my POP3 server is called --> localhost and is
>> >running.
>> >
>> >In my perl script, I tried:
>> >
>> >========================================
>> >use Net::POP3;
>> >
>> >my $webfile = Net::POP3->new('localhost', Port => 110, Timeout => 60)
>> > or die "cannot open mail server";
>> >
>> >exit;
>> >========================================
>> >
>> >I get the message that it could not connect to the server.
>> >
>> >Why???
>>
>> How would you expect anyone here to know when you don't copy/paste the
>> error message or the code. That stuff you typed doesn't compile.
>
>I don't know what you're asking me but the entire Perl script is between
>the ==== lines and my error message is that it dores not connect to the
>POP3 server but dies with "cannot open mail server" which is also part of
>my Perl script.
>
>I forgot to include the first line but it does compile:
>
>#!/usr/bin/perl -w
You are correct. It does compile. I used the wrong module when I
tested it. :-(
However, you can help yourself by letting perl help you. Print the $!
variable in your error message so you can see what the error was:
$ perl
#!/usr/local/bin/perl -w
use strict;
use Net::POP3;
my $webfile = Net::POP3->new('localhost', Port => 110, Timeout => 60)
or die "cannot open mail server: $!";
exit;
cannot open mail server: Connection refused at x line 4.
$
--
Garry Williams
------------------------------
Date: Mon, 08 Jan 2001 16:07:39 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Random Array
Message-Id: <3a59e5ca.4761$131@news.op.net>
In article <3A58B46E.2BC369A0@torontonian.com>,
Oktay <oktay@torontonian.com> wrote:
>srand(time ^ $$);
>$IMG_NUM = rand(@dir_list);
>
>###################################
># load the image.
>###################################
>
>print "$VIRTUAL_DIR/$dir_list[$IMG_NUM]\n";
Replace this with:
while (@dir_list) {
my $random_file = splice @dir_list, rand(@dir_list), 1;
print "$VIRTUAL_DIR/$random_file\n";
}
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: 08 Jan 2001 11:28:15 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Random Array
Message-Id: <m3u27aypnk.fsf@mumonkan.sunstarsys.com>
mjd@plover.com (Mark Jason Dominus) writes:
> In article <3A58B46E.2BC369A0@torontonian.com>,
> Oktay <oktay@torontonian.com> wrote:
> >srand(time ^ $$);
> >$IMG_NUM = rand(@dir_list);
> >
> >###################################
> ># load the image.
> >###################################
> >
> >print "$VIRTUAL_DIR/$dir_list[$IMG_NUM]\n";
>
> Replace this with:
>
> while (@dir_list) {
> my $random_file = splice @dir_list, rand(@dir_list), 1;
> print "$VIRTUAL_DIR/$random_file\n";
> }
Alternately, you could try
fisher_yates_shuffle(\@dir_list); # perldoc -q shuffle
print "$VIRTUAL_DIR/$_\n" while @dir_list;
YMMV
--
Joe Schaefer
------------------------------
Date: 08 Jan 2001 11:37:19 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Random Array
Message-Id: <m3puhyyp8g.fsf@mumonkan.sunstarsys.com>
Joe Schaefer <joe+usenet@sunstarsys.com> writes:
> Alternately, you could try
>
> fisher_yates_shuffle(\@dir_list); # perldoc -q shuffle
> print "$VIRTUAL_DIR/$_\n" while @dir_list;
^^^^^
OOPS! That should be a "for", not "while". Sorry about that :(
> YMMV
Indeed!
>
--
Joe Schaefer
------------------------------
Date: 8 Jan 2001 16:55:04 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Stopping users from exploiting Perl 'interpreter' on NT
Message-Id: <slrn95js78.jg1.abigail@tsathoggua.rlyeh.net>
Clyde Ingram (clyde@NOSPAMgetofftheline.freeserve.co.uk) wrote on
MMDCLXXXVII September MCMXCIII in <URL:news:93cda3$ccu$1@newsg1.svr.pol.co.uk>:
__ On my project we use lots of Perl on Solaris servers.
__ We have recently replaced Solaris client workstations with NT PCs for our
__ customer's system users.
__
__ Now some engineers are getting nervous at the threat of 'smart' NT users
__ developing their own rogue Perl programs to tamper with the network, because
__ they can easily access RPC, socket, and other facilities in the Perl on
__ their PCs. (All so easy to run Notepad, and set executable permissions on a
__ home-grown script.)
__
__ Can anyone suggest how to prevent NT users from producing their own working
__ Perl programs?
Some suggestions:
- Remove the '$' and '@' keys from the keyboards.
- Take out their networks cards.
- Put the users behind a firewall.
__ Should we remove Socket.pm and other networking modules, or ultimately the
__ whole of Perl's interpretative capability?
__ And replace Perl sources on the NT platforms with compiled code (from a
__ Perl-to-C generator)?
__
__ Is this indeed the only safe solution?
It's not a solution at all.
__ A lot of folks round here get twitchy at supplying any interpreter on the
__ platform users have. (Imagine their nervousness when users had Solaris on
__ the desktop, equipped with sh, ksh, csh, awk, sed, perl, . . . )
I'd replace them. If they are twitchy, it's only because they aren't able
to apply proper security.
__ Some Philistines would like to see Perl boxed-up, chucked out, and replaced
__ with Java.
The problem here isn't NT, nor is it Perl. And the last time I looked Java
was capable of using sockets. The problem here is not trusting your users.
Either get rid of your users, or properly secure whatever you are afraid of
they can tamper with.
Abigail
--
sub _ {$_ = shift and y/b-yB-Y/a-yB-Y/ xor !@ _?
exit print :
print and push @_ => shift and goto &{(caller (0)) [3]}}
split // => "KsvQtbuf fbsodpmu\ni flsI " xor & _
------------------------------
Date: 8 Jan 2001 16:05:42 GMT
From: Martin Julian DeMello <mdemello@kennel.ruf.rice.edu>
Subject: Re: What do you call the => operator?
Message-Id: <93cogm$7vt$1@joe.rice.edu>
Ben Okopnik <ben-fuzzybear@geocities.com> wrote:
> I was just glancing through Ellie Quigley's "Perl Programming Guide", and
> spied the following horror:
> "Perl 4 used the comma to separate the key and value items; Perl5 uses =>
> (digraph symbol)."
> She proceeds to refer to it as 'the digraph symbol' further on in the
> book. ACK! A perfect example of just reading the documentation (perlop)
> without understanding it...
> Does anyone know the actual name for this thing, though? _Is_ there one?
Seems kinda silly to call it something in print, when one can just use the
=> symbol instead.
Out loud (e.g. when discussing code with someone) I say either 'arrow' (it's
usually unambiguous in context) or 'maps to' (considering a hash as a
mathematical function).
--
Martin DeMello
------------------------------
Date: 8 Jan 2001 16:16:33 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: What do you call the => operator?
Message-Id: <93cp51$psm$2@mamenchi.zrz.TU-Berlin.DE>
Randal L. Schwartz <merlyn@stonehenge.com> wrote in comp.lang.perl.misc:
>>>>>> "Uri" == Uri Guttman <uri@sysarch.com> writes:
>
>Uri> well, more misprone to doing the wrong thing. in some cases if the
>Uri> bareword is a perl operator it could be executed instead of being
>Uri> quoted. there have been other issues with use integer not playing well
>Uri> with -foo as a key and quoted by =>. some of these are fixed in some
>Uri> versions but i can't quote which. so i rarely use the quote side effect
>Uri> of =>.
>
>It blows (up) when you get used to being "cutesy" as in:
>
> rename "fred" => "barney";
>
>and then someone comes along one day and maintains the code as:
>
> use constant SOURCE => "fred";
> ...
> rename SOURCE => "barney";
>
>Ooops... no longer renaming "fred" to "barney"... you're renaming
>"SOURCE" to "barney".
Well, replacing a string literal by a constant without looking how
it is used is a recipe for disaster whether there are fat commas
involved or not. Or do you want to discourage string interpolation
as well?
I just went through the exercise of writing a few hundred lines
of code with every fixed string a constant. No fun at all, but
most of the problems were string interpolation, not autoquote with
=> or {}.
Anno
------------------------------
Date: Mon, 08 Jan 2001 17:45:52 +0100
From: Bjoern Hoehrmann <bjoern@hoehrmann.de>
Subject: Re: xs trouble on Win32 (building Win32::API)
Message-Id: <3a5ae18a.4087056@news.bjoern.hoehrmann.de>
* Randy Kobes wrote in comp.lang.perl.misc:
>> Well, I tried to build it with VC++ 6.0 and got
>>
>> API.xs(155) : error C2065: 'na' : undeclared identifier
>
>Try building it as
> perl Makefile.PL POLLUTE=1
That did the trick, thanks.
--
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981028 ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
<x>I ♥ ♀, ♫ & XML ☺</x>
------------------------------
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 V10 Issue 18
*************************************