[30887] in Perl-Users-Digest
Perl-Users Digest, Issue: 2132 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 16 03:09:44 2009
Date: Fri, 16 Jan 2009 00:09:10 -0800 (PST)
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, 16 Jan 2009 Volume: 11 Number: 2132
Today's topics:
Re: Cygwin or Windows: file permission functions are br <nospam@somewhere.com>
Re: Cygwin or Windows: file permission functions are br <Andrew@DeFaria.com>
fastest way to allocate memory ? <georg.heiss@gmx.de>
IPC::Shareable::SharedMem: shmget: Permission denied <nitte.sudhir@gmail.com>
Jaeger LeCoultre Master Geographic Watch, Best Wristwat hualibao466@gmail.com
Re: Match CASE/END SQL Construct <jimsgibson@gmail.com>
new CPAN modules on Fri Jan 16 2009 (Randal Schwartz)
Popular Concord Watches hualibao405@gmail.com
Re: processing text <george@example.invalid>
Re: processing text <george@example.invalid>
Re: processing text <tim@burlyhost.com>
Re: unable to open file <Tintin@teranews.com>
Re: What do you need to have to be considered a Master <tim@burlyhost.com>
Re: What do you need to have to be considered a Master sln@netherlands.com
Re: What do you need to have to be considered a Master <g_m@remove-comcast.net>
Re: What do you need to have to be considered a Master <tim@burlyhost.com>
Re: What do you need to have to be considered a Master <jurgenex@hotmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 16 Jan 2009 01:42:26 -0500
From: "Thrill5" <nospam@somewhere.com>
Subject: Re: Cygwin or Windows: file permission functions are broken
Message-Id: <gkpa8m$32j$1@nntp.motzarella.org>
"Tim McDaniel" <tmcd@panix.com> wrote in message
news:gko17a$rd6$1@reader1.panix.com...
> My apologies for asking a Cygwin- or Windows-specific question here,
> but it's also Perl-specific, and I'm not sure of a better
> easy-to-access place.
>
> I looked in perlfaq5 and didn't see it discussed there, possibly
> because it's a Cygwin or Windows problem in particular -- but this HAS
> to be a common problem. I tried some Googling, but it's hard to
> search for "w", and I couldn't think of effective search terms.
>
> I'm using a pretty recent Cygwin, but I don't know how to find out a
> version number or date. "cd"ed into an NTFS partition. Environment
> variable CYGWIN is "tty ntsec".
>
> The current directory is owned by group Administrators; my user ID is
> in group Administrators; group Administrators has full control. So I
> can do any regular commands that create or delete files (Cygwin touch,
> CMD.EXE copy, anything).
>
> But
> perl -e 'print(-w "." ? "yes\n" : "no\n")'
> prints "no", and the same for -r and -x.
> Possibly related to "ls -ld" outputting this:
> drwx------+ 30 ???????? none 0 Jan 15 11:44 .
>
> I noticed this when I couldn't get File::Temp to work with DIR=>'.'
> [footnote 2], because of its code
>
> # Check that the parent directories exist
> # Do this even for the case where we are simply returning a name
> # not a file -- no point returning a name that includes a directory
> # that does not exist or is not writable
>
> unless (-d $parent) {
> ${$options{ErrStr}} = "Parent directory ($parent) is not a
> directory";
> return ();
> }
> unless (-w $parent) {
> ${$options{ErrStr}} = "Parent directory ($parent) is not writable\n";
> return ();
> }
> [footnote 1]
>
>
> Question 1: is there any way I can get Perl's -r / -w / -x functions
> to work? Is this indeed an FAQ question, or should I actually file a
> bug report with the Cygwin group?
>
> Question 2: Is there another module that's shipped with Perl that I
> could use instead of File::Temp? I don't know of a way to tell all
> the modules that are installed. (I'd really prefer not to depend on
> yet another module needing to be installed.) IO::File::new_tmpfile()
> doesn't take a directory name [2]. POSIX's
> char * tempnam(const char *tmpdir, const char *prefix)
> is not implemented in module POSIX::...
>
> I guess I'll just adapt the code from perlfaq5 ...
>
> Question 3: ... but why is it wrapped in a BEGIN block?
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [1] I consider that a design flaw. I believe that the best way to
> test that an operation will succeed is simply to try to do it, and
> catch the failure. (When the operation indicates all errors, and when
> it is atomic, either succeeding completely or failing with no
> residure.)
>
> [2] There are reasons that I don't use TMPDIR, TEMP, or TMP. They are
> irrelevant to this problem. Really. ...
>
> ... if you insist: I often run the Perl program outside of a Cygwin
> window. Even when TMPDIR is set in Windows syntax as C:\tmp, on
> startup Perl transmogrifies it to /tmp (or whatever, per cygpath -u).
> The Perl program calls non-Cygwin-aware programs, so they have to get
> non-Cygwin paths like "e:\foo\bar" instead of "/CM/foo/bar". Since
> the Perl program is running in a cmd.exe window, Cygwin programs are
> not in the Path ... meaning I can't just run "cygpath -w". I don't
> want to hard-code Path directories into the script.
>
> But "." is a directory name that works in both Cygwin and non-Cygwin.
> It's not much of a stretch to insist that they run the program in a
> writable directory ... as long as Perl realizes that it's writable,
> dammit!!1!
>
> --
> Tim McDaniel, tmcd@panix.com
I'm running ActiveState 5.8.8 and my Perl doesn't act like your version.
C:\Documents and Settings\Administrator>perl -e "print (-w '.' ? 'yes' :
'no')"
yes
C:\Documents and Settings\Administrator>perl -e "print (-d '.' ? 'yes' :
'no')"
yes
C:\Documents and Settings\Administrator>perl -e "print (-r '.' ? 'yes' :
'no')"
yes
I have also never seen any paths "transmogrified" by Perl. Have you tried
installing and running your program using an ActiveState build instead of a
version compiled under Cygwin?
Not sure what your issue with File::Temp is, but this is a standard module
included in the ActiveState distribution and works just like the Unix
version.
------------------------------
Date: Fri, 16 Jan 2009 00:11:25 -0700
From: Andrew DeFaria <Andrew@DeFaria.com>
Subject: Re: Cygwin or Windows: file permission functions are broken
Message-Id: <4970331e$0$48226$815e3792@news.qwest.net>
Tim McDaniel wrote:
> My apologies for asking a Cygwin- or Windows-specific question here,
> but it's also Perl-specific, and I'm not sure of a better
> easy-to-access place.
Try the Cygwin mailing list.
> I looked in perlfaq5 and didn't see it discussed there, possibly
> because it's a Cygwin or Windows problem in particular -- but this HAS
> to be a common problem. I tried some Googling, but it's hard to search
> for "w", and I couldn't think of effective search terms.
>
> I'm using a pretty recent Cygwin, but I don't know how to find out a
> version number or date. "cd"ed into an NTFS partition. Environment
> variable CYGWIN is "tty ntsec".
IMHO "tty" is bad...
> The current directory is owned by group Administrators; my user ID is
> in group Administrators; group Administrators has full control. So I
> can do any regular commands that create or delete files (Cygwin touch,
> CMD.EXE copy, anything).
>
> But
> perl -e 'print(-w "." ? "yes\n" : "no\n")'
> prints "no", and the same for -r and -x.
> Possibly related to "ls -ld" outputting this:
> drwx------+ 30 ???????? none 0 Jan 15 11:44 .
The "+" above indicates that the permissions are "special". Stated
differently, the Windows permissions mask is way larger of a set than
the Unix permissions mask. The "+" is saying that there are Windows
permissions to this directory (or file) that simply cannot be
represented in POSIX file permissions. This is probably the key to your
misunderstanding.
> I noticed this when I couldn't get File::Temp to work with DIR=>'.'
> [footnote 2], because of its code
>
> # Check that the parent directories exist
> # Do this even for the case where we are simply returning a name
> # not a file -- no point returning a name that includes a directory
> # that does not exist or is not writable
>
> unless (-d $parent) {
> ${$options{ErrStr}} = "Parent directory ($parent) is not a directory";
> return ();
> }
> unless (-w $parent) {
> ${$options{ErrStr}} = "Parent directory ($parent) is not writable\n";
> return ();
> }
> [footnote 1]
>
>
> Question 1: is there any way I can get Perl's -r / -w / -x functions
> to work? Is this indeed an FAQ question, or should I actually file a
> bug report with the Cygwin group?
Change the permissions of the directory such that they fall within
possibility of the simplistic POSIX standard.
> Question 2: Is there another module that's shipped with Perl that I
> could use instead of File::Temp? I don't know of a way to tell all the
> modules that are installed. (I'd really prefer not to depend on yet
> another module needing to be installed.) IO::File::new_tmpfile()
> doesn't take a directory name [2]. POSIX's char * tempnam(const char
> *tmpdir, const char *prefix) is not implemented in module POSIX::...
I believe File::Temp will use $TMP. My $TMP -> C:\Cygwin\tmp, or in
POSIX terms /tmp in Cygwin. My /tmp says:
$ ll -d /tmp
drwxrwxrwt 3 Andrew DeFaria None 0 Jan 16 00:05 /tmp/
No "+".
> I guess I'll just adapt the code from perlfaq5 ...
>
> Question 3: ... but why is it wrapped in a BEGIN block?
BEGIN?
> [2] There are reasons that I don't use TMPDIR, TEMP, or TMP. They are
> irrelevant to this problem. Really. ...
Actually I see them as a viable alternative.
> ... if you insist: I often run the Perl program outside of a Cygwin
> window.
Running within a Cygwin "window" (Whatever that is) or not is not the issue.
> Even when TMPDIR is set in Windows syntax as C:\tmp, on startup Perl
> transmogrifies it to /tmp (or whatever, per cygpath -u).
I think you're confused. There is not C:\tmp in Cygwin terms. There is
only /tmp. /tmp *translates* (not transmogrifies) to C:\Cygwin\tmp and
always has. Said differently, your C:\tmp is not Cygwin's notion of $TMP.
> The Perl program calls non-Cygwin-aware programs, so they have to get
> non-Cygwin paths like "e:\foo\bar" instead of "/CM/foo/bar".
However many Windows programs understand the syntax of C:/foo/bar
> Since the Perl program is running in a cmd.exe window, Cygwin programs
> are not in the Path ... meaning I can't just run "cygpath -w". I don't
> want to hard-code Path directories into the script.
You can, and IMHO, should, add C:\Cygwin\bin to your user level PATH
environment variable. Again, IMHO it's a very reasonable and
understandable thing to do and require. Again, MHO.
> But "." is a directory name that works in both Cygwin and non-Cygwin.
> It's not much of a stretch to insist that they run the program in a
> writable directory ... as long as Perl realizes that it's writable,
> dammit!!1!
The definition of "writable" differs between the POSIX world and the
Windows world. That's the essence of your misunderstanding.
--
Andrew DeFaria <http://defaria.com>
First to come are the midgets, a monkey and a kid. Followed by those two
one-armed jugglers, the ego and the id - Gordon Lightfoot
------------------------------
Date: Fri, 16 Jan 2009 00:04:33 -0800 (PST)
From: "georg.heiss@gmx.de" <georg.heiss@gmx.de>
Subject: fastest way to allocate memory ?
Message-Id: <bbace9ea-54e6-4b7e-8b89-4e81e89d6a60@b38g2000prf.googlegroups.com>
Hi, i try to allocate 10GB of memory on my box and it takes about 27
seconds.
Is there a faster way to do this?
my $gras = "A" x (1024 * 1024 * 10000);
my $needle = "B";
print "\nAllocated " . length($gras) . " byte buffer\n";
$gras = $gras.$needle;
print "Allocated " . length($gras) . " byte buffer\n";
if ($gras ~~ /$needle/) {print "found needle\n"; }
###
$ time perl memtake.pl &
Allocated 10485760000 byte buffer
Allocated 10485760001 byte buffer
found needle
real 0m27.280s
user 0m13.429s
sys 0m13.839s
------------------------------
Date: Thu, 15 Jan 2009 22:59:59 -0800 (PST)
From: kath <nitte.sudhir@gmail.com>
Subject: IPC::Shareable::SharedMem: shmget: Permission denied
Message-Id: <d3bc18e4-e7cc-458b-b58b-1cf50e00edbe@o4g2000pra.googlegroups.com>
Hi,
I have a simple script to test variable sharing between two perl
processes,
use IPC::Shareable;
$robj = {status=>'init'};
tie $robj->{status}, 'IPC::Shareable', 'data_glue', {create => 1, mode
=> 664, destroy => 1};
$pid = fork();
unless(defined $pid){
print "Error durigng fork\n";
}
if($pid){
$robj->{parent=>'parent'};
}else{
tie $robj->{status}, 'IPC::Shareable', 'data_glue', {create => 0, mode
=> 664, destroy => 0};
$robj->{status} = 'updated';
sleep(5);
exit(0);
}
print "\n", $robj->{status}, "\n";
When i run i get following error.
IPC::Shareable::SharedMem: shmget: Permission denied
at /usr/lib/perl5/site_perl/5.8.3/IPC/Shareable.pm line 566
Could not create shared memory segment:
at test_ipc_shareable.pl line 3
Problem: I get above error when run as user account other than
'root' . But the script used to work before, but started throwing this
error, after server where this script runs was down due to storage
corruption. I am getting this error after server came online.
I am using perl v5.8.3 and IPC::Shareable v0.60. I tried reinstalling
the package, using cpan shell, force make IPC::Shareable', but the
unfortunately 'test IPC::Shareable' fails.
Does any one know how to resolve this? Because running as 'root'
creates other problems for my main scripts.
Thanks in advance,
katharnakh.
------------------------------
Date: Thu, 15 Jan 2009 23:16:37 -0800 (PST)
From: hualibao466@gmail.com
Subject: Jaeger LeCoultre Master Geographic Watch, Best Wristwatch
Message-Id: <cf84e944-5b67-4543-a3b0-7316e471fecd@r36g2000prf.googlegroups.com>
Jaeger LeCoultre Master Geographic Watch, Best Wristwatch
Popular Watches: http://www.watchebay.net/
Jaeger LeCoultre Watches: http://www.watchebay.net/Jaeger-LeCoultre-Watches.html
Jaeger LeCoultre Master Geographic Watch:
http://www.watchebay.net/Jaeger-LeCoultre-Master-Geographic.html
Jaeger LeCoultre Master Geographic All Hot Luxury Wristwatch :
Jaeger-LeCoultre Master Geographic Mens Watch Q1502420 :
http://www.watchebay.net/Jaeger-LeCoultre-Master-Geographic-Mens-Watch-Q1502420.html
Jaeger-LeCoultre Master Geographic Mens Watch 150.84.20 :
http://www.watchebay.net/Jaeger-LeCoultre-Master-Geographic-Mens-Watch-150.84.20.html
Jaeger-LeCoultre Master Geographic Mens Watch 150.81.20 :
http://www.watchebay.net/Jaeger-LeCoultre-Master-Geographic-Mens-Watch-150.81.20.html
------------------------------
Date: Thu, 15 Jan 2009 17:46:03 -0800
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Match CASE/END SQL Construct
Message-Id: <150120091746031991%jimsgibson@gmail.com>
In article <9GMbl.19524$Nq5.11481@newsfe24.iad>, Perry Aynum
<jc_va@hotmail.com> wrote:
> I am working on a SQL parser. I have a routine that recursively removes
> enclosing parentheses and it works fine. Below is the regex that I use.
>
> However, I want to use the same routine, but instead of looking for
> enclosing parens, I want to look for a string enclosed by CASE and END. Can
> someone help me translate the regex below so that it will match a CASE/END
> construct?
>
> Thanks very much.
>
> Parens
> ----------
> (?:\s+)?\([^\(\)]*\)
>
>
>
> This is what I've managed so far with the CASE/END
>
> (?:\s+)?case(?!case|end)\s+end
Have you tried m{ case \s* (.*?) \s* end }ix
--
Jim Gibson
------------------------------
Date: Fri, 16 Jan 2009 05:42:24 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Jan 16 2009
Message-Id: <KDJuIp.22z6@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.
AI-Genetic-Pro-0.29
http://search.cpan.org/~strzelec/AI-Genetic-Pro-0.29/
Efficient genetic algorithms for professional purpose.
----
AI-Genetic-Pro-0.30
http://search.cpan.org/~strzelec/AI-Genetic-Pro-0.30/
Efficient genetic algorithms for professional purpose.
----
Audio-Ecasound-Multitrack-0.99
http://search.cpan.org/~ganglion/Audio-Ecasound-Multitrack-0.99/
Perl extensions for multitrack audio processing
----
Audio-Ecasound-Multitrack-0.991
http://search.cpan.org/~ganglion/Audio-Ecasound-Multitrack-0.991/
Perl extensions for multitrack audio processing
----
Audio-Ecasound-Multitrack-0.992
http://search.cpan.org/~ganglion/Audio-Ecasound-Multitrack-0.992/
Perl extensions for multitrack audio processing
----
Audio-Extract-PCM-0.03_02
http://search.cpan.org/~pepe/Audio-Extract-PCM-0.03_02/
Extract PCM data from audio files
----
Audio-Extract-PCM-0.03_03
http://search.cpan.org/~pepe/Audio-Extract-PCM-0.03_03/
Extract PCM data from audio files
----
Catalyst-Plugin-I18N-Request-0.04
http://search.cpan.org/~bricas/Catalyst-Plugin-I18N-Request-0.04/
A plugin for localizing/delocalizing paths and parameters.
----
DBIx-Class-FrozenColumns-0.07
http://search.cpan.org/~syber/DBIx-Class-FrozenColumns-0.07/
Store virtual columns inside another column.
----
Dansguardian-0.4
http://search.cpan.org/~mogaal/Dansguardian-0.4/
Simple module for administer dansguardian's control files.
----
Devel-Fail-MakeTest-1.013
http://search.cpan.org/~mthurn/Devel-Fail-MakeTest-1.013/
a distro that always fails the `make test` stage
----
File-Find-Object-0.1.7
http://search.cpan.org/~shlomif/File-Find-Object-0.1.7/
An object oriented File::Find replacement
----
Finance-Quote-Sberbank-0.01
http://search.cpan.org/~kilork/Finance-Quote-Sberbank-0.01/
Obtain quotes from Sberbank (Savings Bank of the Russian Federation)
----
HTML-CTPP2-2.4.1
http://search.cpan.org/~stellar/HTML-CTPP2-2.4.1/
Perl interface for CTPP2 library
----
HTML-MobileJpCSS-0.01
http://search.cpan.org/~komoriya/HTML-MobileJpCSS-0.01/
css inliner and converter
----
IO-Interactive-0.0.5
http://search.cpan.org/~bdfoy/IO-Interactive-0.0.5/
Utilities for interactive I/O
----
IO-Lambda-1.03
http://search.cpan.org/~karasik/IO-Lambda-1.03/
non-blocking I/O as lambda calculus
----
IO-Socket-SSL-1.20
http://search.cpan.org/~sullr/IO-Socket-SSL-1.20/
Nearly transparent SSL encapsulation for IO::Socket::INET.
----
JSON-Any-1.19
http://search.cpan.org/~perigrin/JSON-Any-1.19/
Wrapper Class for the various JSON classes.
----
LWP-Curl-0.06
http://search.cpan.org/~lorn/LWP-Curl-0.06/
LWP methods implementation with Curl engine
----
Linux-Taskstats-Read-7.00
http://search.cpan.org/~bbb/Linux-Taskstats-Read-7.00/
Read Linux taskstats structures
----
Mail-IMAPClient-3.13
http://search.cpan.org/~markov/Mail-IMAPClient-3.13/
An IMAP Client API
----
Module-Text-Template-Build-0.04.8
http://search.cpan.org/~nkh/Module-Text-Template-Build-0.04.8/
Create a module based on a template to use with Module::Build
----
NetSuite-1.03
http://search.cpan.org/~jlloyd/NetSuite-1.03/
A perl-based interface to the NetSuite SuiteTalk (Web Services) API
----
ORDB-CPANTS-0.01
http://search.cpan.org/~adamk/ORDB-CPANTS-0.01/
An ORM for the published CPANTS SQLite database
----
ORDB-CPANTesters-0.01
http://search.cpan.org/~adamk/ORDB-CPANTesters-0.01/
An ORLite-based ORM Database API
----
ORDB-CPANTesters-0.02
http://search.cpan.org/~adamk/ORDB-CPANTesters-0.02/
An ORLite-based ORM Database API
----
ORDB-CPANTesters-0.03
http://search.cpan.org/~adamk/ORDB-CPANTesters-0.03/
An ORM for the published CPAN Testers SQLite database
----
ORLite-Mirror-0.08
http://search.cpan.org/~adamk/ORLite-Mirror-0.08/
Extend ORLite to support remote SQLite databases
----
ORLite-Mirror-0.09
http://search.cpan.org/~adamk/ORLite-Mirror-0.09/
Extend ORLite to support remote SQLite databases
----
ORLite-Pod-0.05
http://search.cpan.org/~adamk/ORLite-Pod-0.05/
Documentation generator for ORLite
----
ORLite-Pod-0.06
http://search.cpan.org/~adamk/ORLite-Pod-0.06/
Documentation generator for ORLite
----
POD-Tested-0.06.4
http://search.cpan.org/~nkh/POD-Tested-0.06.4/
Test the code in your POD and generates POD.
----
Parse-BACKPAN-Packages-0.34
http://search.cpan.org/~lbrocard/Parse-BACKPAN-Packages-0.34/
Provide an index of BACKPAN
----
Parse-ISF-0.0102
http://search.cpan.org/~razor/Parse-ISF-0.0102/
Parse the ISF file generated by certain models of Tektronix oscillascope (TDS 3000, DPO 4000, etc)
----
Parse-Marpa-1.001_003
http://search.cpan.org/~jkegl/Parse-Marpa-1.001_003/
Generate Parsers from any BNF grammar
----
Parse-Stallion-0.60
http://search.cpan.org/~arthur/Parse-Stallion-0.60/
EBNF based regexp backtracking parser and tree evaluator.
----
RTFM-Extension-ArticleTemplates-0.02
http://search.cpan.org/~falcone/RTFM-Extension-ArticleTemplates-0.02/
turns articles into dynamic templates.
----
Rose-DBx-Object-Renderer-0.41
http://search.cpan.org/~danny/Rose-DBx-Object-Renderer-0.41/
Web UI Rendering for Rose::DB::Object
----
Set-Object-1.27
http://search.cpan.org/~samv/Set-Object-1.27/
set of objects and strings
----
Simo-0.03_05
http://search.cpan.org/~kimoto/Simo-0.03_05/
Very simple framework for Object Oriented Perl.
----
Sys-Mmap-Simple-0.07
http://search.cpan.org/~leont/Sys-Mmap-Simple-0.07/
Memory mapping made simple and safe.
----
TAP-Harness-Remote-1.10
http://search.cpan.org/~alexmv/TAP-Harness-Remote-1.10/
Run tests on a remote server farm
----
Test-POE-Client-TCP-0.08
http://search.cpan.org/~bingos/Test-POE-Client-TCP-0.08/
A POE Component providing TCP client services for test cases
----
Test-POE-Server-TCP-0.14
http://search.cpan.org/~bingos/Test-POE-Server-TCP-0.14/
A POE Component providing TCP server services for test cases
----
Text-DeDuper-1.01
http://search.cpan.org/~janpom/Text-DeDuper-1.01/
near duplicates detection module
----
WWW-Shorten-Qwer-1.00
http://search.cpan.org/~davecross/WWW-Shorten-Qwer-1.00/
Perl interface to qwer.org
----
Web-Scraper-0.26
http://search.cpan.org/~miyagawa/Web-Scraper-0.26/
Web Scraping Toolkit inspired by Scrapi
----
WebService-Solr-0.03
http://search.cpan.org/~bricas/WebService-Solr-0.03/
Module to interface with the Solr (Lucene) webservice
----
xcruciate-005
http://search.cpan.org/~melonman/xcruciate-005/
----
xcruciate-005b
http://search.cpan.org/~melonman/xcruciate-005b/
----
xcruciate-unitconfig-005
http://search.cpan.org/~melonman/xcruciate-unitconfig-005/
----
xcruciate-utils-005
http://search.cpan.org/~melonman/xcruciate-utils-005/
----
xcruciate-xcruciateconfig-005
http://search.cpan.org/~melonman/xcruciate-xcruciateconfig-005/
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: Thu, 15 Jan 2009 18:55:29 -0800 (PST)
From: hualibao405@gmail.com
Subject: Popular Concord Watches
Message-Id: <15f788c0-a6f1-4ec5-837e-e90705529993@20g2000yqt.googlegroups.com>
Popular Concord Watches
Popular Watches: http://www.watchebay.net/
Popular Concord Watches: http://www.watchebay.net/Concord-Watches.html
Other Popular Concord Watches Watches World Series :
Concord Bennington World :
http://www.watchebay.net/Concord-Bennington.html
Concord Bennington Steel Black Mens Watch 0310667 :
http://www.watchebay.net/Concord-Bennington-Steel-Black-Mens-Watch-0310667.html
Concord Bennington Steel Black Mens Watch 0310664 :
http://www.watchebay.net/Concord-Bennington-Steel-Black-Mens-Watch-0310664.html
Concord Bennington Steel Black Mens Watch 0310682 :
http://www.watchebay.net/Concord-Bennington-Steel-Black-Mens-Watch-0310682.html
Concord Bennington Steel Black Mens Watch 0310700 :
http://www.watchebay.net/Concord-Bennington-Steel-Black-Mens-Watch-0310700.html
Concord Bennington Chronograph Steel Mens Watch 0311122 :
http://www.watchebay.net/Concord-Bennington-Chronograph-Steel-Mens-Watch-0311122.html
Concord Mariner World :
http://www.watchebay.net/Concord-Mariner.html
Concord Mariner Mens Watch 0309729 :
http://www.watchebay.net/Concord-Mariner-Mens-Watch-0309729.html
Concord Mariner 18kt Yellow Gold And Steel Ladies Watch 0309772 :
http://www.watchebay.net/Concord-Mariner-18kt-Yellow-Gold-And-Steel-Ladies-Watch-0309772.html
Concord Saratoga World :
http://www.watchebay.net/Concord-Saratoga.html
Concord Saratoga SL 18kt Yellow Gold Diamond Ladies Watch 0307574 :
http://www.watchebay.net/Concord-Saratoga-SL-18kt-Yellow-Gold-Diamond-Ladies-Watch-0307574.html
Concord Saratoga Chronograph Steel Mens Watch 0310986 :
http://www.watchebay.net/Concord-Saratoga-Chronograph-Steel-Mens-Watch-0310986.html
Concord Saratoga Sl Ladies Watch 0301003 :
http://www.watchebay.net/Concord-Saratoga-Sl-Ladies-Watch-0301003.html
Concord La Scala 18kt White Gold Diamond Ladies Watch 0309200 :
http://www.watchebay.net/Concord-La-Scala-18kt-White-Gold-Diamond-Ladies-Watch-0309200.html
Concord Saratoga Steel Black Mens Watch 0310451 :
http://www.watchebay.net/Concord-Saratoga-Steel-Black-Mens-Watch-0310451.html
Concord Saratoga Diamond 18kt Yellow Gold And Steel Mini Ladies Watch
0310566 :
http://www.watchebay.net/Concord-Saratoga-Diamond-18kt-Yellow-Gold-And-Steel-Mini-Ladies-Watch-0310566.html
Concord Saratoga Diamond 18kt Yellow Gold Mini Ladies Watch 0310823 :
http://www.watchebay.net/Concord-Saratoga-Diamond-18kt-Yellow-Gold-Mini-Ladies-Watch-0310823.html
Concord Saratoga 18kt Yellow Gold Mens Watch 0310821 :
http://www.watchebay.net/Concord-Saratoga-18kt-Yellow-Gold-Mens-Watch-0310821.html
Concord Saratoga 18kt Yellow Gold And Steel Mens Watch 0310563 :
http://www.watchebay.net/Concord-Saratoga-18kt-Yellow-Gold-And-Steel-Mens-Watch-0310563.html
Concord Saratoga Diamond Steel Mini Ladies Watch 0310470 :
http://www.watchebay.net/Concord-Saratoga-Diamond-Steel-Mini-Ladies-Watch-0310470.html
Concord Concond La Scala World :
http://www.watchebay.net/Concord-Concond-La-Scala.html
Concord La Scala Diamond Steel Black Rubber Mens Watch 0310143 :
http://www.watchebay.net/Concord-La-Scala-Diamond-Steel-Black-Rubber-Mens-Watch-0310143.html
Concord La Scala Diamond Steel Ladies Watch 0309663 :
http://www.watchebay.net/Concord-La-Scala-Diamond-Steel-Ladies-Watch-0309663.html
Concord La Scala Mens Watch 0310162 :
http://www.watchebay.net/Concord-La-Scala-Mens-Watch-0310162.html
Concord La Scala Steel Silver Ladies Watch 0309661 :
http://www.watchebay.net/Concord-La-Scala-Steel-Silver-Ladies-Watch-0309661.html
Concord La Scala Diamond Mini Ladies Watch 0311031 :
http://www.watchebay.net/Concord-La-Scala-Diamond-Mini-Ladies-Watch-0311031.html
Concord La Scala Diamond Steel Ladies Watch 0310113 :
http://www.watchebay.net/Concord-La-Scala-Diamond-Steel-Ladies-Watch-0310113.html
Concord La Scala Diamond Pink Unisex Watch 0310110 :
http://www.watchebay.net/Concord-La-Scala-Diamond-Pink-Unisex-Watch-0310110.html
Concord La Scala Diamond Blue Mother-of-pearl Steel Ladies Watch
0309743 :
http://www.watchebay.net/Concord-La-Scala-Diamond-Blue-Mother-of-pearl-Steel-Ladies-Watch-0309743.html
Concord La Scala Mens Watch 0309731 :
http://www.watchebay.net/Concord-La-Scala-Mens-Watch-0309731.html
Concord La Scala Mens Watch 0310163 :
http://www.watchebay.net/Concord-La-Scala-Mens-Watch-0310163.html
Concord Sportivo World :
http://www.watchebay.net/Concord-Sportivo.html
Concord Sportivo Diamond Steel Ladies Watch 0310412 :
http://www.watchebay.net/Concord-Sportivo-Diamond-Steel-Ladies-Watch-0310412.html
Concord Sportivo Steel Mens Watch 0310399 :
http://www.watchebay.net/Concord-Sportivo-Steel-Mens-Watch-0310399.html
Concord Sportivo Steel Chronograph Mens Watch 0310402 :
http://www.watchebay.net/Concord-Sportivo-Steel-Chronograph-Mens-Watch-0310402.html
Concord Sportivo Steel Ladies Watch 0310404 :
http://www.watchebay.net/Concord-Sportivo-Steel-Ladies-Watch-0310404.html
Concord Sportivo Steel Black Ladies Watch 0310401 :
http://www.watchebay.net/Concord-Sportivo-Steel-Black-Ladies-Watch-0310401.html
Concord Carlton World :
http://www.watchebay.net/Concord-Carlton.html
Concord Carlton Steel Mens Watch 0310661 :
http://www.watchebay.net/Concord-Carlton-Steel-Mens-Watch-0310661.html
Concord Carlton Steel Blue Mens Watch 0310704 :
http://www.watchebay.net/Concord-Carlton-Steel-Blue-Mens-Watch-0310704.html
Concord Carlton Diamond Mother-of-Pearl Mini Ladies Watch 0310709 :
http://www.watchebay.net/Concord-Carlton-Diamond-Mother-of-Pearl-Mini-Ladies-Watch-0310709.html
Concord Carlton Steel Blue Ladies Mini Watch 0310708 :
http://www.watchebay.net/Concord-Carlton-Steel-Blue-Ladies-Mini-Watch-0310708.html
Concord Impressario World :
http://www.watchebay.net/Concord-Impressario.html
Concord Impresario Steel Chronograph Mens Watch 0308968 :
http://www.watchebay.net/Concord-Impresario-Steel-Chronograph-Mens-Watch-0308968.html
Concord Impresario 18kt Yellow Gold Mens Watch 0309092 :
http://www.watchebay.net/Concord-Impresario-18kt-Yellow-Gold-Mens-Watch-0309092.html
Concord Veneto World :
http://www.watchebay.net/Concord-Veneto.html
Concord Veneto Diamond 18kt White Gold Ladies Watch 0310186 :
http://www.watchebay.net/Concord-Veneto-Diamond-18kt-White-Gold-Ladies-Watch-0310186.html
Concord Les Palais World :
http://www.watchebay.net/Concord-Les-Palais.html
Concord Les Palais 14kt Yellow Gold Mens Watch 0390945 :
http://www.watchebay.net/Concord-Les-Palais-14kt-Yellow-Gold-Mens-Watch-0390945.html
Concord Les Palais 14kt Yellow Gold Mens Watch 0393263 :
http://www.watchebay.net/Concord-Les-Palais-14kt-Yellow-Gold-Mens-Watch-0393263.html
Concord Les Palais Diamond 14kt Yellow Gold Ladies Watch 0390752 :
http://www.watchebay.net/Concord-Les-Palais-Diamond-14kt-Yellow-Gold-Ladies-Watch-0390752.html
Concord La Tour World :
http://www.watchebay.net/Concord-La-Tour.html
Concord La Tour 14kt Yellow Gold Mens Watch 0391020 :
http://www.watchebay.net/Concord-La-Tour-14kt-Yellow-Gold-Mens-Watch-0391020.html
Concord La Tour 14kt Yellow Gold Ladies Watch 0391021 :
http://www.watchebay.net/Concord-La-Tour-14kt-Yellow-Gold-Ladies-Watch-0391021.html
------------------------------
Date: Thu, 15 Jan 2009 17:34:44 -0700
From: George <george@example.invalid>
Subject: Re: processing text
Message-Id: <bjnsxnvdmneh.ebaqkidh7w5a$.dlg@40tude.net>
On Thu, 15 Jan 2009 11:41:49 -0800, Tim Greer wrote:
> George wrote:
>
>>
>> I thought I was past trouble working with simple file manipulations,
>> but I seem to be stumped here again:
>>
>>
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>>
>> my $filename = 'larry1.txt';
>> my $outfile = 'processed1.txt'
>
> You forgot a semicolon there. = 'processed1.txt';
>
>> open my $fh, '<', $filename or die "cannot open $filename: $!";
>> open my $gh, '>', $outfile or die "cannot open $filename: $!";
>> while (<$fh>) {
>> s/%%/%\n/;
>> print $gh, $_;
>
> print $gh $_; # no comma.
>
>> }
>> close($fh)
>
> You forgot ;
>
>> close($gh)
>>
>
> You don't need a semi-colon on the last close statement, since that's
> the end of the script, but you should probably add one anyway,
> especially if code could follow.
>
> You also might want to add a warning if the filehandle fails to close,
> if it's anything important.
Thanks all for responses. This works famously:
#!/usr/bin/perl
use strict;
use warnings;
my $filename = 'larry1.txt';
my $outfile = 'processed1.txt';
open my $fh, '<', $filename or die "cannot open $filename: $!";
open my $gh, '>', $outfile or die "cannot open $filename: $!";
while (<$fh>) {
s/%%/%\n/;
print $gh $_;
}
close($fh);
close($gh);
# perl larry1.pl
When I give it to dialog to use for a randomsig, it works (see below) I
think I'll use this sig for c.l.p.misc for its pedagogical value. My days
as george are numbered (thank goodness). I think I'll remove some of the
newlines, so the sig is less than 4 lines like it should be.
Now I'm gonna try text processing with a more difficult data set.
--
George
if (instr(buf,sys_errlist[errno])) /* you don't see this */
-- Larry Wall in eval.c from the perl source code
------------------------------
Date: Thu, 15 Jan 2009 17:39:44 -0700
From: George <george@example.invalid>
Subject: Re: processing text
Message-Id: <18h1ge1i3fn21.1txcrkanf3a2g$.dlg@40tude.net>
On Thu, 15 Jan 2009 14:19:33 -0500, Uri Guttman wrote:
>>>>>> "G" == George <george@example.invalid> writes:
>
> G> I thought I was past trouble working with simple file manipulations, but I
> G> seem to be stumped here again:
>
>
> G> #!/usr/bin/perl
> G> use strict;
> G> use warnings;
>
> G> my $filename = 'larry1.txt';
> G> my $outfile = 'processed1.txt'
>
> missing ;
>
> that causes that and the next line to be a single long statement which
> is parsed wierdly and spits out lots of error.
>
> G> open my $fh, '<', $filename or die "cannot open $filename: $!";
> G> open my $gh, '>', $outfile or die "cannot open $filename: $!";
> G> while (<$fh>) {
> G> s/%%/%\n/;
> G> print $gh, $_;
>
> the file handle arg to print doesn't get a comma afterwards
>
> G> }
> G> close($fh)
> G> close($gh)
>
> uri
Thx uri.
I looked back over this error message, and it doesn't "look like" I failed
to use a ;. I guess one of the things you always have to look for is if
you get an error on line 7, go look to see if line 6 is terminated
properly.
I have to admit that I don't understand at least half of these quotes.
--
George
Maybe we should take a clue from FTP and put in an option like "print
hash marks on every 1024 iterations". :-)
-- Larry Wall in <199807171819.LAA13771@wall.org>
------------------------------
Date: Thu, 15 Jan 2009 17:44:29 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: processing text
Message-Id: <2ERbl.24656$H12.9285@newsfe12.iad>
George wrote:
> My days
> as george are numbered (thank goodness).
Thank God! The 20th is my birthday and I couldn't think of a better
present (I'm not being sarcastic).
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
------------------------------
Date: Fri, 16 Jan 2009 14:17:25 +1300
From: "Tintin@teranews.com" <Tintin@teranews.com>
Subject: Re: unable to open file
Message-Id: <ffRbl.12072$g23.10366@newsfe01.iad>
Tad J McClellan wrote:
> Tintin@teranews.com <Tintin@teranews.com> wrote:
>> Tad J McClellan wrote:
>>> Tintin@teranews.com <Tintin@teranews.com> wrote:
>>>
>>>> Forgot to mention that the standard Perl FindBin module is useful for
>>>> working out working directories.
>>>
>>> No it isn't.
>>>
>>> It is useful for allowing relative paths in "use lib".
>>>
>>> It does not help with normal filesystem access.
>> OK, poorly phrased.
>
>
> No, not poorly phrased, incorrect.
>
>
>> What I meant to say is that's it's useful for
>> finding out the directory where the script was invoked from as this can
>> be used to reference relative paths.
>
>
>> cat ~/findbin
> #!/usr/bin/perl
> use warnings;
> use strict;
> use FindBin qw($Bin);
>
> print "bin=$Bin\n";
>
>> cd ~
>> ./findbin
> bin=/home/tadmc
>> cd /tmp
> ~/findbin
> bin=/home/tadmc
>
>
> FindBin tells you where the program is.
>
> Where the program is does not matter with regard to relative paths.
It does in relation to the OP's question. It is quite common to
reference configuration files or similar from a Perl/CGI script in
relation to the location where the script exists.
As we know, the CGI spec does not guarantee the current working
directory is the same as the script location, so knowing the path
relative to the directory the Perl script lives in can be much more
useful than the current working directory.
------------------------------
Date: Thu, 15 Jan 2009 17:46:48 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: What do you need to have to be considered a Master at Perl?
Message-Id: <cGRbl.24657$H12.19366@newsfe12.iad>
sln@netherlands.com wrote:
> I'm just going to jumstart the topic with these:
>
> - Technically expert at Regular Expressions
> - Analytically and Creative at Regular Expressions
> - Thoroughly adept at map/split/grep, know limitations
> - Arrays and Hashes, including slices and references
>
> Add some more...
>
> sln
And a lot more...
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
------------------------------
Date: Fri, 16 Jan 2009 01:52:24 GMT
From: sln@netherlands.com
Subject: Re: What do you need to have to be considered a Master at Perl?
Message-Id: <s1qvm4tmr0h000tcpnf0nh98ki0v4bk54r@4ax.com>
On Thu, 15 Jan 2009 17:46:48 -0800, Tim Greer <tim@burlyhost.com> wrote:
>sln@netherlands.com wrote:
>
>> I'm just going to jumstart the topic with these:
>>
>> - Technically expert at Regular Expressions
>> - Analytically and Creative at Regular Expressions
>> - Thoroughly adept at map/split/grep, know limitations
>> - Arrays and Hashes, including slices and references
>>
>> Add some more...
>>
>> sln
>
>And a lot more...
Some more, add some
sln
------------------------------
Date: Thu, 15 Jan 2009 22:16:42 -0500
From: "~greg" <g_m@remove-comcast.net>
Subject: Re: What do you need to have to be considered a Master at Perl?
Message-Id: <Hp-dnV2z2ZskZvLUnZ2dnUVZ_sudnZ2d@giganews.com>
<sln@netherlands.com> wrote in message news:s4gvm49sckabo1nt3a6rpmsluqo00kna75@4ax.com...
> I'm just going to jumstart the topic with these:
>
> - Technically expert at Regular Expressions
> - Analytically and Creative at Regular Expressions
> - Thoroughly adept at map/split/grep, know limitations
> - Arrays and Hashes, including slices and references
>
> Add some more...
>
> sln
That's elementary.
When you can read any given module and not
see anything new in it, then, maybe, you can say
you know the language. I've been using it for
almost 10 years, And in that time there's hardly
been a day that I haven't learnt something new about it.
It's like, every day, a new christmas present.
Yesterday I learnt how to match balanced parentheses:
use strict;
use warnings;
$|=1;
my $test = 'this is a test of ((((hugs))))';
my $P;
$P = qr{\((?:(?>[^()]+)|(??{$P}))*\)};
$test =~ s/$P/bugs/;
print $test;
------------------------------
Date: Thu, 15 Jan 2009 22:05:54 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: What do you need to have to be considered a Master at Perl?
Message-Id: <7tVbl.90402$zJ2.29127@newsfe23.iad>
sln@netherlands.com wrote:
> On Thu, 15 Jan 2009 17:46:48 -0800, Tim Greer <tim@burlyhost.com>
> wrote:
>
>>sln@netherlands.com wrote:
>>
>>> I'm just going to jumstart the topic with these:
>>>
>>> - Technically expert at Regular Expressions
>>> - Analytically and Creative at Regular Expressions
>>> - Thoroughly adept at map/split/grep, know limitations
>>> - Arrays and Hashes, including slices and references
>>>
>>> Add some more...
>>>
>>> sln
>>
>>And a lot more...
>
> Some more, add some
>
> sln
You listed map/split/grep and mentioned regular expressions. You then
mentioned arrays, hashes and slices/references. That's pretty
rudementary. There is a heck of a lot more someone would need to know
(well) to be considered an expert. I don't see the point of listing a
ton of things, and it's hardly about listing things that would actually
define someone as an expert (or "master") anyway. I don't see the
purpose of this thread, so I won't post to it again.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
------------------------------
Date: Thu, 15 Jan 2009 23:03:01 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: What do you need to have to be considered a Master at Perl?
Message-Id: <16c0n4l98pekbv9l7rae41jv69mhm5vcal@4ax.com>
Tim Greer <tim@burlyhost.com> wrote:
[I don't see posts from robic0 aka sln, therefore answering to you]
>sln@netherlands.com wrote:
>> Some more, add some
Trivial: please see "perldoc perl" for a comprehensive list.
jue
------------------------------
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 2132
***************************************