[30753] in Perl-Users-Digest
Perl-Users Digest, Issue: 1998 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 23 03:09:54 2008
Date: Sun, 23 Nov 2008 00:09:13 -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 Sun, 23 Nov 2008 Volume: 11 Number: 1998
Today's topics:
=?KOI8-U?B?4cvBxMXNptEg1NLBxMnDpsrOz8fPIMfVzsbV?= hccarlash@gmail.com
Re: atoi/atof <hjp-usenet2@hjp.at>
Re: atoi/atof <hjp-usenet2@hjp.at>
Re: atoi/atof <nospam-abuse@ilyaz.org>
DBD::Pg installation under Vista <m.rombach89@googlemail.com>
Re: DBD::Pg installation under Vista <sisyphus359@gmail.com>
failed perl upgrade afith13@gmail.com
Re: failed perl upgrade <xemoth@gmail.com>
Re: failed perl upgrade <xemoth@gmail.com>
Re: model pre teen underwear - Free vorphey@gmail.com
Re: moving/renaming directory between NFS mounts <joe@inwap.com>
new CPAN modules on Sun Nov 23 2008 (Randal Schwartz)
Re: post increment or pre increment? <joe@inwap.com>
Re: regular expression to detect dos filenames <rvtol+news@isolution.nl>
Re: regular expression to detect dos filenames (fidokomik\)
Re: regular expression to detect dos filenames <joe@inwap.com>
Re: Restarting a Program mid stream <pgodfrin@gmail.com>
Re: Restarting a Program mid stream <pgodfrin@gmail.com>
Re: using print<<`EOC` <pgodfrin@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 22 Nov 2008 13:02:47 -0800 (PST)
From: hccarlash@gmail.com
Subject: =?KOI8-U?B?4cvBxMXNptEg1NLBxMnDpsrOz8fPIMfVzsbV?=
Message-Id: <5169c37e-fc43-40c9-95c3-b84fb82b9dc9@c1g2000yqg.googlegroups.com>
4cvBxMXNptEg1NLBxMnDpsrOz8fPIMfVzsbVCi4KLgouCioqKioqKiri7OH07OEg++vv7OEg4u/q
7/fp6CDt6fP05eP09yoqKioqKioqCmh0dHA6Ly9nb25nZnUuY29tLnVhLwpodHRwOi8vZ29uZ2Z1
LmNvbS51YS8KaHR0cDovL2dvbmdmdS5jb20udWEvCioqKuv17Pj09fLu6eog7/Pl8uXk7+sg4vLp
9O/n7+zv9+noIPPp6O/34SoqCi4KLgouCi4KLgouCi4KLgouCi4KLgouCuHLwcTFzabRINTSwcTJ
w6bKzs/HzyDH1c7G1Qo=
------------------------------
Date: Sat, 22 Nov 2008 21:27:24 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: atoi/atof
Message-Id: <slrngigqpd.s9a.hjp-usenet2@hrunkner.hjp.at>
On 2008-11-17 19:40, Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
><hjp-usenet2@hjp.at>], who wrote in article <slrngi3638.pv6.hjp-usenet2@hrunkner.hjp.at>:
>> Unfortunately, there is no reverse function in C: sprintf generates a
>> fixed number of digits after the decimal point, which is either too
>> little or too much. So that's something perl has to do itself.
>
> Nope, Perl's semantic coincides (unfortunately!) with sprintf()'s
> one. It may have its own implementation of sprintf(), but no more
> than that...
I may be overlooking something obvious, but which format option will
produce the same output as perl's float->string conversion?
> The third problem is that one wants to minimize loads on
> newsgroup/mailing-list "why numeric calculations are so weird in
> Perl"; so the precision of N-->S is deliberately chosen so low, that
> indications of weirdness of FP arithmetic are not manifested as often
> as it would be with "precise" algorithms...
Argh! I've had that discussion with HP several years ago. Fortunately
they conceded the point that FORTRAN should not deliberatly introduce
errors to cater to the expectations of naive users. I don't think perl
should either.
hp
------------------------------
Date: Sat, 22 Nov 2008 21:42:22 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: atoi/atof
Message-Id: <slrngigrlf.s9a.hjp-usenet2@hrunkner.hjp.at>
On 2008-11-17 23:27, sln@netherlands.com <sln@netherlands.com> wrote:
> On Mon, 17 Nov 2008 17:14:28 +0100, "Peter J. Holzer" <hjp-usenet2@hjp.at> wrote:
>
>>ANSI C has a strtod function for string -> floating point conversion.
[...]
>>Unfortunately, there is no reverse function in C: sprintf generates a
>>fixed number of digits after the decimal point, which is either too
>>little or too much. So that's something perl has to do itself.
>>
>>> Its the other way around, number to string isin't trivial.
>>
>>Conversion to and from integers is trivial (typical exercise for first
>>semester students). Conversion to and from FP numbers isn't trivial in
>>either direction. The situation is only asymmetric because C already has
>>a nice function for conversion from strings to numbers (which shields
>>the C programmer from all the hairy stuff), but not for the
>>reverse.
>
> Well, as you said ANSI is just a specification. But its specific enough.
It doesn't give any guarantees about precision for FP operations. An
implementation may get strtod quite wrong and still be compliant.
> I'm going out on a limb here and listing a specific implementation for
> Microsofts C libraries, ie: all Window's platforms:
>
> ANSI Windows
> String->Number Number->String
> ----------------- ----------------
> atoi/atol/strol _itoa/_ltoa
> atof/strtod _fcvt/_ecvt
>
>
> I think these are C. Seems unusual Perl is built on
> platforms without using thier ANSI and/or OS specific functions.
man fcvt:
| NOTES
| These functions are obsolete. Instead, sprintf(3) is recommended.
AFAICS, ecvt and fcvt don't give you anything sprintf doesn't.
> It just never occurred to me these standard calls are not made,
> and home-grown routines are used instead. Its got to be slower.
Speed is indeed a problem in perl, which does a lot of implicit
conversion from string to number and back. But lack of accuracy is IMHO
the bigger problem.
> Apparently there is no ASNI equivalent Number->String. Most
> platforms have them though.
>
> String->Number is a one way street to load parameters.
> Number->String is a view.
> There should be no circular input/output relationship between them.
On the contrary. There must be a circular relationship between them, if
you want to be able to write numbers to a file (or send them via the
network) and read them back. And for perl those conversions even occur
internally, so they must be reversible.
hp
------------------------------
Date: Sun, 23 Nov 2008 07:17:34 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: atoi/atof
Message-Id: <ggb02e$1qu4$1@agate.berkeley.edu>
[A complimentary Cc of this posting was NOT [per weedlist] sent to
Peter J. Holzer
<hjp-usenet2@hjp.at>], who wrote in article <slrngigqpd.s9a.hjp-usenet2@hrunkner.hjp.at>:
> > Nope, Perl's semantic coincides (unfortunately!) with sprintf()'s
> > one. It may have its own implementation of sprintf(), but no more
> > than that...
> I may be overlooking something obvious, but which format option will
> produce the same output as perl's float->string conversion?
Probably %g with precision governed by $#, IIRC.
> > The third problem is that one wants to minimize loads on
> > newsgroup/mailing-list "why numeric calculations are so weird in
> > Perl"; so the precision of N-->S is deliberately chosen so low, that
> > indications of weirdness of FP arithmetic are not manifested as often
> > as it would be with "precise" algorithms...
>
> Argh! I've had that discussion with HP several years ago. Fortunately
> they conceded the point that FORTRAN should not deliberatly introduce
> errors to cater to the expectations of naive users. I don't think perl
> should either.
10 years ago the newsgroup was quite overflown by messages like this.
I agree that the situation today is significantly different, so the
old preferences might became easier to fight with...
Yours,
Ilya
------------------------------
Date: Sat, 22 Nov 2008 14:50:18 -0800 (PST)
From: Martin Rombach <m.rombach89@googlemail.com>
Subject: DBD::Pg installation under Vista
Message-Id: <46fec5b8-4f01-49ee-9d48-5c4b40b9bd1a@v15g2000yqn.googlegroups.com>
Hey,
i want to access PostgreSQL 8.3 from Perl 5.10.0 under Vista.
Therefore I need the DBD::Pg driver. Because it isn't available on
ActiveState I downloaded a binary version from PgFoundry and installed
it with ppm.
A test script fails since "msvcr80.dll" is missing. Runnig the VisualC+
+-Runtime installer didn't helped, so I copied the file to System32
which worked fine, as a new error "R6034" occured. I copied
pg.dll.manifest to Perl-bin which worked on my XP machine, but not on
Vista. How can I get DBD::Pg running on my Vista computer?
Martin
------------------------------
Date: Sat, 22 Nov 2008 20:06:00 -0800 (PST)
From: sisyphus <sisyphus359@gmail.com>
Subject: Re: DBD::Pg installation under Vista
Message-Id: <46355e13-ca63-4d8c-85a8-c822f58c2c25@s1g2000prg.googlegroups.com>
> A test script fails since "msvcr80.dll" is missing. Runnig the VisualC+
> +-Runtime installer didn't helped, so I copied the file to System32
> which worked fine, as a new error "R6034" occured. I copied
> pg.dll.manifest to Perl-bin which worked on my XP machine, but not on
> Vista. How can I get DBD::Pg running on my Vista computer?
I take it you've now got msvcr80.dll installed in a location where
it's being found ok.
Do you have any additional info on the "R6034" error. (I don't know
what that is.)
As regards the pg.dll.manifest, could it be that it needs to be placed
in perl/site/bin instead of perl/bin ? (It probably depends upon where
pg.dll is located.)
Cheers,
Rob
------------------------------
Date: Sat, 22 Nov 2008 22:48:54 -0800 (PST)
From: afith13@gmail.com
Subject: failed perl upgrade
Message-Id: <3bfbc019-6f64-4a44-9b0c-80c293113771@s9g2000prg.googlegroups.com>
I just started learning perl and I currently have perl 5.8.8 installed
on mac os x 10.5.5.
I tried to install perl 5.8.9 rc1 but the make install command failed
because it couldn't find my C compiler.
Could this corrupt perl 5.8.8? How do I find/fix the C compiler so I
can complete the update?
------------------------------
Date: Sat, 22 Nov 2008 23:21:31 -0800 (PST)
From: Owen <xemoth@gmail.com>
Subject: Re: failed perl upgrade
Message-Id: <92d057f5-3295-4a47-a9f2-f70b99ba6de2@r15g2000prd.googlegroups.com>
On Nov 23, 5:48=A0pm, afit...@gmail.com wrote:
> I just started learning perl and I currently have perl 5.8.8 installed
> on mac os x 10.5.5.
> I tried to install perl 5.8.9 rc1 but the make install command failed
> because it couldn't find my C compiler.
> Could this corrupt perl 5.8.8? How do I find/fix the C compiler so I
> can complete the update?
How about installing the C compiler?
What are you using, if it is a distro, they mostly have packages you
can install.
Then having installed the compiler, read the INSTALL or README in the
perl package and try and understand what you are doing, otherwise you
might clobber your 5.8.8.
Good luck
Owen
Owen
------------------------------
Date: Sat, 22 Nov 2008 23:24:21 -0800 (PST)
From: Owen <xemoth@gmail.com>
Subject: Re: failed perl upgrade
Message-Id: <7997704f-9f6a-4678-86a7-a6726ba02b41@a3g2000prm.googlegroups.com>
On Nov 23, 6:21=A0pm, Owen <xem...@gmail.com> wrote:
> On Nov 23, 5:48=A0pm, afit...@gmail.com wrote:
>
> > I just started learning perl and I currently have perl 5.8.8 installed
> > on mac os x 10.5.5.
> > I tried to install perl 5.8.9 rc1 but the make install command failed
> > because it couldn't find my C compiler.
> > Could this corrupt perl 5.8.8? How do I find/fix the C compiler so I
> > can complete the update?
>
> How about installing the C compiler?
>
> What are you using, if it is a distro, they mostly have packages you
> can install.
>
> Then having installed the compiler, read the INSTALL or README in the
> perl package and try and understand what you are doing, otherwise you
> might clobber your 5.8.8.
>
> Good luck
You can probably safely ignore my reply as I did not note the Mac OS
part. Wait for a Mac Man to answer!
------------------------------
Date: Sat, 22 Nov 2008 05:59:48 -0800 (PST)
From: vorphey@gmail.com
Subject: Re: model pre teen underwear - Free
Message-Id: <62a4dc04-be85-4ac6-9768-f468b8320488@k8g2000yqn.googlegroups.com>
The hottest young beauty on young porn tube:
http://anyfreeporn.com/young-teens-porn-tube/index.html
Take a look at my astounding salacious girlfriend with the sweetest
shaven pussy on young porn tube. I love nothing more than spearing
this dripping cunt with my mighty hard sword. Now everyone can make
sure of that!
We=92ve got a big home porn video collection on young porn tube and
today we are burning to demonstrate you the hottest sets. Feel free to
see the most piquant vids and become the first one who enjoys nasty
sex games of mine and my nice looking teen flame.
My amazing cutie on young porn tube:
http://anyfreeporn.com/young-teens-tube/index.html
Oh.. this cutie is the most tempting bitch I=92ve ever made love with. I
can do nothing with my desire when she=92s posing stripped in front of
me. Now you can see my honey completely naked on young porn tube.
Have a look at my dirty girl who is burning to demonstrate her
tempting body to everyone. She=92s my darling, but I=92m not against her
showing you all the peculiarities of her adorable naked body. We=92ll
show you only the best private young home porn vids.
------------------------------
Date: Sat, 22 Nov 2008 23:23:50 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: moving/renaming directory between NFS mounts
Message-Id: <8JedncmVitScmLTUnZ2dnUVZ_vzinZ2d@comcast.com>
Marten Lehmann wrote:
> I want to move a complete directory by perl from one NFS mount to
> another. ... I couldn't find a helpful modul. Any ideas?
What do you mean, "couldn't find a helpful module"?
Go to http://search.cpan.org and enter "File::Copy recursive" in the
search box. How hard is that?
-Joe
------------------------------
Date: Sun, 23 Nov 2008 05:42:23 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Nov 23 2008
Message-Id: <KAruIn.FrA@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.
Acme-Archive-Mbox-0.01
http://search.cpan.org/~iank/Acme-Archive-Mbox-0.01/
Mbox as an archive format.
----
App-ZofCMS-Plugin-FormChecker-0.0321
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-FormChecker-0.0321/
plugin to check HTML form data.
----
CatalystX-CRUD-0.33
http://search.cpan.org/~karman/CatalystX-CRUD-0.33/
CRUD framework for Catalyst applications
----
Chart-OFC2-0.01
http://search.cpan.org/~jkutej/Chart-OFC2-0.01/
Generate html and data files for use with Open Flash Chart version 2
----
Crypt-Skip32-XS-0.01
http://search.cpan.org/~gray/Crypt-Skip32-XS-0.01/
Drop-in replacement for Crypt::Skip32
----
DBIx-Admin-CreateTable-2.02
http://search.cpan.org/~rsavage/DBIx-Admin-CreateTable-2.02/
A module for creating and dropping tables and sequences
----
DBIx-Tree-MaterializedPath-v0.03
http://search.cpan.org/~larryl/DBIx-Tree-MaterializedPath-v0.03/
fast DBI queries and updates on "materialized path" trees
----
Data-FixedFormat-0.04
http://search.cpan.org/~pfaut/Data-FixedFormat-0.04/
convert between fixed-length fields and hashes
----
Devel-PerlySense-0.0163
http://search.cpan.org/~johanl/Devel-PerlySense-0.0163/
Perl IDE backend with Emacs frontend
----
Devel-PerlySense-0.0164
http://search.cpan.org/~johanl/Devel-PerlySense-0.0164/
Perl IDE backend with Emacs frontend
----
EAFDSS-0.10
http://search.cpan.org/~hasiotis/EAFDSS-0.10/
base class for all other classes
----
ExtUtils-InferConfig-1.03
http://search.cpan.org/~smueller/ExtUtils-InferConfig-1.03/
Infer Perl Configuration for non-running interpreters
----
FCGI-ProcManager-MaxRequests-0.01
http://search.cpan.org/~vovkasm/FCGI-ProcManager-MaxRequests-0.01/
restrict max number of requests by each child
----
File-Path-Tiny-0.1
http://search.cpan.org/~dmuey/File-Path-Tiny-0.1/
recursive versions of mkdir() and rmdir() without as much overhead as File::Path
----
GD-Convert-2.16
http://search.cpan.org/~srezic/GD-Convert-2.16/
additional output formats for GD
----
IO-Stream-1.0.4
http://search.cpan.org/~powerman/IO-Stream-1.0.4/
ease non-blocking I/O streams based on EV
----
Language-P-0.01_02
http://search.cpan.org/~mbarbon/Language-P-0.01_02/
parsing/compiling Perl5 code using Perl5
----
Lingua-Translate-Google-0.03
http://search.cpan.org/~dylan/Lingua-Translate-Google-0.03/
Translation back-end for Google's beta translation service.
----
Locale-Maketext-Lexicon-0.74
http://search.cpan.org/~drtech/Locale-Maketext-Lexicon-0.74/
Use other catalog formats in Maketext
----
Mail-SPF-Iterator-0.07
http://search.cpan.org/~sullr/Mail-SPF-Iterator-0.07/
iterative SPF lookup
----
Mail-SPF-Iterator-0.08
http://search.cpan.org/~sullr/Mail-SPF-Iterator-0.08/
iterative SPF lookup
----
Net-BitTorrent-0.027_015
http://search.cpan.org/~sanko/Net-BitTorrent-0.027_015/
BitTorrent peer-to-peer protocol class
----
Net-LDAP-Class-0.16
http://search.cpan.org/~karman/Net-LDAP-Class-0.16/
object-relational mapper for Net::LDAP
----
PDF-API2-0.72.001
http://search.cpan.org/~areibens/PDF-API2-0.72.001/
A Perl Module Chain to faciliate the Creation and Modification of High-Quality "Portable Document Format (aka. PDF)" Files.
----
PDF-API2-0.72.002
http://search.cpan.org/~areibens/PDF-API2-0.72.002/
A Perl Module Chain to faciliate the Creation and Modification of High-Quality "Portable Document Format (aka. PDF)" Files.
----
PDF-API2-0.72.003
http://search.cpan.org/~areibens/PDF-API2-0.72.003/
A Perl Module Chain to faciliate the Creation and Modification of High-Quality "Portable Document Format (aka. PDF)" Files.
----
POE-Component-Client-opentick-0.20
http://search.cpan.org/~infidel/POE-Component-Client-opentick-0.20/
A POE component for working with opentick.com's market data feeds.
----
Padre-Plugin-InstallPARDist-0.01
http://search.cpan.org/~smueller/Padre-Plugin-InstallPARDist-0.01/
Installation of .par archives into the system
----
Padre-Plugin-ViewInBrowser-0.03
http://search.cpan.org/~fayland/Padre-Plugin-ViewInBrowser-0.03/
view selected doc in browser for Padre
----
Parse-BooleanLogic-0.05
http://search.cpan.org/~ruz/Parse-BooleanLogic-0.05/
parser of boolean expressions
----
Parse-Eyapp-1.130
http://search.cpan.org/~casiano/Parse-Eyapp-1.130/
Extensions for Parse::Yapp
----
Path-Iter-0.1
http://search.cpan.org/~dmuey/Path-Iter-0.1/
Simple Efficient Path Iteration
----
PerlCryptLib-1.05
http://search.cpan.org/~alvarol/PerlCryptLib-1.05/
Perl interface to Peter Guttman's cryptlib API
----
Pod-Advent-0.07
http://search.cpan.org/~davidrw/Pod-Advent-0.07/
POD Formatter for The Perl Advent Calendar
----
Rose-DBx-Garden-Catalyst-0.12
http://search.cpan.org/~karman/Rose-DBx-Garden-Catalyst-0.12/
plant Roses in your Catalyst garden
----
SVN-Class-0.10
http://search.cpan.org/~karman/SVN-Class-0.10/
manipulate Subversion workspaces with Perl objects
----
Search-QueryParser-SQL-0.006
http://search.cpan.org/~karman/Search-QueryParser-SQL-0.006/
turn free-text queries into SQL WHERE clauses
----
Task-CatInABox-0.02
http://search.cpan.org/~zarquon/Task-CatInABox-0.02/
Catalyst and related modules for exploring Catalyst
----
WWW-Mechanize-DecodedContent-0.02
http://search.cpan.org/~miyagawa/WWW-Mechanize-DecodedContent-0.02/
decode Mech content using its HTTP response encoding
----
WWW-Mixi-Scraper-0.20
http://search.cpan.org/~ishigaki/WWW-Mixi-Scraper-0.20/
yet another mixi scraper
----
Xacobeo-0.03
http://search.cpan.org/~potyl/Xacobeo-0.03/
XPath (XML Path Language) visualizer.
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: Sat, 22 Nov 2008 23:43:50 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: post increment or pre increment?
Message-Id: <n4GdnVjeOowtlLTUnZ2dnUVZ_rfinZ2d@comcast.com>
Peng Yu wrote:
> I learned in C++, that it is better to use pre increment rather than
> post increment.
Oh, really? If the idea is to increment a variable, and you are not
going to immediately use the variable's old or new value, then it
makes no difference at all.
-Joe
------------------------------
Date: Sat, 22 Nov 2008 10:16:56 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: regular expression to detect dos filenames
Message-Id: <gg8mas.1hc.1@news.isolution.nl>
Petr Vileta (fidokomik) schreef:
> m/^[^\\\*\?\<\>\/\:\"\|\.]{0,8}(\.[^\\\*\?\<\>\/\:\"\|\.]{1,3})*$/)
What is your purpose in writing it in such an unreadable way?
And both the "{0,8}" and the "*" quantifiers are wrong.
m#^[^\\*?<>/:"|.]{1,8}(\.[^\\*?<>/:"|.]{1,3})?$#
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Sun, 23 Nov 2008 02:55:59 +0100
From: "Petr Vileta \(fidokomik\)" <stoupa@practisoft.cz>
Subject: Re: regular expression to detect dos filenames
Message-Id: <ggadd3$2smr$1@ns.felk.cvut.cz>
Dr.Ruud wrote:
> Petr Vileta (fidokomik) schreef:
>
>> m/^[^\\\*\?\<\>\/\:\"\|\.]{0,8}(\.[^\\\*\?\<\>\/\:\"\|\.]{1,3})*$/)
>
> What is your purpose in writing it in such an unreadable way?
>
> And both the "{0,8}" and the "*" quantifiers are wrong.
>
> m#^[^\\*?<>/:"|.]{1,8}(\.[^\\*?<>/:"|.]{1,3})?$#
I'm used to escape all "more meaning" characters, sorry :-) but I tested my
regexp and it work.
But your regexp not work for ".ext" filename but this is regular DOS filename
(no filename but extension only). Under WinXP this is not regular DOS name but
under MS-DOS 6.x it is regular.
Please refine your regexp for these regular and unregular DOS names. I write
these into double quotes for better reading only.
Regular names:
"x"
"filename"
".ext"
Unregular names:
"longfilename"
"longfilename.ext"
"file.longextension"
"file.with.more.dot"
".longext"
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail.
Send me your mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>
------------------------------
Date: Sat, 22 Nov 2008 23:34:45 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: regular expression to detect dos filenames
Message-Id: <Br-dnRJaya0TmrTUnZ2dnUVZ_v7inZ2d@comcast.com>
Petr Vileta (fidokomik) wrote:
> m/^[^\\\*\?\<\>\/\:\"\|\.]{0,8}(\.[^\\\*\?\<\>\/\:\"\|\.]{1,3})*$/)
That regexp excludes 'FILENAME.' and includes 'FILENAME.FOO.BAR.EXE'.
Change {0,8} to {1,8} and end with: {0,3})?$
------------------------------
Date: Sat, 22 Nov 2008 22:44:31 -0800 (PST)
From: pgodfrin <pgodfrin@gmail.com>
Subject: Re: Restarting a Program mid stream
Message-Id: <a01ac537-e04a-471b-a356-e9dfcf6f44f2@c36g2000prc.googlegroups.com>
On Nov 21, 11:20=A0pm, Uri Guttman <u...@stemsystems.com> wrote:
> >>>>> "p" =3D=3D pgodfrin =A0<pgodf...@gmail.com> writes:
>
> =A0 p> Greetings,
> =A0 p> I have a perl program that has multiple steps. I'd like to be able=
to
> =A0 p> restart it at any step. This works:
>
> =A0 p> #!/bin/perl
> =A0 p> goto $ARGV[0]; # forgive me
>
> but never do that again!
>
> =A0 p> S1:
> =A0 p> {
> =A0 p> =A0 =A0 print "S1\n";
> =A0 p> =A0 =A0 exit;
> =A0 p> }
> =A0 p> S2:
> =A0 p> {
> =A0 p> =A0 =A0 print "S2\n";
> =A0 p> =A0 =A0 exit;
> =A0 p> }
>
> =A0 p> However, I was wondering if there is any programmatic access to th=
e
> =A0 p> name of the block. That way I could print the name of the block
> =A0 p> instead of hard-coding an arbitrary value (print "S1\n")
> =A0 p> pg
>
> the blocks could be code references instead and you can make a dispatch
> table to run any given step from the command line. but i sense you want
> something that will track where you are and restart the process there
> the next time it is run.
>
> you need to do several things but nothing too hard.
>
> you need to save in a file (or a db) a marker for when you finish any
> given step and that is the name (label/dispatch table key) of the next
> step.
>
> then when you start the program it reads in that saved step name and
> jumps to it. the problems now are coding series of steps with each one
> knowing the name of the next one. this is easy for a handful of steps
> but it gets massively painful and annoying as it grows in size and
> complexity. it is a basic statemachine and they are not meant to be
> directly coded when big.
>
> so you will have to invest in something else. possible there are modules
> that can do this too.
>
> uri
>
> --
> Uri Guttman =A0------ =A0u...@stemsystems.com =A0-------- =A0http://www.s=
ysarch.com--
> ----- =A0Perl Code Review , Architecture, Development, Training, Support =
------
> --------- Free Perl Training ---http://perlhunter.com/college.html-------=
--
> --------- =A0Gourmet Hot Cocoa Mix =A0---- =A0http://bestfriendscocoa.com=
---------
In this case your first guess was correct. I want a dispatch table so
I can pass a step name from the command line for restart. Now I need
to figure out how to make a dispatch table :)
pg
------------------------------
Date: Sat, 22 Nov 2008 22:58:04 -0800 (PST)
From: pgodfrin <pgodfrin@gmail.com>
Subject: Re: Restarting a Program mid stream
Message-Id: <5fffc5dc-f579-456a-b278-98d23de7d27a@40g2000prx.googlegroups.com>
On Nov 21, 6:08=A0pm, Tim Greer <t...@burlyhost.com> wrote:
> pgodfrin wrote:
> > Greetings,
> > I have a perl program that has multiple steps. I'd like to be able to
> > restart it at any step. This works:
>
> > #!/bin/perl
> > goto $ARGV[0]; # forgive me
> > S1:
> > {
> > =A0 =A0 print "S1\n";
> > =A0 =A0 exit;
> > }
> > S2:
> > {
> > =A0 =A0 print "S2\n";
> > =A0 =A0 exit;
> > }
>
> > However, I was wondering if there is any programmatic access to the
> > name of the block. That way I could print the name of the block
> > instead of hard-coding an arbitrary value (print "S1\n")
> > pg
>
> The name of the block is what you're printing, so you could just use
> print $ARGV[0] instead, unless I misunderstood what you were asking?
> --
> Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
> Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
> and Custom Hosting. =A024/7 support, 30 day guarantee, secure servers.
> Industry's most experienced staff! -- Web Hosting With Muscle!
I guess I could have been clearer. In this case since I have an input
argument then I have access to the label name, so that would work as
you say. I may have been over thinking the problem, if the intent is
to restart at a particular step then the step name will be passed via
argument and the program will have access to the step name.
So - perhaps I won't need this information to make the code do what I
want to, but now I'm curious. Essentially the interpreter needs to
know what label to go to, so somewhere internal to perl that
information is available, perhaps just not available to the humble
programmer <grin>
pg
------------------------------
Date: Sat, 22 Nov 2008 22:40:16 -0800 (PST)
From: pgodfrin <pgodfrin@gmail.com>
Subject: Re: using print<<`EOC`
Message-Id: <9aa671ea-53e7-4478-af6d-757f5a92e2e7@w24g2000prd.googlegroups.com>
On Nov 21, 6:03=A0pm, Tim Greer <t...@burlyhost.com> wrote:
> pgodfrin wrote:
> > Greetings,
> > How does Perl =A0identify which shell to use (sh, vs ksh vs csh, etc)
> > for backticks in a here document?
> > pg
>
> What environment settings is it running in?
> --
> Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
> Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
> and Custom Hosting. =A024/7 support, 30 day guarantee, secure servers.
> Industry's most experienced staff! -- Web Hosting With Muscle!
The default shell for my userid is ksh - but the backticks in the here
document invoke sh ..
pg
------------------------------
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 1998
***************************************