[30370] in Perl-Users-Digest
Perl-Users Digest, Issue: 1613 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 5 11:09:42 2008
Date: Thu, 5 Jun 2008 08:09:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 5 Jun 2008 Volume: 11 Number: 1613
Today's topics:
Cross compiling perl for sh4 linux sgardner03@yahoo.com
Re: I try to copy one file to other folder on Linux ser <pero@tupwerwt.ch>
new CPAN modules on Thu Jun 5 2008 (Randal Schwartz)
Prevent kill signals to childs <falcacibar@gmail.com>
regex back matching <muforo@gmail.com>
Re: regex back matching <danrumney@77617270mail.net>
Re: regex back matching <muforo@gmail.com>
Re: regex back matching <tzz@lifelogs.com>
Re: regex back matching <1usa@llenroc.ude.invalid>
Re: regex back matching <muforo@gmail.com>
Re: RHS of s/LHS/RHS/ with $1, $2, etc. without "eval"? (Ben Bullock)
Re: RHS of s/LHS/RHS/ with $1, $2, etc. without "eval"? (Ben Bullock)
Re: RHS of s/LHS/RHS/ with $1, $2, etc. without "eval"? (Ben Bullock)
Re: The Importance of Terminology's Quality (Robert Maas, http://tinyurl.com/uh3t)
Re: The Importance of Terminology's Quality <jon@ffconsultancy.com>
Re: The Importance of Terminology's Quality jon.harrop.ms.sharp@gmail.com
Re: XML::Parser Tree Style <szrRE@szromanMO.comVE>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 5 Jun 2008 04:14:23 -0700 (PDT)
From: sgardner03@yahoo.com
Subject: Cross compiling perl for sh4 linux
Message-Id: <97a94706-1d5e-40f0-ac1d-5dca09dd152a@2g2000hsn.googlegroups.com>
Hi,
I am trying to cross compile perl for sh4 linux. I have downloaded the
source for version 5.10.0, and I am trying to cross-compile in the
Cross directory on a linux host. I have followed the instructions in
the README, but I get failures when i run 'make patch'. At first I
foolishly ignored this, so when I tried 'make perl' I got the error
that the miniperl binary could not be executed. It seems 'make perl'
compiled miniperl using the sh4-linux compiler, and not the native
compiler. I'm assuming this is because some of my patches failed.
Does anyone have the patch files that work with this version of perl?
Alternatively, does anyone know the best way to cross-compile perl for
sh4 linux?
Kind Regards,
------------------------------
Date: Thu, 5 Jun 2008 08:35:49 +0200
From: "Pero" <pero@tupwerwt.ch>
Subject: Re: I try to copy one file to other folder on Linux server, and nothing happened? Please help me.
Message-Id: <g281g6$bu2$1@localhost.localdomain>
User dont have permission.
Thanks.
"Jürgen Exner" <jurgenex@hotmail.com> wrote in message
news:hufe44djuq8prmqcj5kddhap2ejhishqs6@4ax.com...
> "Pero" <pero@tupwerwt.ch> wrote:
>>#!/usr/bin/perl -w
>
> Better
> use warnings;
> Missing
> use strict;
>>#
>>use File::Copy;
>
> Why do you import File::Copy if you are not using it anywhere?
>
>>print "Content-type: text/html\n\n";
>>print "Start.<br>";
>>$original="/home/thomas/ftp/test-001.pdf";
>>$indigo="/srv/www/html/cgi-bin/test-001copy.pdf";
>>system("cp $original $indigo") or die print "FAILED";
>
> You seem to be confused about the return values of system() and print()
> as well as the argument of die(). Please see the man pages for each
> function for information regarding those topics.
>
> Furthermore it would be helpful to include the reason for the failure.
> Although system() doesn't provide a textual failure message as the perl
> I/O-functions do, it still returns the exit status of the called
> program. You just have to decode it as described in the man page.
>
>>print "Finish.<br>";
>>
>>I try to copy one file to other folder on Linux server, and nothing
>>happened?
>
> Usual suspect: does the user, under which the web server is executing
> CGI scripts, have the appropriate permissions?
>
> jue
------------------------------
Date: Thu, 5 Jun 2008 04:42:19 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Jun 5 2008
Message-Id: <K1z3qJ.16vz@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
AnyEvent-4.13
http://search.cpan.org/~mlehmann/AnyEvent-4.13/
provide framework for multiple event loops
----
Array-Unique-0.08
http://search.cpan.org/~szabgab/Array-Unique-0.08/
Tie-able array that allows only unique values
----
CPAN-Reporter-1.15_51
http://search.cpan.org/~dagolden/CPAN-Reporter-1.15_51/
Adds CPAN Testers reporting to CPAN.pm
----
CPAN2RT-0.02
http://search.cpan.org/~ruz/CPAN2RT-0.02/
CPAN to RT converter for rt.cpan.org service
----
Catalyst-Controller-RequestToken-0.01
http://search.cpan.org/~hide/Catalyst-Controller-RequestToken-0.01/
Handling transaction token across forms
----
Catalyst-Engine-Server-0.03
http://search.cpan.org/~mramberg/Catalyst-Engine-Server-0.03/
Catalyst Server Engine *DEPRECATED*
----
Catalyst-Plugin-CustomErrorMessage-0.03_03
http://search.cpan.org/~jkutej/Catalyst-Plugin-CustomErrorMessage-0.03_03/
Catalyst plugin to have more "cute" error message.
----
Catalyst-Plugin-RequestToken-0.06
http://search.cpan.org/~hide/Catalyst-Plugin-RequestToken-0.06/
(DEPRECATED) Handling transaction token for Catalyst
----
Catalyst-Plugin-SmartURI-0.02
http://search.cpan.org/~rkitover/Catalyst-Plugin-SmartURI-0.02/
Configurable URIs for Catalyst
----
Config-INI-MVP-Reader-0.017
http://search.cpan.org/~rjbs/Config-INI-MVP-Reader-0.017/
multi-value capable .ini file reader (for plugins)
----
DBIx-Class-Schema-PopulateMore-0.04
http://search.cpan.org/~jjnapiork/DBIx-Class-Schema-PopulateMore-0.04/
An enhanced populate method
----
DBIx-Migration-Directories-0.06
http://search.cpan.org/~crakrjack/DBIx-Migration-Directories-0.06/
Install/remove/upgrade/downgrade SQL schemas
----
Data-Omap-0.01
http://search.cpan.org/~bbaxter/Data-Omap-0.01/
Perl module to implement ordered mappings
----
Devel-Declare-0.001010
http://search.cpan.org/~mstrout/Devel-Declare-0.001010/
----
Devel-Declare-0.001011
http://search.cpan.org/~mstrout/Devel-Declare-0.001011/
----
Digest-JHash-0.03
http://search.cpan.org/~jfreeman/Digest-JHash-0.03/
Perl extension for 32 bit Jenkins Hashing Algorithm
----
Digest-JHash-0.04
http://search.cpan.org/~jfreeman/Digest-JHash-0.04/
Perl extension for 32 bit Jenkins Hashing Algorithm
----
ExtUtils-Manifest-1.54
http://search.cpan.org/~rkobes/ExtUtils-Manifest-1.54/
utilities to write and check a MANIFEST file
----
Finance-Bank-IE-0.12
http://search.cpan.org/~waider/Finance-Bank-IE-0.12/
----
Font-AFM-1.20
http://search.cpan.org/~gaas/Font-AFM-1.20/
Interface to Adobe Font Metrics files
----
Google-SAML-Request-0.01
http://search.cpan.org/~manni/Google-SAML-Request-0.01/
Create or parse Google's SAML requests
----
Google-SAML-Response-0.01
http://search.cpan.org/~manni/Google-SAML-Response-0.01/
Generate signed XML documents as SAML responses for Google's SSO implementation
----
HTML-DateSelector-0.02
http://search.cpan.org/~tokuhirom/HTML-DateSelector-0.02/
Generate HTML for date selector.
----
HTML-TurboForm-0.12
http://search.cpan.org/~camelcase/HTML-TurboForm-0.12/
----
HTML-WebDAO-0.88
http://search.cpan.org/~zag/HTML-WebDAO-0.88/
Perl extension for create complex web application
----
Hash-Transform-0.01
http://search.cpan.org/~dtrischuk/Hash-Transform-0.01/
a simple data-driven class for doing data transformation.
----
JSON-2.10
http://search.cpan.org/~makamaka/JSON-2.10/
JSON (JavaScript Object Notation) encoder/decoder
----
Language-Lisp-ECLs-0.25
http://search.cpan.org/~vkon/Language-Lisp-ECLs-0.25/
Perl extension for ECL lisp
----
Lingua-StarDict-Gen-0.03
http://search.cpan.org/~jjoao/Lingua-StarDict-Gen-0.03/
----
Linux-Smaps-0.06
http://search.cpan.org/~opi/Linux-Smaps-0.06/
a Perl interface to /proc/PID/smaps
----
Log-Handler-0.44
http://search.cpan.org/~bloonix/Log-Handler-0.44/
Log messages to several outputs.
----
Muldis-D-0.32.0
http://search.cpan.org/~duncand/Muldis-D-0.32.0/
Formal spec of Muldis D relational DBMS lang
----
NCGI-0.09
http://search.cpan.org/~mlawren/NCGI-0.09/
A Common Gateway Interface (CGI) Class
----
Net-ManageSieve-0.03
http://search.cpan.org/~ska/Net-ManageSieve-0.03/
ManageSieve Protocol Client
----
Net-OAuth-0.1
http://search.cpan.org/~kgrennan/Net-OAuth-0.1/
OAuth protocol support
----
Net-OAuth-0.11
http://search.cpan.org/~kgrennan/Net-OAuth-0.11/
OAuth protocol support
----
Net-YAR-1.070
http://search.cpan.org/~rhandom/Net-YAR-1.070/
Perl interface to the YAR (Yet Another Registrar) API
----
PLP-3.22_02
http://search.cpan.org/~shiar/PLP-3.22_02/
Perl in HTML pages
----
Pod-Simple-3.07
http://search.cpan.org/~arandal/Pod-Simple-3.07/
framework for parsing Pod
----
Proc-Exists-0.13
http://search.cpan.org/~brianski/Proc-Exists-0.13/
quickly check for process existence
----
Shell-EnvImporter-1.06
http://search.cpan.org/~dfaraldo/Shell-EnvImporter-1.06/
Perl extension for importing environment variable changes from external commands or shell scripts
----
String-CaseProfile-0.06
http://search.cpan.org/~enell/String-CaseProfile-0.06/
Get/Set the letter case profile of a string
----
Text-CSV_XS-0.46
http://search.cpan.org/~hmbrand/Text-CSV_XS-0.46/
comma-separated values manipulation routines
----
Text-CSV_XS-0.50
http://search.cpan.org/~hmbrand/Text-CSV_XS-0.50/
comma-separated values manipulation routines
----
Thread-Semaphore-2.08
http://search.cpan.org/~jdhedden/Thread-Semaphore-2.08/
Thread-safe semaphores
----
URI-SmartURI-0.02
http://search.cpan.org/~rkitover/URI-SmartURI-0.02/
URIs with extra sugar
----
WWW-Mixi-Scraper-0.14
http://search.cpan.org/~ishigaki/WWW-Mixi-Scraper-0.14/
yet another mixi scraper
----
XML-API-0.22
http://search.cpan.org/~mlawren/XML-API-0.22/
Perl extension for writing XML
----
XML-TinyXML-0.01
http://search.cpan.org/~xant/XML-TinyXML-0.01/
Little and efficient Perl module to manage xml data.
----
boolean-0.12
http://search.cpan.org/~ingy/boolean-0.12/
Boolean support for Perl
----
eGuideDog-Dict-Mandarin-0.4
http://search.cpan.org/~hgneng/eGuideDog-Dict-Mandarin-0.4/
an informal Pinyin dictionary.
----
mobirc-0.99_04
http://search.cpan.org/~tokuhirom/mobirc-0.99_04/
modern IRC to HTTP gateway
----
mylib-1.02
http://search.cpan.org/~gaas/mylib-1.02/
add private lib to the module search path
----
stockmonkey-1.4
http://search.cpan.org/~jettero/stockmonkey-1.4/
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Wed, 4 Jun 2008 22:04:14 -0700 (PDT)
From: Felipe Alcacibar B <falcacibar@gmail.com>
Subject: Prevent kill signals to childs
Message-Id: <c370f4b2-2d0c-44b9-89a3-5a04a7ddcd68@d45g2000hsc.googlegroups.com>
Hi, i have the this problem, i have process opened with open3, and i
use waitpid in threads to determine if ends, but when i send a SIGINT
(Control-C) the signal propagates to the childs, i need control this
signal and prevent the propagation of the signal to childs, how i can
do that???
Cheers:
Felipe
------------------------------
Date: Thu, 5 Jun 2008 05:53:13 -0700 (PDT)
From: Ray Muforosky <muforo@gmail.com>
Subject: regex back matching
Message-Id: <885a3d4e-481d-4ae9-8590-c0bb5a1fcb99@b1g2000hsg.googlegroups.com>
Hello
I need to match on lines where the 4 quadrant of the ip is even with
one line regex.
For example, if I have
192.68.45.78 daskjaskjf asdfjkasjf asfkasfklh
192.68.34.62 ADKDAK Dkkslaslk jjsdkdldj
192.68.23 INEED HELP PLEASE
192.68.67.34 dkasdfkl kasfkasfkakf
192.68.4.97 flaskfk asfkfafv asf
I should only get:
123.68.45.78 daskjaskjf asdfjkasjf asfkasfklh
192.68.34.62 ADKDAK Dkkslaslk jjsdkdldj
192.68.67.34 dkasdfkl kasfkasfkakf
help and thanks in advance
Ramey
------------------------------
Date: Thu, 05 Jun 2008 09:14:20 -0400
From: Dan Rumney <danrumney@77617270mail.net>
Subject: Re: regex back matching
Message-Id: <4847e6af$0$12907$4c368faf@roadrunner.com>
Ray Muforosky wrote:
> Hello
>
> I need to match on lines where the 4 quadrant of the ip is even with
> one line regex.
[snip]
What do you have so far? There are plenty of pages outlinging regexps
for matching IP addresses... that should prove a good start for you
------------------------------
Date: Thu, 5 Jun 2008 07:03:49 -0700 (PDT)
From: Ray Muforosky <muforo@gmail.com>
Subject: Re: regex back matching
Message-Id: <8566add6-1bfc-4231-8242-ba9790cf376f@r66g2000hsg.googlegroups.com>
On Jun 5, 8:14=A0am, Dan Rumney <danrum...@77617270mail.net> wrote:
> Ray Muforosky wrote:
> > Hello
>
> > I need to match on lines where the 4 quadrant of the ip is even with
> > one line regex.
>
> =A0 [snip]
>
> What do you have so far? There are plenty of pages outlinging regexps
> for matching IP addresses... that should prove a good start for you
egrep '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.([stock here])\s*'
filename
------------------------------
Date: Thu, 05 Jun 2008 09:11:54 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: regex back matching
Message-Id: <86od6g0y51.fsf@lifelogs.com>
On Thu, 5 Jun 2008 05:53:13 -0700 (PDT) Ray Muforosky <muforo@gmail.com> wrote:
RM> I need to match on lines where the 4 quadrant of the ip is even with
RM> one line regex.
RM> For example, if I have
RM> 192.68.45.78 daskjaskjf asdfjkasjf asfkasfklh
RM> 192.68.34.62 ADKDAK Dkkslaslk jjsdkdldj
RM> 192.68.23 INEED HELP PLEASE
RM> 192.68.67.34 dkasdfkl kasfkasfkakf
RM> 192.68.4.97 flaskfk asfkfafv asf
RM> I should only get:
RM> 123.68.45.78 daskjaskjf asdfjkasjf asfkasfklh
RM> 192.68.34.62 ADKDAK Dkkslaslk jjsdkdldj
RM> 192.68.67.34 dkasdfkl kasfkasfkakf
Even digits are [02468] in the decimal system. A number is even if it
ends with an even digit. So, assuming no malformed lines:
#!/usr/bin/perl
use warnings;
use strict;
while (<DATA>)
{
print if m/^[\d\.]+[02468]\s/;
}
__DATA__
192.68.45.78 daskjaskjf asdfjkasjf asfkasfklh
192.68.34.62 ADKDAK Dkkslaslk jjsdkdldj
192.68.23 INEED HELP PLEASE
192.68.67.34 dkasdfkl kasfkasfkakf
192.68.4.97 flaskfk asfkfafv asf
If you want, use Regexp::Common to grab the IP address before you check
its last digit. This script will accept 1.2.3.4.5.6.7.8 and .2 as
valid, for example.
Ted
------------------------------
Date: Thu, 05 Jun 2008 14:08:44 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: regex back matching
Message-Id: <Xns9AB467348BD9Fasu1cornelledu@127.0.0.1>
Ray Muforosky <muforo@gmail.com> wrote in news:8566add6-1bfc-4231-8242-
ba9790cf376f@r66g2000hsg.googlegroups.com:
> On Jun 5, 8:14 am, Dan Rumney <danrum...@77617270mail.net> wrote:
>> Ray Muforosky wrote:
>> > Hello
>>
>> > I need to match on lines where the 4 quadrant of the ip is even with
>> > one line regex.
>>
>> [snip]
>>
>> What do you have so far? There are plenty of pages outlinging regexps
>> for matching IP addresses... that should prove a good start for you
>
> egrep '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.([stock here])\s*'
> filename
What is egrep?
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Thu, 5 Jun 2008 07:21:08 -0700 (PDT)
From: Ray Muforosky <muforo@gmail.com>
Subject: Re: regex back matching
Message-Id: <cdeb5f7e-94c2-4198-a296-a64018e94e62@k30g2000hse.googlegroups.com>
On Jun 5, 9:11=A0am, Ted Zlatanov <t...@lifelogs.com> wrote:
> On Thu, 5 Jun 2008 05:53:13 -0700 (PDT) Ray Muforosky <muf...@gmail.com> w=
rote:
>
> RM> I need to match on lines where the 4 quadrant of the ip is even with
> RM> one line regex.
>
> RM> For example, if I have
>
> RM> 192.68.45.78 =A0 =A0 =A0 =A0daskjaskjf =A0 =A0 asdfjkasjf asfkasfklh
> RM> 192.68.34.62 =A0 =A0 =A0ADKDAK =A0 =A0 =A0Dkkslaslk =A0jjsdkdldj
> RM> 192.68.23 =A0 =A0 =A0 =A0 =A0 INEED =A0 =A0 =A0 =A0 =A0 =A0 HELP PLEAS=
E
> RM> 192.68.67.34 =A0 =A0 =A0dkasdfkl =A0 =A0 =A0 kasfkasfkakf
> RM> 192.68.4.97 =A0 =A0 =A0 =A0flaskfk asfkfafv =A0 =A0asf
>
> RM> I should only get:
> RM> 123.68.45.78 =A0 =A0 =A0 =A0daskjaskjf =A0 =A0 asdfjkasjf asfkasfklh
> RM> 192.68.34.62 =A0 =A0 =A0ADKDAK =A0 =A0 =A0Dkkslaslk =A0jjsdkdldj
> RM> 192.68.67.34 =A0 =A0 =A0dkasdfkl =A0 =A0 =A0 kasfkasfkakf
>
> Even digits are [02468] in the decimal system. =A0A number is even if it
> ends with an even digit. =A0So, assuming no malformed lines:
>
> #!/usr/bin/perl
>
> use warnings;
> use strict;
>
> while (<DATA>)
> {
> =A0print if m/^[\d\.]+[02468]\s/;
>
> }
>
> __DATA__
> 192.68.45.78 =A0 =A0 =A0 =A0daskjaskjf =A0 =A0 asdfjkasjf asfkasfklh
> 192.68.34.62 =A0 =A0 =A0ADKDAK =A0 =A0 =A0Dkkslaslk =A0jjsdkdldj
> 192.68.23 =A0 =A0 =A0 =A0 =A0 INEED =A0 =A0 =A0 =A0 =A0 =A0 HELP PLEASE
> 192.68.67.34 =A0 =A0 =A0dkasdfkl =A0 =A0 =A0 kasfkasfkakf
> 192.68.4.97 =A0 =A0 =A0 =A0flaskfk asfkfafv =A0 =A0asf
>
> If you want, use Regexp::Common to grab the IP address before you check
> its last digit. =A0This script will accept 1.2.3.4.5.6.7.8 and .2 as
> valid, for example.
>
> Ted
If I have the data below, the script will not totally work. I want to
get those lines where the last quadrant is even.
192.68.45.718 daskjaskjf asdfjkasjf asfkasfklh
192.68.34.6 ADKDAK Dkkslaslk jjsdkdldj
192.68.23 INEED HELP PLEASE
192.68.67.34 dkasdfkl kasfkasfkakf
192.68.4.97 flaskfk asfkfafv asf
Thanks.
------------------------------
Date: Thu, 5 Jun 2008 04:21:24 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: RHS of s/LHS/RHS/ with $1, $2, etc. without "eval"?
Message-Id: <g27pk4$9d3$1@ml.accsnet.ne.jp>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> $text2 =~ s/$left/ convert($1, $right) /eg;
>
> sub convert {
> my ($capt, $right) = @_;
> $right =~ s/\$1/$capt/;
> $right;
> }
Thanks very much for the idea. The idea of substituting dollar
variables is something I'd tried previously before I thought of using
"eval", so actually I already thought of a method to solve my own
problem before I posted. Here is my pre-eval script:
while ($text =~ /$left/g) {
my $orig = $&;
my @args = (undef, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10);
my $rhs = $with;
print "RHS is $rhs\n";
for (1..10) {
my $dollar = $args[$_];
last if ! $dollar;
print "Replacing $_: $dollar\n";
$rhs =~ s/\$$_/$dollar/;
}
if ($orig ne $rhs) {
while ($text =~ s/$orig/$rhs/g) {
# Do something
}
}
But there are sure to be loopholes in this. The "eval" way seems much
better than this way.
------------------------------
Date: Thu, 5 Jun 2008 04:30:02 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: RHS of s/LHS/RHS/ with $1, $2, etc. without "eval"?
Message-Id: <g27q4a$9d3$2@ml.accsnet.ne.jp>
Michael Carman <mjcarman@mchsi.com> wrote:
>> Is there any way to get the substitution as in $text2 without using
>> eval?
>
> If you change $right to '"X$1Y"' (which you could do automatically
> inside the script) you can then do
>
> $text =~ s/$left/$right/eeg;
Thanks very much for that idea.
> Also, it should be apparent that executing user-provided code is a
> potential security hole. Depending on where (and by whom) this will run
> you should consider using taint mode and validating that $right is safe
> before using it.
This problem came up in the context of a small project to make an
interactive Perl-like s/ / / function which works on Microsoft Word
documents. I've found the "wildcard" feature of Microsoft Word's "Find
and Replace" extremely difficult to master, which is why I want to
make a more Perl-like substitute. If possible, when it is finished, I
would like to release it to the public as free software. I don't think
there are any security risks associated with user input in this case
since the user would be running the Perl script on the same machine
that Word is running on.
------------------------------
Date: Thu, 5 Jun 2008 04:31:24 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: RHS of s/LHS/RHS/ with $1, $2, etc. without "eval"?
Message-Id: <g27q6s$9d3$3@ml.accsnet.ne.jp>
Tad J McClellan <tadmc@seesig.invalid> wrote:
> $text2 =~ s/$left/$right/gee;
Thanks very much for this idea.
>> Is there any way to get the substitution as in $text2 without using
>> eval?
>
> No.
I had suspected as much. Thank you for confirming it.
------------------------------
Date: Wed, 04 Jun 2008 22:39:22 -0700
From: m6d04a5.3.calrobert@spamgourmet.com (Robert Maas, http://tinyurl.com/uh3t)
Subject: Re: The Importance of Terminology's Quality
Message-Id: <rem-2008jun04-005@yahoo.com>
> From: dkco...@panix.com (David Combs)
> Lisp is *so* early a language (1960?), preceeded mainly only by
> Fortran (1957?)?, and for sure the far-and-away the first as a
> platform for *so many* concepts of computer-science, eg lexical vs
> dynamic ("special") variables, passing *unnamed* functions as
> args ... maybe is still the only one in which program and data
> have the same representation -- that it'd seem logical to use it's
> terminology in all languages.
Yeah, but why did you cross-post to so many newsgroups? Are you
trying to run a flame war between advocates of the various
languages? (Same accusation to the OP moreso!)
> From C is the very nice distinction between "formal" and "actual" args.
I think Lisp already had that nearly 50 years ago. Function
definition (lambda expression) has formal args, EVAL recursively
calls EVAL on sub-forms to create actual args and calls APPLY on
them and whatever function is named in the CAR position of the form.
Whether anybody bothered to use that specific jargon, or it was
just so obvious it didn't need jargon, I don't know.
> And from algol-60, own and local -- own sure beats "static"!
Yeah. But now that you mention it and I think about it, what's
really meant is "private persistent". Global variables are public
persistent. Local variables and formal args to functions are
private transient (they go away as soon as the function returns).
but OWN variables are private to the function but stay around
"forever" just like globals do, so that side effects on the OWN
variables that occurred during one call can persist to affect the
next call. Lexical closures in Common Lisp go one step further,
allowing private persistent variables to be shared between several
functions. All those functions share access to the private variable
which they co-OWN. Another way in which OWN or lexical-closure
variables aren't like what the word "own" means in ordinary
language is that it's possible to transfer ownership by selling or
giving something to somebody else, but not with OWN variables or
lexical-closure variables. So even though I like the word OWN
better than the word STATIC for this meaning, I'm not totally
comfortable with that jargon. But "persistent private" is a
mouthful compared to "OWN", and I doubt anyone can find a word of
appx. 3 characters that conveys the intended meaning so we're
probably stuck with "OWN" as the best short term.
------------------------------
Date: Thu, 05 Jun 2008 11:37:48 +0100
From: Jon Harrop <jon@ffconsultancy.com>
Subject: Re: The Importance of Terminology's Quality
Message-Id: <L7qdnb6VG6dsX9rVnZ2dnUVZ8tfinZ2d@posted.plusnet>
Robert Maas, http://tinyurl.com/uh3t wrote:
>> From: dkco...@panix.com (David Combs)
>> Lisp is *so* early a language (1960?), preceeded mainly only by
>> Fortran (1957?)?, and for sure the far-and-away the first as a
>> platform for *so many* concepts of computer-science, eg lexical vs
>> dynamic ("special") variables, passing *unnamed* functions as
>> args ... maybe is still the only one in which program and data
>> have the same representation -- that it'd seem logical to use it's
>> terminology in all languages.
>
> Yeah, but why did you cross-post to so many newsgroups? Are you
> trying to run a flame war between advocates of the various
> languages?
What would be the point? We all know that Java, Perl, Python and Lisp suck.
They don't even have pattern matching over algebraic sum types if you can
imagine that. How rudimentary...
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
------------------------------
Date: Thu, 5 Jun 2008 06:17:01 -0700 (PDT)
From: jon.harrop.ms.sharp@gmail.com
Subject: Re: The Importance of Terminology's Quality
Message-Id: <c9120a7e-5e21-4835-9211-bd83bc958a7c@i76g2000hsf.googlegroups.com>
On 5 Giu, 12:37, Jon Harrop <j...@ffconsultancy.com> wrote:
> [...]
P.S. Please don't look at my profile (at google groups), thanks!
Jon Harrop
------------------------------
Date: Wed, 4 Jun 2008 22:26:04 -0700
From: "szr" <szrRE@szromanMO.comVE>
Subject: Re: XML::Parser Tree Style
Message-Id: <g27tdd070t@news4.newsguy.com>
Tad J McClellan wrote:
> szr <szrRE@szromanMO.comVE> wrote:
>> Dr.Ruud wrote:
>>> NiallBCarter schreef:
>>>
>>>> $parser = new XML::Parser( Style => 'Tree' );
>>>
>>> Better written as
>>>
>>> $parser = XML::Parser->new( Style => 'Tree' );
>>
>> I think better is really in the eye of the beholder.
>
> It is an effective way to insert subtle bugs into your code.
Well I guess it depends how well one uses it; I haven't ever had any
problems with it. I personally prefer it, I suppose becasue it's feel
more natural to me, since C/C++ were languages I started programming
with initially (among others, but those mainly.)
> perldoc -q method
>
> Why can't a method included in this same file be found?
> ...
> Make sure to read about creating modules in L<perlmod> and
> the perils of indirect objects in L<perlobj/"Method Invocation">.
Agreed.
--
szr
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 V11 Issue 1613
***************************************