[24607] in Perl-Users-Digest
Perl-Users Digest, Issue: 6783 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 9 14:05:52 2004
Date: Fri, 9 Jul 2004 11:05:06 -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 Fri, 9 Jul 2004 Volume: 10 Number: 6783
Today's topics:
Re: A doubt about m//'s related variables <nobull@mail.com>
double quotes vs. single quotes (was Re: hash as argume <tadmc@augustmail.com>
Re: hash as argument <trammell+usenet@hypersloth.invalid>
Re: hash as argument <perl@my-header.org>
Re: hash as argument <tadmc@augustmail.com>
Re: hash as argument <tadmc@augustmail.com>
How to tell if window.open created new? <socyl@987jk.com>
Re: How to tell if window.open created new? <jns@gellyfish.com>
Re: How to tell if window.open created new? <socyl@987jk.com.invalid>
Re: Looping through hash for match and replacement stri <nobull@mail.com>
Re: Negation of RegEx <fifo@despammed.com>
Re: Not sure if Perl or browser problem..... (Scott J)
Re: perl cgi problem <jns@gellyfish.com>
Re: perl cgi problem <noreply@gunnar.cc>
Re: Perl newbie please help <mritty@gmail.com>
Re: Problem with Archive::Tar <qa3653@email.mot.com>
Re: Problem with Archive::Tar <xx087@freenet.carleton.ca>
Re: Regexp substitution problem - suggestions? <regner@dievision.de>
Re: Regexp substitution problem - suggestions? <bernard.el-haginDODGE_THIS@lido-tech.net>
Re: Regexp substitution problem - suggestions? <regner@dievision.de>
Re: Regexp substitution problem - suggestions? <regner@dievision.de>
Re: Regexp substitution problem - suggestions? <noreply@gunnar.cc>
Re: Regular expression to match surrounding parenthesis <nospam-abuse@ilyaz.org>
Re: Returns / list context <perl@my-header.org>
Re: Secure Database Systems <kkeller-usenet@wombat.san-francisco.ca.us>
Re: XSLT Transformation <jns@gellyfish.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 09 Jul 2004 17:46:45 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: A doubt about m//'s related variables
Message-Id: <u9wu1ddt6y.fsf@wcl-l.bham.ac.uk>
Jeff 'japhy' Pinyan <pinyaj@rpi.edu> writes:
> On Wed, 7 Jul 2004, Michele Dondi wrote:
>
> >I have a minor doubt about predefined variables related to pattern
> >matching: in particular is it safe to do something like this?
> >
> > if ( /\{([\w:]+)\}/ ) {
> > do_something($`, $', split /:/, $1);
> > }
> >
> >I mean: are $`, $' and $1 those coming from the
> >*first* pattern matching in all cases?
>
> You could have determined that on your own with testing.
Actually that would only determine if they do in the current version
of Perl. I suspect it is _unlikely_ that split() will ever change the
values of $& et al but until and unless it get's put into the
documentation of split() I wouldn't want to rely on it.
> I also advise against using $` and $' and $& if you can avoid them.
Seconded. I also advise against using any of the regex-related
variables as arguments to a subroutine without double quoting them to
avoid the undesirable aliasing.
sub do_something {
"Unexpected results" =~ /$/;
print shift,"\n";
}
"Expected results" =~ /$/;
print $`,"\n"; # Expected results
do_something($`); # Unexpected results
do_something("$`"); # Expected results
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Fri, 9 Jul 2004 09:32:30 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: double quotes vs. single quotes (was Re: hash as argument)
Message-Id: <slrncetb3u.93h.tadmc@magna.augustmail.com>
Joe Smith <Joe.Smith@inwap.com> wrote:
> Sherm Pendley wrote:
>> And don't use double-quotes on strings unless it's necessary.
>
> Has Larry Wall made a statement on this?
Not that I know of, but I've heard both Randal Schwartz and
Tom Christiansen say that they always use double quotes...
I'm of the "use double quotes only if you _need_ double quotes" camp,
because I'm just a Regular Guy and not a Genius Hacker.
The rules are different between those demographics. :-)
I need all the "brain cycles" available to solve the problem,
I don't have excess that I can spend on checking for edge cases.
The programmer's choice of quotes is a note to (him|her)self:
"interpolation or backslash escapes are here!"
or
'nothing special going on here'
Double quotes without interpolation or backslash escapes tricks
the maintenance programmer into spending more debugging time on
that string than is necessary.
(assuming a string of more than just a few characters)
> Using double quotes in a situation where single quotes could also
^^^^^^^^^^^
> be used is not a programming error.
But then you have to remember to analyse the situation everytime
you want to quote a string.
$re = "func\(\)";
print "matched [$1]\n" if /($re)/; # matches "func" without parens
Gets false matches with "", would have worked fine the 1st time with ''.
> It is a matter of style.
Yes, but that is what style choices are for.
Either to make debugging easier, or to reduce the chances of
inserting bugs in the first place.
The above-mentioned "rule" does both.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 9 Jul 2004 13:27:15 +0000 (UTC)
From: "John J. Trammell" <trammell+usenet@hypersloth.invalid>
Subject: Re: hash as argument
Message-Id: <slrncet79i.2v8.trammell+usenet@hypersloth.el-swifto.com.invalid>
On Fri, 09 Jul 2004 07:11:50 GMT, Joe Smith <Joe.Smith@inwap.com> wrote:
> Using double quotes in a situation where single quotes could also
> be used is not a programming error. It is a matter of style.
AOL. One IMHO legit reason to prefer double quotes is that ' and "
are more visually distinct than ` and '.
I'd argue the " vs. ' beef isn't in the same league as use strict,
test return value from open(), avoid C-style loops, and most others.
------------------------------
Date: Fri, 09 Jul 2004 16:30:09 +0200
From: Matija Papec <perl@my-header.org>
Subject: Re: hash as argument
Message-Id: <klate0dhffjec2cv082qpemsnst35nren3@4ax.com>
X-Ftn-To: Andrew Hamm
"Andrew Hamm" <ahamm@mail.com> wrote:
>> I agree, but there are a few regulars here who view it as a matter of
>> religion. Minimizing the use of double-quotes, at least when posting
>> code here, helps reduce the incessant whining about it.
>>
>
>I'm not changing - I hate it when I spend 15 minutes looking for a bug only
>to finally discover I've tried to add $thingy inside single quotes. Too he11
>with that...
Agree; I'll second that. :!
--
Matija
------------------------------
Date: Fri, 9 Jul 2004 09:39:20 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: hash as argument
Message-Id: <slrncetbgo.93h.tadmc@magna.augustmail.com>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> By using the conventional
> style, the author tells the reader "Nothing to see here, move along...".
> A deviation from the standard tells the reader to look for the reason.
> That makes such code a lot easier to read.
Some more examples of saying that "something special" is going
on when nothing special is going on:
m/RE/s; # when RE does not contain a dot
m/RE/m; # when RE does not contain ^ or $ anchors
printf "%s\n", 'Hello World'; # printf() w/same formatting as print()
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 9 Jul 2004 09:56:52 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: hash as argument
Message-Id: <slrncetchk.97d.tadmc@magna.augustmail.com>
John J. Trammell <trammell+usenet@hypersloth.invalid> wrote:
> On Fri, 09 Jul 2004 07:11:50 GMT, Joe Smith <Joe.Smith@inwap.com> wrote:
>> Using double quotes in a situation where single quotes could also
>> be used is not a programming error. It is a matter of style.
>
> AOL. One IMHO legit reason to prefer double quotes is that ' and "
> are more visually distinct than ` and '.
I always use qx/prog/ instead of `prog` because it is more
visually distinct, so that reason isn't legit in _my_ code. :-)
> I'd argue the " vs. ' beef isn't in the same league as use strict,
> test return value from open(), avoid C-style loops, and most others.
<aol>Me too!</aol>
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 9 Jul 2004 14:58:01 +0000 (UTC)
From: kj <socyl@987jk.com>
Subject: How to tell if window.open created new?
Message-Id: <ccmbpp$g7u$1@reader2.panix.com>
Suppose I have the line
w = window.open("", "foobar");
How can I tell whether this call to window.open created a new window
or simply returned a pointer to an already existing window called
"foobar"?
Thanks!
kj
--
NOTE: In my address everything before the period is backwards.
------------------------------
Date: Fri, 09 Jul 2004 15:05:29 GMT
From: Jonathan Stowe <jns@gellyfish.com>
Subject: Re: How to tell if window.open created new?
Message-Id: <ZuyHc.74$5_.49@newsr2.u-net.net>
kj <socyl@987jk.com> wrote:
>
> Suppose I have the line
>
> w = window.open("", "foobar");
>
er, that doesn't look like Perl to me.
/J\
------------------------------
Date: Fri, 9 Jul 2004 15:46:31 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: Re: How to tell if window.open created new?
Message-Id: <ccmekn$ha7$1@reader2.panix.com>
In <ZuyHc.74$5_.49@newsr2.u-net.net> Jonathan Stowe <jns@gellyfish.com> writes:
>kj <socyl@987jk.com> wrote:
>>
>> Suppose I have the line
>>
>> w = window.open("", "foobar");
>>
>er, that doesn't look like Perl to me.
I goofed. I'm sorry.
kj
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
------------------------------
Date: 09 Jul 2004 17:36:56 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Looping through hash for match and replacement strings
Message-Id: <u93c41f87r.fsf@wcl-l.bham.ac.uk>
Joe Smith <Joe.Smith@inwap.com> writes:
> A better approach would be to build a complex search string and substitute
> from the hash using a single pass through the input file.
>
> $search = join '|',keys %op;
Actually IIRC this turns out to be not so effcient which is why the
FAQ does not recommend it in "How do I efficiently match many regular
expressions at once?"
I can't be bothered to do some benchmarks now but if you search for
previous threads containing the string "How do I efficiently match
many regular expressions at once?" then no doubt you'll find some.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Fri, 09 Jul 2004 15:37:49 +0100
From: fifo <fifo@despammed.com>
Subject: Re: Negation of RegEx
Message-Id: <20040709143721.GD8234@fleece>
At 2004-07-08 15:51 -0700, Dan wrote:
> Randal's answer /^(?!FOO)/can just deals with a special case in which
> the unwanted word is at the beginning of a sentence.
>
> What if the unwanted word could appear at any position of the
> sentence?
> The look-ahead negtive assertion doesn't work. Just give it a try!
>
/^(?!.*word)/s will match if and only if /word/ doesn't.
------------------------------
Date: 9 Jul 2004 08:22:29 -0700
From: scottjou@farnell.ns.ca (Scott J)
Subject: Re: Not sure if Perl or browser problem.....
Message-Id: <eccfc6d8.0407090722.bcdf2e4@posting.google.com>
Joe Smith <Joe.Smith@inwap.com> wrote in message news:<tvgHc.45911$IQ4.21094@attbi_s02>...
> Scott J wrote:
>
> > print qq($lastName $firstName);
> >
> > If this script is running on a windows machine, I remember reading how
> > using the qq() operator wont work, fyi.
>
> You remember incorrectly. q($lastName $firstName) won't work but qq() will.
> -Joe
A little fuzzy on the details, as usual. Thanks!
Scott
------------------------------
Date: Fri, 09 Jul 2004 14:22:56 GMT
From: Jonathan Stowe <jns@gellyfish.com>
Subject: Re: perl cgi problem
Message-Id: <4TxHc.73$5_.10@newsr2.u-net.net>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> pfancy wrote:
>> It may because i don't have a sendmail thing.
>
> What would the "sendmail thing" have to do with a guestbook script?
>
The 'guestbook' script (both the NMS and the original MSA one) have a
facility to send a message to someone when something was added to the
guestbook. I seem to recall the MSA one had the additional feature of
acting as an anonymous mail proxy for spammers.
/J\
------------------------------
Date: Fri, 09 Jul 2004 16:28:12 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: perl cgi problem
Message-Id: <2l7opiF9av44U1@uni-berlin.de>
Jonathan Stowe wrote:
> Gunnar Hjalmarsson wrote:
>> pfancy wrote:
>>> It may because i don't have a sendmail thing.
>>
>> What would the "sendmail thing" have to do with a guestbook
>> script?
>
> The 'guestbook' script (both the NMS and the original MSA one) have
> a facility to send a message to someone when something was added to
> the guestbook.
Aha, thanks, should have realized that.
> I seem to recall the MSA one had the additional feature of acting
> as an anonymous mail proxy for spammers.
Sounds plausible. Maybe an imported feature from Matt's formmail? :)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 9 Jul 2004 09:20:28 -0400
From: Paul Lalli <mritty@gmail.com>
Subject: Re: Perl newbie please help
Message-Id: <20040709091736.J15079@barbara.cs.rpi.edu>
On Fri, 9 Jul 2004, John W. Krahn wrote:
> Paul Lalli wrote:
> >
> > On Thu, 8 Jul 2004, Jordy Keighan wrote:
> > >
> > > @user_array = split(" ", $user_string);
> >
> > > print $user_array[0]; # VALUE OK prints bob!!!!
> >
> > out of curiousity, does it really print *just* bob? Or does the value
> > perhaps have extra whitespace attached to either end?
>
> It can't have any whitespace as the previous line removes all
> whitespace.
Whoops. I was confusing
split ' ';
with
split / /;
My mistake. Thanks for catching that.
Paul Lalli
------------------------------
Date: Fri, 09 Jul 2004 10:07:34 -0500
From: Mark Newman <qa3653@email.mot.com>
Subject: Re: Problem with Archive::Tar
Message-Id: <ccmbqh$l81$1@avnika.corp.mot.com>
Just to be sure, I cut and paste your code, and tried running it, with
no success. I'm not surprised, as I've been wondering all along if this
was a Windows issue. The problem is that this script is desitined to be
used by our customers eventually, and they are running on both windows
and unix, so I need to make it work on both, or there is no point in
releasing it. I guess I may have to resort to brute force methods, i.e.
manually create the directory structure that I want on disk, and then
look and see if add_file works any better...
Joe Smith wrote:
> Mark Newman wrote:
>
>> The problem occurs when I try to create some sort of directory
>> structure inside of the tar file (so that I can grab files from
>> multiple devices, and file them say by IP address). Every attempt
>> that I have made to get Archive::Tar to accept a nested file name is
>> ignored. Here is sample code:
>>
>> for(my $i= 0; $i < scalar(@deviceTemplate); $i += 2)
>> {
>> print "$deviceTemplate[$i] -> $deviceTemplate[$i+1] \n";
>> if(!$www->doURLQuery("http://$hostName/$deviceTemplate[$i+1]"))
>> {
>> print "ERROR: $hostName = " . $www->getErrorMessage() . "\n";
>> } else {
>>
>> $tar->add_data("dir1/$deviceTemplate[$i+1]",$www->httpResponse());
>> }
>> }
>>
>> The various webpages are successfully grabbed and stored in a .tar
>> file, but the "dir1/" path is ignored. All files are in the root
>> directory.
>
>
> I would have expected one of doURLQuery or add_data to use
> $deviceTemplate[$i] instead of $deviceTemplate[$i+1] both places.
>
> Anyway, it works for me.
>
> linux% cat tar.pl
> #!/usr/bin/perl
> use Archive::Tar;
> my $tar = Archive::Tar->new;
> foreach (1 .. 5) {
> $tar->add_data("dir1/$_.txt", 'xxxxx' x $_);
> }
> $tar->write('files.tar');
> system "tar tvf files.tar";
> linux% perl tar.pl
> -rw-r--r-- jms/jms 5 2004-07-08 22:27:02 dir1/1.txt
> -rw-r--r-- jms/jms 10 2004-07-08 22:27:02 dir1/2.txt
> -rw-r--r-- jms/jms 15 2004-07-08 22:27:02 dir1/3.txt
> -rw-r--r-- jms/jms 20 2004-07-08 22:27:02 dir1/4.txt
> -rw-r--r-- jms/jms 25 2004-07-08 22:27:02 dir1/5.txt
> linux% tar xvf files.tar
> dir1/1.txt
> dir1/2.txt
> dir1/3.txt
> dir1/4.txt
> dir1/5.txt
>
> -Joe
------------------------------
Date: 9 Jul 2004 17:17:34 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: Problem with Archive::Tar
Message-Id: <slrncetkpf.416.xx087@smeagol.ncf.ca>
Mark Newman <qa3653@email.mot.com> wrote:
[...]
> no success. I'm not surprised, as I've been wondering all along if this
> was a Windows issue. The problem is that this script is desitined to be
> used by our customers eventually, and they are running on both windows
> and unix, so I need to make it work on both, or there is no point in
> releasing it. I guess I may have to resort to brute force methods, i.e.
[...]
did you read in the Archive::Tar documentation the paragraph that reads:
Although rich in features, it is known to not work on Win32
platforms. On those platforms, Archive::Tar will silently
and transparently fall back to the Archive::Tar::Win32
manpage. Please refer to that manpage if you are on a Win32
platform.
--
Glenn Jackman
NCF Sysadmin
glennj@ncf.ca
------------------------------
Date: Fri, 09 Jul 2004 15:06:19 +0200
From: Tom Regner <regner@dievision.de>
Subject: Re: Regexp substitution problem - suggestions?
Message-Id: <40ee984b$0$5987$4d3ebbfe@news1.pop-hannover.net>
Bernard El-Hagin wrote:
> "JK" <jhalbrook@bjc.org> wrote:
>
>> mailto:jim@his-domain.com
>>
>> to:
>>
>> <a href="mailto:jim@his-domain.com">mailto:jim@his-domain.com</a>
>
> As long as what's after "mailto" contains no whitespaces you can use:
>
>
> s/(mailto:\S+?)/<a href="$1">$1</a>/g;
>
I think you have to make that + greedy, as it will as provided match only
the first non-whitespace character after the colon, so I'll make that:
s/(mailto:\S+)/<a href="$1">$1</a>/g
kind regards,
Tom Regner
--
Dievision GmbH | Kriegerstrasse 44 | 30161 Hannover
Telefon: (0511) 288791-0 | Telefax: (0511) 288791-99
http://www.dievision.de | mailto:regner@dievision.de
------------------------------
Date: Fri, 9 Jul 2004 15:22:20 +0200
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: Regexp substitution problem - suggestions?
Message-Id: <Xns95219CBB2793Delhber1lidotechnet@62.89.127.66>
Tom Regner <regner@dievision.de> wrote:
> Bernard El-Hagin wrote:
>
>> "JK" <jhalbrook@bjc.org> wrote:
>>
>>> mailto:jim@his-domain.com
>>>
>>> to:
>>>
>>> <a
>>> href="mailto:jim@his-domain.com">mailto:jim@his-domain.com</a>
>>
>> As long as what's after "mailto" contains no whitespaces you can
>> use:
>>
>>
>> s/(mailto:\S+?)/<a href="$1">$1</a>/g;
>>
>
> I think you have to make that + greedy, as it will as provided
> match only the first non-whitespace character after the colon, so
> I'll make that:
>
> s/(mailto:\S+)/<a href="$1">$1</a>/g
Or:
s/(mailto:\S+?)\s/<a href="$1">$1</a>/g
Of course all three have a syntax error*, but who cares about that. :)
* - the / in the closing tag should be escaped :)
--
Cheers,
Bernard
------------------------------
Date: Fri, 09 Jul 2004 15:48:47 +0200
From: Tom Regner <regner@dievision.de>
Subject: Re: Regexp substitution problem - suggestions?
Message-Id: <40eea23f$0$5987$4d3ebbfe@news1.pop-hannover.net>
Tom Regner wrote:
> Bernard El-Hagin wrote:
>
>> "JK" <jhalbrook@bjc.org> wrote:
>>
>>> mailto:jim@his-domain.com
>>>
>>> to:
>>>
>>> <a href="mailto:jim@his-domain.com">mailto:jim@his-domain.com</a>
>>
>> As long as what's after "mailto" contains no whitespaces you can use:
>>
>>
>> s/(mailto:\S+?)/<a href="$1">$1</a>/g;
>>
>
> I think you have to make that + greedy, as it will as provided match only
> the first non-whitespace character after the colon, so I'll make that:
>
> s/(mailto:\S+)/<a href="$1">$1</a>/g
I forgot to mention: if the code is to be used "in the wild", you should
consider a serious check, to see if the address matched is indeed a valid
one, I suggest you use Email::Valid in the match:
snippet:
-------------
use Email::Valid;
s!(mailto:(\S+))!Email::Valid->address($2) ? "<a href='$1'>$1</a>" : $1!eg;
kind regards,
Tom Regner
--
Dievision GmbH | Kriegerstrasse 44 | 30161 Hannover
Telefon: (0511) 288791-0 | Telefax: (0511) 288791-99
http://www.dievision.de | mailto:regner@dievision.de
------------------------------
Date: Fri, 09 Jul 2004 16:03:37 +0200
From: Tom Regner <regner@dievision.de>
Subject: Re: Regexp substitution problem - suggestions?
Message-Id: <40eea5b9$0$5987$4d3ebbfe@news1.pop-hannover.net>
Bernard El-Hagin wrote:
> Tom Regner <regner@dievision.de> wrote:
>
>> Bernard El-Hagin wrote:
>>
[...] (mail-address regexp question)
>>
>> I think you have to make that + greedy, as it will as provided
>> match only the first non-whitespace character after the colon, so
>> I'll make that:
>>
>> s/(mailto:\S+)/<a href="$1">$1</a>/g
>
>
> Or:
>
>
> s!(mailto:\S+?)\s!<a href="$1">$1</a>!g
(corrected the match-delimiter from / to !)
minor nitpick: that wouldn't match an address at the end of a line that
doesn't end in a newline.
kind regards,
Tom Regner
--
Dievision GmbH | Kriegerstrasse 44 | 30161 Hannover
Telefon: (0511) 288791-0 | Telefax: (0511) 288791-99
http://www.dievision.de | mailto:regner@dievision.de
------------------------------
Date: Fri, 09 Jul 2004 16:13:11 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Regexp substitution problem - suggestions?
Message-Id: <2l7nslF9l5ajU1@uni-berlin.de>
JK wrote:
> I need to search for all occurrences of mailto tags in a file, and
> hyperlink them.
>
> i.e.
>
> mailto:jim@his-domain.com
>
> to:
>
> <a href="mailto:jim@his-domain.com">mailto:jim@his-domain.com</a>
Is the file a publicly available web page? In that case, displaying
non-obfuscated email addresses, with or without mailto links, is bad.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 9 Jul 2004 17:35:23 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Regular expression to match surrounding parenthesis
Message-Id: <ccml0r$1bqb$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Anno Siegel
<anno4000@lublin.zrz.tu-berlin.de>], who wrote in article <ccj6ne$f4b$1@mamenchi.zrz.TU-Berlin.DE>:
> The mathematicians who work with regular expressions are just a club of
> pedants?
Can't answer this question; never saw a mathematician who works with
regular expressions. 1/5 ;-)
But in general, [with a few exceptions] mathematicians do not mind the
same word having different meanings in different contexts. Too few
words, too many things to work over....
[For an extreme example, 'less than' may have a different meaning if
written by a French.]
Hope this helps,
Ilya
------------------------------
Date: Fri, 09 Jul 2004 16:30:08 +0200
From: Matija Papec <perl@my-header.org>
Subject: Re: Returns / list context
Message-Id: <rnate0tq7giaf3sutmsci8j2ogb3mvlimg@4ax.com>
X-Ftn-To: Chris Newton
Chris Newton <chrisnewton@no.junk.please.btinternet.com> wrote:
>> "values" is perl builtin function for returning hash values.
>
>Sorry, that was just brain-fade while typing in the simplified version.
>The real code uses a different name.
:)
>> If you want to store an array in hash{$key}, you'll need reference
>> (check perldoc perlref),
>>
>> $hash{$key} = [ values() ];
>
>Thanks; I'd forgotten it needed to become a reference when stored in a
>hash. Told you it would be obvious! :-)
>
>Thanks to all for the replies,
>Chris
>(who's been programming in too many different languages this week!)
Is it Python that made you forget all sane things? ;)
--
Matija
------------------------------
Date: Fri, 9 Jul 2004 09:06:02 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: Secure Database Systems
Message-Id: <apfmcc.lb7.ln@goaway.wombat.san-francisco.ca.us>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
On 2004-07-09, Sarah Tanembaum <sarahtanembaum@yahoo.com> wrote:
> I was wondering if it is possible to create a secure database system
Sure! Just unplug it.
[rest of inappropriate crosspost snipped]
- --keith
- --
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFA7sJnhVcNCxZ5ID8RArUPAJ9HH4g9olmXo2iBUyOUFm+zrvHl5gCfZUPy
R4OCbgUywvlBWh8sSdTsvOY=
=pfAK
-----END PGP SIGNATURE-----
------------------------------
Date: Fri, 09 Jul 2004 14:13:13 GMT
From: Jonathan Stowe <jns@gellyfish.com>
Subject: Re: XSLT Transformation
Message-Id: <ZJxHc.72$5_.3@newsr2.u-net.net>
Tom Regner <regner@dievision.de> wrote:
> Axel Strube-Zettler wrote:
>> how can I do a XSLT transformation on a XML File (XSLT Stylesheet) -
>> just like Saxon does? What packages are exactly needed?
>
> Jonathan Stowes XML::XSLT seems to fit, from the pod:
>
Just for the record I am only its guardian and not its parent :-)
> use XML::XSLT;
>
> my $xslt = XML::XSLT->new ($xsl, warnings => 1);
>
> $xslt->transform ($xmlfile);
> print $xslt->toString;
The module is still however very much a work in progress and there are
parts of the XSLT spec that are not completely supported. If you need a
wider range of features you might consider using XML::LibXSLT as
suggested by someone else.
/J\
------------------------------
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 V10 Issue 6783
***************************************