[23621] in Perl-Users-Digest
Perl-Users Digest, Issue: 5828 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 19 09:10:39 2003
Date: Wed, 19 Nov 2003 06:10:15 -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 Wed, 19 Nov 2003 Volume: 10 Number: 5828
Today's topics:
Re: multilinepattern match <REMOVEsdnCAPS@comcast.net>
Re: PERL array of arrays (Anno Siegel)
Re: perldoc installation (Anno Siegel)
Re: Processing web pages downloaded <nospam_for_jkeen@concentric.net>
Re: Processing web pages downloaded <REMOVEsdnCAPS@comcast.net>
Re: Processing web pages downloaded (Tad McClellan)
Re: Processing web pages downloaded (Tad McClellan)
Re: Program that prints its source code (Anno Siegel)
Re: Project Organization <ben.liddicott@comodogroup.com>
Re: Project Organization <usenet@morrow.me.uk>
Re: Protecting Source code of a perl script (Rafael Garcia-Suarez)
Re: Protecting Source code of a perl script (Anno Siegel)
Re: Protecting Source code of a perl script <ubl@schaffhausen.de>
Re: Protecting Source code of a perl script <REMOVEsdnCAPS@comcast.net>
Re: regex to convert 1000000 -> 1,000,000 ? <abigail@abigail.nl>
Re: regex to convert 1000000 -> 1,000,000 ? <bart.lateur@pandora.be>
Re: regex to convert 1000000 -> 1,000,000 ? (Sam Holden)
Re: regex to convert 1000000 -> 1,000,000 ? (Anno Siegel)
Re: regex to convert 1000000 -> 1,000,000 ? <abigail@abigail.nl>
Re: regex to convert 1000000 -> 1,000,000 ? <usenet@morrow.me.uk>
Re: regex to convert 1000000 -> 1,000,000 ? <HelgiBriem_1@hotmail.com>
Re: SOAP::Lite versus DBI <kirk@strauser.com>
Strange - need a little help <oli@scheit.de>
Re: Strange - need a little help <noreply@gunnar.cc>
Re: Strange - need a little help (Anno Siegel)
Re: where is DBI::DWIM? <ben.liddicott@comodogroup.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 19 Nov 2003 06:10:55 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: multilinepattern match
Message-Id: <Xns9438493A2735Dsdn.comcast@216.196.97.136>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
"Sunil" <sunil_franklin@hotmail.com> wrote in
news:tYBub.26$wC5.154@news.oracle.com:
> The hard part is "how do I get the file contents (which may be huge)
> into a string variable"
> or is line by line from the file the only option?
There are several ways. You may or may not have to read the entire file
into a string variable all at once. Tell us more about the problem you're
trying to solve, and what you expect the input data to look like, and we'll
see if we can't set you up.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP7teCGPeouIeTNHoEQLylACgji3DZaezrOwhKFZ7vk5pEfMmKRUAoKko
ca1VKTL1u9dW1ldXeYSeeedI
=9n/p
-----END PGP SIGNATURE-----
------------------------------
Date: 19 Nov 2003 08:20:01 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: PERL array of arrays
Message-Id: <bpf93h$ko1$2@mamenchi.zrz.TU-Berlin.DE>
Schlick <invalid@invalid.com.invalid> wrote in comp.lang.perl.misc:
> Anno Siegel wrote:
> <snip>
> >># Sub for making list 'A'
> >>sub make_random_list {
> >> # Push random numbers onto an array reference
> >> my $ret = [];
> >> # I hate $_ - I don't use $i, but there
> >> # are no possible side-effects
> >
> >
> > Why introduce the name when you don't use it?
>
> That's just my own personal thing. I hate $_ with a passion (although I
> have to use it with map/grep etc). I've seen a few too many $_ traps so
> I steer clear of the whole country.
That is your reason for not using "$_". Why did you introduce "$i"?
Anno
------------------------------
Date: 19 Nov 2003 08:13:28 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: perldoc installation
Message-Id: <bpf8n8$ko1$1@mamenchi.zrz.TU-Berlin.DE>
Tintin <me@privacy.net> wrote in comp.lang.perl.misc:
>
> "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
> news:bpcvsq$7gg$1@mamenchi.zrz.TU-Berlin.DE...
> > Tintin <me@privacy.net> wrote in comp.lang.perl.misc:
> > > This is just a comment/observation about people who reply that if
> perldoc
> > > isn't on the system, then your Perl installation is broken/defective.
> > >
> > > Well, that maybe one interpretation, but keep in mind that Perl as
> included
> > > on later releases of Solaris doesn't include the Perl documentation.
> This
> >
> > Which versions would that be? It just doesn't make sense. In Solaris 8
> > and 9 the Perl documentation is contained in package SUNWpl5p.
>
> Does that include perldoc? (I'm not in front of a Solaris box at the
> moment)
Nor am I, I don't know. I never missed perldoc on solaris.
Anno
------------------------------
Date: 19 Nov 2003 11:04:44 GMT
From: "James E Keenan" <nospam_for_jkeen@concentric.net>
Subject: Re: Processing web pages downloaded
Message-Id: <bpfioc$llo@dispatch.concentric.net>
"John B. Kim" <provicon@earthlink.net> wrote in message
news:IsDub.5474$sb4.818@newsread2.news.pas.earthlink.net...
> I have web pages downloaded:
>
> 1.html
> 2.html
> 3.html... and so on..
>
> When I was downloading this pages, it is supposed to download in a
> consecutive numbers, but sometimes, some of the numbers in sequence gets
> missed.
>
> Now using HTML::TokeParser, I process these web pages downloaded in order
to
> retrieve only the information I need from the page, but when the page
number
> skips, the program gets stuck.
>
> Can anybody tell me how I can change the code below so that when certain
web
> page number skips, it goes to the next number??
>
> I enclose the code I currently use to carry this job out:
> ======================================================
> use HTML::TokeParser;
>
> $number = 1;
> while ($number < 96) {
> my $ns="C:\\ChoiBiz4Less\\$number.html";
I am not familiar with HTML::TokeParser, but a quick check of its
documentation suggests that you should have checked whether you succeeded in
opening a given file:
$p = HTML::TokeParser->new("index.html") || die "Can't open: $!";
"If the argument is a plain scalar, then it is taken as the name of a
file to be opened and parsed. If the file can't be opened for reading, then
the constructor will return an undefined value and $! will tell you why it
failed."
Have you done this? My hunch is that it would have at least signaled a
downloading failure.
------------------------------
Date: Wed, 19 Nov 2003 06:16:58 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Processing web pages downloaded
Message-Id: <Xns94384A416628Dsdn.comcast@216.196.97.136>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
"John B. Kim" <provicon@earthlink.net> wrote in
news:IsDub.5474$sb4.818@newsread2.news.pas.earthlink.net:
> use HTML::TokeParser;
>
> $number = 1;
> while ($number < 96) {
> my $ns="C:\\ChoiBiz4Less\\$number.html";
next unless -e $ns;
> my $stream = HTML::TokeParser->new($ns);
> open(OUT, '>>c:\\ChoiBiz4Less.txt');
>
> while (my $token=$stream->get_token) {
>
> if ($token->[0] eq 'S' and $token->[1] eq 'td' and $token->[4] eq
> '<td>') {
>
> $text_string=$stream->get_trimmed_text('/td');
> print OUT "$text_string;" ;}
> if ($token->[0] eq 'E' and $token->[1] eq 'tr') {
> print OUT "\n";}
> }
>
> $number = $number+1;
>
> }
> =============================================
I strongly suggest you learn a proper code indenting technique. It will
save you grief in the long run! Each while() or if() or other control
structure should be indented further than its enclosing block. This
makes code much easier to read.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP7tfdGPeouIeTNHoEQIQAwCgnfqsbmb2nL9F3CbQWfgaKU0Ou2IAoPAa
FntTrZxV1gZM+wE1tJAmYn7r
=rYGv
-----END PGP SIGNATURE-----
------------------------------
Date: Wed, 19 Nov 2003 06:30:38 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Processing web pages downloaded
Message-Id: <slrnbrmoje.hom.tadmc@magna.augustmail.com>
John B. Kim <provicon@earthlink.net> wrote:
> $number = 1;
my $number = 1;
> while ($number < 96) {
foreach my $number ( 1 .. 96 ) {
> my $ns="C:\\ChoiBiz4Less\\$number.html";
my $ns="C:/ChoiBiz4Less/$number.html";
> open(OUT, '>>c:\\ChoiBiz4Less.txt');
You should always, yes *always*, check the return value from open():
open(OUT, '>>c:/ChoiBiz4Less.txt') or
die "could not open 'c:/ChoiBiz4Less.txt' $!";
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 19 Nov 2003 06:33:12 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Processing web pages downloaded
Message-Id: <slrnbrmoo8.hom.tadmc@magna.augustmail.com>
John B. Kim <provicon@earthlink.net> wrote:
> I have web pages downloaded:
>
> 1.html
> 2.html
> 3.html... and so on..
>
> When I was downloading this pages, it is supposed to download in a
> consecutive numbers, but sometimes, some of the numbers in sequence gets
> missed.
> Can anybody tell me how I can change the code below so that when certain web
> page number skips, it goes to the next number??
Instead of assuming that they are all there, why not process
only the ones that actually are there?
> I enclose the code I currently use to carry this job out:
>======================================================
> use HTML::TokeParser;
>
> $number = 1;
> while ($number < 96) {
> my $ns="C:\\ChoiBiz4Less\\$number.html";
foreach my $ns ( glob 'C:/ChoiBiz4Less/[0-9]*.html' ) { # untested
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 19 Nov 2003 11:08:15 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Program that prints its source code
Message-Id: <bpfiuv$p3v$3@mamenchi.zrz.TU-Berlin.DE>
Michele Dondi <bik.mido@tiscalinet.it> wrote in comp.lang.perl.misc:
> Benjamin Goldberg (who used to be one of the most valuable
> contributors to this NG since when I first joined it - BTW: where is
> he now?) posted more complex, nontrivial quines in the thread "Perl
> Golf on my Mind" in January.
He was pretty active on p5p, last I looked.
Anno
------------------------------
Date: Wed, 19 Nov 2003 13:30:19 -0000
From: "Ben Liddicott" <ben.liddicott@comodogroup.com>
Subject: Re: Project Organization
Message-Id: <bpfr9g$ila$1@kylie.comodogroup.com>
My philosophy is always 5:
If it comes with the distribution, leave it where it is.
If it belongs with an application, even if it is a file which might
conceiveably be of use in other applications, put it with the application
script.
This insulates you from version incompatibilities, though it does mean you
have to patch everywhere if there is a bug in a module.
You will also never have to mess around with environment variables, and you
get what MS call "xcopy deploy", which is unix-like tarball distribution
capability: You can just tar up the directories and plop them somewhere
else, with a reasonable assurance that all will be well.
On your points:
1) Don't set PERLIB except in a shellscript which knows exactly which perl
script it is going to call, and unsets it afterwards. Don't set PERLIB for
scripts which are Perl 5 only.
2) As 1, but don't set for Perl 4 obviously.
3) For shellscripts only, in my opinion
4) This can be useful if you have done work in a BEGIN block to locate where
the LIB dir is. You may have taken it from the command line for example, or
from a config file. It can also be useful if you have per-application
libraries which can't be kept with the script for some reason. Then you just
say use lib '/etc/lib/myapplib'; and put your libs there.
Cheers,
Ben Liddicott
<chance@austin.rr.com> wrote in message
news:bpf4ip$msc$1@localhost.localdomain...
> So anybody out there have any advice on how to organize a
> big perl project?
>
> Pretty much all I'm looking for is philosophical banter on
> merits of
>
> 1) setting PERLIB
>
> 2) setting PERL5LIB
>
> 3) perl -Idirs
>
> 4) 'use lib "../dir/dir";',
> followed my 'use module;' (which resides in '../dir/dir/')
>
> 5) something I don't know about
------------------------------
Date: Wed, 19 Nov 2003 14:01:37 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Project Organization
Message-Id: <bpft41$ai$1@wisteria.csv.warwick.ac.uk>
[please stop top-posting]
"Ben Liddicott" <ben.liddicott@comodogroup.com> wrote:
> <chance@austin.rr.com> wrote in message
> news:bpf4ip$msc$1@localhost.localdomain...
> > So anybody out there have any advice on how to organize a
> > big perl project?
> >
> > Pretty much all I'm looking for is philosophical banter on
> > merits of
> >
> > 1) setting PERLIB
> >
> > 2) setting PERL5LIB
> >
> > 3) perl -Idirs
> >
> > 4) 'use lib "../dir/dir";',
> > followed my 'use module;' (which resides in '../dir/dir/')
This Won't Work unless your program is always started from the same
working directory.
> > 5) something I don't know about
>
> My philosophy is always 5:
>
> If it comes with the distribution, leave it where it is.
> If it belongs with an application, even if it is a file which might
> conceiveably be of use in other applications, put it with the application
> script.
It won't be found unless the application is started from its installed
directory... you need to use FindBin to find where the program file
is, and then use lib with that path.
> On your points:
> 1) Don't set PERLIB except in a shellscript which knows exactly which perl
> script it is going to call, and unsets it afterwards.
...or in your .profile &c to point to a personal perl lib under your
home directory.
Another alternative: for platform-specific programs, you can read a
config file in /etc / read a value out of the Windows registry /
etc. as appropriate to find the right directory.
I would have said that something involving 'use lib' is going to be
right, unless you have a small wrapper shell script (say, generated at
install time) that knows absolute paths to everything. In that case,
the only difference between using PERL5?LIB and -I is that if your
program invokes perl again then PERL5?LIB will be passed but -I won't:
which is appropriate depends on the application.
Ben
--
For the last month, a large number of PSNs in the Arpa[Inter-]net have been
reporting symptoms of congestion ... These reports have been accompanied by an
increasing number of user complaints ... As of June,... the Arpanet contained
47 nodes and 63 links. [ftp://rtfm.mit.edu/pub/arpaprob.txt] * ben@morrow.me.uk
------------------------------
Date: 19 Nov 2003 08:27:48 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Protecting Source code of a perl script
Message-Id: <slrnbrma7n.3mk.rgarciasuarez@rafael.serd.lyon.hexaflux.loc>
Senthilraja wrote:
>I've written a perl script for a high security application and hence I
>want to protect the source code of the perl script, even from the
>administrator of the application.
>
>Is there any way to convert the perl script source into some sort of exe
>or binary file, without affecting the functioning of the script?
Forget about it.
Moreover, security through obscurity just does not work.
If you want to write a secure script, learn about the techniques that
you could use to write a secure script, and don't hide yourself
between a false feeling of security that a childish attempt at
obfuscation may provide.
This is a FAQ, BTW :
$ perldoc -q hide
------------------------------
Date: 19 Nov 2003 09:37:59 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Protecting Source code of a perl script
Message-Id: <bpfdln$oih$1@mamenchi.zrz.TU-Berlin.DE>
Senthilraja <senthil.raja@adcc.alcatel.be> wrote in comp.lang.perl.misc:
> I've written a perl script for a high security application and hence I
> want to protect the source code of the perl script, even from the
> administrator of the application.
Security by obfuscation? That is not a promising concept.
A security program that must hide its algorithm is weak, because the
algorithm can be detected (it *happens* each time the program runs).
Some of the strongest security programs are open-source, and that
counts in their favor, not against them.
> Is there any way to convert the perl script source into some sort of exe
> or binary file, without affecting the functioning of the script?
Yes, there are such ways. The newest and hottest seems to be PAR
(see http://theoryx5.uwinnipeg.ca/CPAN/data/PAR/README.html). But
their purpose is packaging, not security.
If your program can be run by Perl, it can be de-parsed by a modified
Perl. Security that relies on that not happening isn't worth much.
Anno
------------------------------
Date: Wed, 19 Nov 2003 12:48:30 +0100
From: Malte Ubl <ubl@schaffhausen.de>
Subject: Re: Protecting Source code of a perl script
Message-Id: <bpfoct$32b$1@news.dtag.de>
Anno Siegel wrote:
> Yes, there are such ways. The newest and hottest seems to be PAR
> (see http://theoryx5.uwinnipeg.ca/CPAN/data/PAR/README.html). But
> their purpose is packaging, not security.
Actually, PAR does have a feature to _hide_ the source. The point is,
this feature does not secure your code, it just raises the bar for
people to steel it from you.
If you want to secure your code, lock your computer in a secure room and
close all ports that are not relevant to the application.
malte
------------------------------
Date: Wed, 19 Nov 2003 06:20:55 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Protecting Source code of a perl script
Message-Id: <Xns94384AEC3609Dsdn.comcast@216.196.97.136>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Senthilraja <senthil.raja@adcc.alcatel.be> wrote in news:3FBB1913.2CF04140
@adcc.alcatel.be:
> I've written a perl script for a high security application and hence I
> want to protect the source code of the perl script, even from the
> administrator of the application.
What makes you think that hiding the source code will make your application
more secure? Typically, a dedicated cracker will figure out what the
program is doing and find a way around it anyhow, while your program may
not be reviewed for bugs or security holes by your peers.
> Is there any way to convert the perl script source into some sort of exe
> or binary file, without affecting the functioning of the script?
There is effectively no way to hide or otherwise obscure the source code of
a perl program that is to be executed.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP7tgX2PeouIeTNHoEQJd3QCeIMOuOOGTEoLOhgyWY+JES8EKDfIAnjqn
63AucMn7z0CPvd/+4n2iu0gM
=QImu
-----END PGP SIGNATURE-----
------------------------------
Date: 19 Nov 2003 09:46:32 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrmevo.dvt.abigail@alexandra.abigail.nl>
Wally Sanford (wsanford@wallysanford.com) wrote on MMMDCCXXXII September
MCMXCIII in <URL:news:bpef5t$1n8ng1$1@ID-196529.news.uni-berlin.de>:
<> Abigail wrote:
<> > Wally Sanford (wsanford@wallysanford.com) wrote on MMMDCCXXXI
<> > September MCMXCIII in
<> > <URL:news:bpbsh4$1mrtqq$1@ID-196529.news.uni-berlin.de>:
<> >> Abigail wrote:
<> >>> No, if they are Unix savy, they try "man perl", and guess what?
<> >>> second page it mentions the FAQ!
<>
<> >
<> >
<> > That's explained on the *first* page:
<> >
<> > For ease of access, the Perl manual has been split up into
<> > several sections.
<> >
<> > after which the list of manual pages, which includes the FAQ, follows.
<>
<> Assumign the knew person knows of man, yes this is true.
Your premises was that the person was Unix savvy. If you don't know
'man', you aren't Unix savvy.
Abigail
--
perl -wle 'print prototype sub "Just another Perl Hacker" {};'
------------------------------
Date: Wed, 19 Nov 2003 10:17:57 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <lngmrv4daudrju2vf087k0jj65hhmqffi5@4ax.com>
Sam Holden wrote:
>How do you propose perl make the documentation available in such a way
>that people who don't know how to read the documentation in the standard way
>can still find it?
A readme file that comes with perl, which points towards perldoc?
Indigiperl comes with a reradme.txt file which contains:
README FILE FOR INDIGOPERL
All documentation is contained in html/index.html
That's enough.
--
Bart.
------------------------------
Date: 19 Nov 2003 10:44:52 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrmid4.kj9.sholden@flexal.cs.usyd.edu.au>
On Wed, 19 Nov 2003 10:17:57 GMT, Bart Lateur <bart.lateur@pandora.be> wrote:
> Sam Holden wrote:
>
>>How do you propose perl make the documentation available in such a way
>>that people who don't know how to read the documentation in the standard way
>>can still find it?
>
> A readme file that comes with perl, which points towards perldoc?
>
> Indigiperl comes with a reradme.txt file which contains:
>
> README FILE FOR INDIGOPERL
>
> All documentation is contained in html/index.html
>
> That's enough.
And since the perl source comes with a README file containing:
2) Read the manual entries before running perl.
So that's enough.
--
Sam Holden
------------------------------
Date: 19 Nov 2003 12:19:22 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <bpfn4a$p3v$5@mamenchi.zrz.TU-Berlin.DE>
Wally Sanford <wsanford@wallysanford.com> wrote in comp.lang.perl.misc:
> Well if other people cannot see the faq being posted as you say, jsut
print "Jsut another Perl hacker?"
Anno
------------------------------
Date: 19 Nov 2003 12:32:11 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrmoma.gh.abigail@alexandra.abigail.nl>
Bart Lateur (bart.lateur@pandora.be) wrote on MMMDCCXXXII September
MCMXCIII in <URL:news:lngmrv4daudrju2vf087k0jj65hhmqffi5@4ax.com>:
&& Sam Holden wrote:
&&
&& >How do you propose perl make the documentation available in such a way
&& >that people who don't know how to read the documentation in the standard way
&& >can still find it?
&&
&& A readme file that comes with perl, which points towards perldoc?
Yeah, that solves the problems of the millions of people that are
able to install perl, but aren't aware of the "man" command.
Abigail
--
$_ = "\112\165\163\1648\141\156\157\164\150\145\1628\120\145"
. "\162\1548\110\141\143\153\145\162\0128\177" and &japh;
sub japh {print "@_" and return if pop; split /\d/ and &japh}
------------------------------
Date: Wed, 19 Nov 2003 12:40:47 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <bpfocf$p6u$1@wisteria.csv.warwick.ac.uk>
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> Wally Sanford <wsanford@wallysanford.com> wrote in comp.lang.perl.misc:
>
> > Well if other people cannot see the faq being posted as you say, jsut
>
> print "Jsut another Perl hacker?"
Is he Icelandic?
Ben
--
$.=1;*g=sub{print@_};sub r($$\$){my($w,$x,$y)=@_;for(keys%$x){/main/&&next;*p=$
$x{$_};/(\w)::$/&&(r($w.$1,$x.$_,$y),next);$y eq\$p&&&g("$w$_")}};sub t{for(@_)
{$f&&($_||&g(" "));$f=1;r"","::",$_;$_&&&g(chr(0012))}};t # ben@morrow.me.uk
$J::u::s::t, $a::n::o::t::h::e::r, $P::e::r::l, $h::a::c::k::e::r, $.
------------------------------
Date: Wed, 19 Nov 2003 14:00:45 +0000
From: Helgi Briem <HelgiBriem_1@hotmail.com>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <2stmrvso9pi63lk1nvl24p4c2jmftks0v6@4ax.com>
On Wed, 19 Nov 2003 12:40:47 +0000 (UTC), Ben Morrow
<usenet@morrow.me.uk> wrote:
>
>anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
>> Wally Sanford <wsanford@wallysanford.com> wrote in comp.lang.perl.misc:
>>
>> > Well if other people cannot see the faq being posted as you say, jsut
>>
>> print "Jsut another Perl hacker?"
>
>Is he Icelandic?
No, but I am.
------------------------------
Date: Wed, 19 Nov 2003 13:55:05 GMT
From: Kirk Strauser <kirk@strauser.com>
Subject: Re: SOAP::Lite versus DBI
Message-Id: <878ymco452.fsf@strauser.com>
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 2003-11-19T06:17:51Z, rook_5150@yahoo.com (Bryan Castillo) writes:
> I don't know for sure but.....
>
> I imagine that a statement handle object is a complex object that probably
> has some C code behind it. Perhaps it has a C struct stashed away in the
> implementation with pointers to various places in memory. In which any
> case, the object wouldn't serialize very well over a network connection.
I was kind of suspecting the same thing. I'd read something about
SOAP::Lite returning "stub" objects that were basically pointers to the real
object residing on the server, but couldn't get find enough information to
convince me that was accurate.
> You might want to try keeping the object stored in a hash within the
> server code and return the key through the soap calls.
That was going to be my next effort. :-)
=2D --=20
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/u3YO5sRg+Y0CpvERAvMnAJ9bKYQ4LtCdN9Sp3OuU6HnrbPjPQgCghnYR
q7Ib0rET4vWIJ6Uz8Lo8c9s=3D
=3DUsrW
=2D----END PGP SIGNATURE-----
------------------------------
Date: Wed, 19 Nov 2003 09:59:18 +0100
From: Oli Scheit <oli@scheit.de>
Subject: Strange - need a little help
Message-Id: <pan.2003.11.19.08.59.17.646562@scheit.de>
Hi, all!
I have the following problem:
on one linux box the line
$foo = 10 / 3;
brings $foo to 3.333333e+something
and a
print sprintf '%.2f', $foo;
fails due to the e+something.
On my private linux box,
the line
$foo = 10 / 3;
brings $foo to something like 3.3333333
Probably different versions of Perl.
Is there any way to convert the x.xxxxe+y
to a formatted float?
regards,
Oli
------------------------------
Date: Wed, 19 Nov 2003 11:03:08 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Strange - need a little help
Message-Id: <bpffgb$1ncrb3$1@ID-184292.news.uni-berlin.de>
Oli Scheit wrote:
> I have the following problem:
> on one linux box the line
> $foo = 10 / 3;
> brings $foo to 3.333333e+something
> and a
> print sprintf '%.2f', $foo;
> fails due to the e+something.
>
> On my private linux box,
> the line
> $foo = 10 / 3;
> brings $foo to something like 3.3333333
>
> Probably different versions of Perl.
>
> Is there any way to convert the x.xxxxe+y
> to a formatted float?
On my (Windows) box this works fine:
$foo = sprintf '%e', 10 / 3;
printf '%.2f', $foo;
If you don't need $foo to be very exact in the first place, you can
avoid the scientific notation by doing:
$foo = sprintf '%f', 10 / 3;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 19 Nov 2003 10:20:36 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Strange - need a little help
Message-Id: <bpfg5k$p3v$2@mamenchi.zrz.TU-Berlin.DE>
Oli Scheit <oli@scheit.de> wrote in comp.lang.perl.misc:
> Hi, all!
>
> I have the following problem:
> on one linux box the line
What version of linux. What version of Perl?
> $foo = 10 / 3;
> brings $foo to 3.333333e+something
^^^^^^^^^^
What is "something"? Please give us complete information. Even if you
think a detail is irrelevant -- since you obviously don't understand
the problem, it may not be. In this case it would be interesting if
the exponent is the correct one, or if it is even numeric.
> and a
> print sprintf '%.2f', $foo;
> fails due to the e+something.
If "something" is a (nonnegative integer) number it won't fail. What
is "something"?
> On my private linux box,
What version? What Perl version?
> the line
> $foo = 10 / 3;
> brings $foo to something like 3.3333333
>
> Probably different versions of Perl.
Probably, eh? No one but you can find out.
> Is there any way to convert the x.xxxxe+y
> to a formatted float?
Yes, sprintf. If the exponent is legal.
Anno
------------------------------
Date: Wed, 19 Nov 2003 13:37:21 -0000
From: "Ben Liddicott" <ben.liddicott@comodogroup.com>
Subject: Re: where is DBI::DWIM?
Message-Id: <bpfrmn$j2m$1@kylie.comodogroup.com>
Sorry, should be ? for parameter, not %.
"Ben Liddicott" <ben.liddicott@comodogroup.com> wrote in message
news:bpda5r$icl$1@kylie.comodogroup.com...
------------------------------
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.
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 5828
***************************************