[28325] in Perl-Users-Digest
Perl-Users Digest, Issue: 9689 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 5 18:05:47 2006
Date: Tue, 5 Sep 2006 15:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 5 Sep 2006 Volume: 10 Number: 9689
Today's topics:
Re: (Off topic) Cyberwar question <john@castleamber.com>
Re: (Off topic) Cyberwar question <bik.mido@tiscalinet.it>
Re: CPAN - 'cl' is not recognized as an internal or ext <uri@stemsystems.com>
Re: How to handle jpegs inside Net::NNTP <christoph.lamprecht.no.spam@web.de>
Re: How to handle jpegs inside Net::NNTP <christoph.lamprecht.no.spam@web.de>
Mail and Encoding <steve.lavoie@micromedica.com>
Re: map tricks <bik.mido@tiscalinet.it>
Re: Memory Limitations for Perl Programs? <tuser3@gmail.com>
Re: Memory Limitations for Perl Programs? <thepoet_nospam@arcor.de>
Re: Memory Limitations for Perl Programs? (Heinrich Mislik)
Re: Memory Limitations for Perl Programs? xhoster@gmail.com
Re: Memory Limitations for Perl Programs? <tadmc@augustmail.com>
Re: Memory Limitations for Perl Programs? <hamelcd@hotmail.com>
PERL 'pwd' equivalent??? kjstandish@gmail.com
Re: PERL 'pwd' equivalent??? <jurgenex@hotmail.com>
Re: PERL 'pwd' equivalent??? kjstandish@gmail.com
Re: PERL 'pwd' equivalent??? <john@castleamber.com>
Re: Perl socket timeout xhoster@gmail.com
Re: Perl socket timeout mdemmitt@gmail.com
Re: Regexp slowdown chris.ritchie@gmail.com
Re: Regexp slowdown <uri@stemsystems.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Sep 2006 17:43:31 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: (Off topic) Cyberwar question
Message-Id: <Xns983581729E982castleamber@130.133.1.4>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:
> John Bokma <john@castleamber.com> wrote in
> news:Xns9834B349E217Acastleamber@130.133.1.4:
>
>> "Jürgen Exner" <jurgenex@hotmail.com> wrote:
>>
>>> Yours for a better Usenet
>>
>> Writing versatel.nl about Skybuck might indeed help for a better
>> Usenet,
>
> Done.
:-) I contacted Versatel again, asking what they are going to do.
>> ploinking nor posting "I ploinked you" does :-).
>
> It is satisfying, though.
So is programming Perl ;-)
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
------------------------------
Date: 5 Sep 2006 21:43:23 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: (Off topic) Cyberwar question
Message-Id: <rmkrf2tlo1c5mej7uap68mpqf4fnogp7mf@4ax.com>
On 4 Sep 2006 14:11:14 -0700, "Skybuck" <skybuck2000@hotmail.com>
wrote:
[loads ay shite]
Oh ma perr wee lassie! Hud ah kent ye wir such a lurvely cunt ah
wid've joined yir cyberwar n aw fir sure, likesay. Sae long...
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Tue, 05 Sep 2006 14:11:01 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: CPAN - 'cl' is not recognized as an internal or external command,
Message-Id: <x7r6yq5glm.fsf@mail.sysarch.com>
>>>>> "S" == Sisyphus <sisyphus1@nomail.afraid.org> writes:
S> "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk> wrote in message
S> news:edjkcc$j21$1@frank-exchange-of-views.oucs.ox.ac.uk...
>> Ok you seem to be using ActivePerl for windows (you didn't say :)). This
S> is
>> compiled using Visual C++ version 6, and you have to use the same compiler
>> to build Perl modules that contain any functions written in C.
S> That's not strictly true any more - though you won't go wrong if you follow
S> that advice.
S> Some time back ExtUtils::FakeConfig appeared, which enables you to use the
S> freely available MinGW (gcc) compiler with ActivePerl. It provides good
S> milage, too.
S> Then, starting with build 817 (I think), ActivePerl started working
S> seamlessly with the MinGW compiler (though ActivePerl is still built with
S> MSVC++6.0). They haven't got it quite right, however - and it doesn't
S> provide the milage you get with ExtUtils::FakeConfig. However, for many
S> extensions (modules), it works fine.
and for the future there is a project going on called 'vanilla perl'
which will bundle a gcc build kit with a precompiled perl for
winblows. this will allow use of the cpan module and classic tarball
installation of any perl module, with or without xs/c. then the issue of
ppm modules being out of date will also go away (as soon as this gets
released and disseminated. like most winblows updates, who knows when it
will be downloaded? :).
http://sourceforge.net/project/showfiles.php?group_id=158775
http://camelpack.sourceforge.net/index.php/VanillaPerl
maybe any of you would want to help with testing or whatever.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Tue, 05 Sep 2006 21:58:12 +0200
From: Ch Lamprecht <christoph.lamprecht.no.spam@web.de>
Subject: Re: How to handle jpegs inside Net::NNTP
Message-Id: <edkksi$uoh$1@online.de>
Michele Dondi wrote:
Abigails code:
>>>$; # A lone dollar?
>>>=$"; # Pod?
>>>$; # The return of the lone dollar?
>>>{Just=>another=>Perl=>Hacker=>} # Bare block?
>>>=$/; # More pod?
>>>print%; # No right operand for %?
> if you just remove a pair of
> newlines and think that $; and %; are variable names like any other,
they are not.
> then it's not that obscure any more, althouth not less brilliant and
> fascinating!
>
> $; = $";
> $;{Just=>another=>Perl=>Hacker=>} = $/;
> print %; ;
Could anybody explain, why perl will execute the code above under 'use strict'
whereas it will not do so, when %; is replaced by %foo like so:
use strict;
use warnings;
$; # A lone dollar?
=$"; # Pod?
$foo # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print %foo ; # No right operand for %?
I can't find a special variable %; in the docs.
Christoph
--
perl -e "print scalar reverse q/ed.enilno@ergn.l.hc/"
------------------------------
Date: Tue, 05 Sep 2006 22:10:06 +0200
From: Ch Lamprecht <christoph.lamprecht.no.spam@web.de>
Subject: Re: How to handle jpegs inside Net::NNTP
Message-Id: <edklit$4o3$1@online.de>
Ch Lamprecht wrote:
> Michele Dondi wrote:
>
> Abigails code:
>
>>>> $; # A lone dollar?
>>>> =$"; # Pod?
>>>> $; # The return of the lone dollar?
>>>> {Just=>another=>Perl=>Hacker=>} # Bare block?
>>>> =$/; # More pod?
>>>> print%; # No right operand for %?
>
>
>> if you just remove a pair of
>> newlines and think that $; and %; are variable names like any other,
>
> they are not.
>
>> then it's not that obscure any more, althouth not less brilliant and
>> fascinating!
>>
>> $; = $";
>> $;{Just=>another=>Perl=>Hacker=>} = $/;
>> print %; ;
>
>
> Could anybody explain, why perl will execute the code above under 'use
> strict'
> whereas it will not do so, when %; is replaced by %foo like so:
>
> use strict;
> use warnings;
> $; # A lone dollar?
> =$"; # Pod?
> $foo # The return of the lone dollar?
> {Just=>another=>Perl=>Hacker=>} # Bare block?
> =$/; # More pod?
> print %foo ; # No right operand for %?
>
>
sorry, I missed this (from perlvar):
Perl identifiers that begin with digits, control characters, or punctuation
characters are exempt from the effects of the package declaration and are always
forced to be in package main; they are also exempt from strict 'vars' errors.
Christoph
--
perl -e "print scalar reverse q/ed.enilno@ergn.l.hc/"
------------------------------
Date: Tue, 05 Sep 2006 15:34:41 -0400
From: steve <steve.lavoie@micromedica.com>
Subject: Mail and Encoding
Message-Id: <zmkLg.30408$ED.23735@read2.cgocable.net>
Hi!
I am trying to parse every email I am getting in a spam@domain.com. I
can pull the email using Net::POP3. I am parsing each email using a
Mail::Internet object. The problem I am getting is that in certain case,
like Outlook forward message where the signature is in HTML some
special characters are encode like =20 . Most message are in french so I
have some special character like é è and so on.
I have tried Encode:: module but I dont know from which table to what I
should convert.
Anyone got some ideas?
Sorry for my bad english.. I am french native.
Steve Lavoie
Network administrator
Micromédica
------------------------------
Date: 5 Sep 2006 21:46:01 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: map tricks
Message-Id: <0skrf2t6ad71a4v3t4or9c48t1h4oesnot@4ax.com>
On Tue, 05 Sep 2006 03:33:07 -0400, Uri Guttman <uri@stemsystems.com>
wrote:
>you said BACKTICKS! i HATE BACKTICKS!! they ruined my marriage, caused
>my bankrupty and they also trigger my lumbago!!
Me too! That's why in the rare cases i really need them (in Perl, that
is) I always use qx with alternative delimiters. And even in bash I
use $() rather than them, especially since the former not is IMHO
clearer, but also allows nesting which is a big win.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: 5 Sep 2006 08:26:30 -0700
From: "tuser" <tuser3@gmail.com>
Subject: Re: Memory Limitations for Perl Programs?
Message-Id: <1157469990.487199.134720@h48g2000cwc.googlegroups.com>
Chris Hamel wrote:
> This may not be a Perl issue per se, but our Unix support people don't
> have any insight and I was hoping to get some direction.
>
> We have Perl (5.8.0) installed on an AIX server. The server itself is
> capable of handling 32-bit processes as large as about 2 GB, and we've
> never found a ceiling for the 64-bit processes (only 32 GB on the
> server, and we've run programs as large as 22 GB). When I run programs
> in Perl, however, they core dump once the process hits about 250 MB.
I don't claim to know the answer, but I think it might be helpful if
you could show us what is displayed after you issue the command "perl
-V" (that's perl in lowercase and with a capital "V") on your console.
------------------------------
Date: Tue, 05 Sep 2006 17:30:10 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: Memory Limitations for Perl Programs?
Message-Id: <44fd9803$0$18481$9b4e6d93@newsspool3.arcor-online.net>
Chris Hamel wrote:
> This may not be a Perl issue per se, but our Unix support people don't
> have any insight and I was hoping to get some direction.
>
> We have Perl (5.8.0) installed on an AIX server. The server itself is
> capable of handling 32-bit processes as large as about 2 GB, and we've
> never found a ceiling for the 64-bit processes (only 32 GB on the
> server, and we've run programs as large as 22 GB). When I run programs
> in Perl, however, they core dump once the process hits about 250 MB.
>
> In many cases, we can get around this by using the BerkeleyDB module,
> but this results in a significant performance hit and requires some
> data structure reengineering.
>
> Unfortunately, I am fairly Unix ignorant. I did not install Perl on
> Unix, nor would I know how to. I just use what the Unix admins
> installed for us. What I'm trying to find out is if there is a runtime
> option or an option on installation (compilation?) that enables Perl to
> have a higher threshhold than 250 MB.... or is this a limitation built
> into Perl?
I've hardly had any serious encounters with AIX, so I'm just pulling
together the few crumbs that crossed my way: 256MB is, if I remember
correctly, a standard page size and the usual limit for allocating
memory in one take. Whether more can be used depends on the exact OS
version, compile time settings and/or environment settings. AFAIR
there is an explicit Large-Memory readme on the IBM site where this
is all explained in detail.
The Keywords for a search should be "-bmaxdata", "LARGE_PAGE_DATA" and
"LDR_CNTRL".
Perl itself has no memory limits whatsoever apart from those imposed
by the operating system or hardware it runs on.
HTH
-Chris
------------------------------
Date: 05 Sep 2006 15:58:00 GMT
From: Heinrich.Mislik@univie.ac.at (Heinrich Mislik)
Subject: Re: Memory Limitations for Perl Programs?
Message-Id: <44fd9e87$0$10578$3b214f66@usenet.univie.ac.at>
In article <1157467485.777969.57110@i42g2000cwa.googlegroups.com>, hamelcd@hotmail.com says...
>
>
>This may not be a Perl issue per se, but our Unix support people don't
>have any insight and I was hoping to get some direction.
>
>We have Perl (5.8.0) installed on an AIX server. The server itself is
>capable of handling 32-bit processes as large as about 2 GB, and we've
>never found a ceiling for the 64-bit processes (only 32 GB on the
>server, and we've run programs as large as 22 GB). When I run programs
>in Perl, however, they core dump once the process hits about 250 MB.
If your perl is 32 bit (as /usr/opt/perl5/bin/perl that comes with AIX),
the following may help:
http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/genprogc/lrg_prg_support.htm#a179c11c5d
cheers
Heinrich
--
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140
------------------------------
Date: 05 Sep 2006 16:00:11 GMT
From: xhoster@gmail.com
Subject: Re: Memory Limitations for Perl Programs?
Message-Id: <20060905120028.305$UW@newsreader.com>
"Chris Hamel" <hamelcd@hotmail.com> wrote:
> This may not be a Perl issue per se, but our Unix support people don't
> have any insight and I was hoping to get some direction.
>
> We have Perl (5.8.0) installed on an AIX server.
You should upgrade that. 5.8.0 is fairly buggy (but I have no particular
reason to think that that is the source of this particular problem.)
> The server itself is
> capable of handling 32-bit processes as large as about 2 GB, and we've
> never found a ceiling for the 64-bit processes (only 32 GB on the
> server, and we've run programs as large as 22 GB). When I run programs
> in Perl, however, they core dump once the process hits about 250 MB.
Is this with a wide variety of perl programs, or have you only tried
one program? How about something like:
perl -le 'my @x=1..1e7; system "ps -p $$ -o rss"; sleep'
Can you run large non-Perl processes from the very same account
in which you are having problems with perl (it could be a shell limit/
ulimit problem).
>
> In many cases, we can get around this by using the BerkeleyDB module,
> but this results in a significant performance hit and requires some
> data structure reengineering.
Have you considered using something like Mysql or PostgreSQL?
> Unfortunately, I am fairly Unix ignorant. I did not install Perl on
> Unix, nor would I know how to. I just use what the Unix admins
> installed for us. What I'm trying to find out is if there is a runtime
> option or an option on installation (compilation?) that enables Perl to
> have a higher threshhold than 250 MB.... or is this a limitation built
> into Perl?
>
> Any information or feedback I can pass on to our Unix admins would be
> most appreciated.
There is no such limitation intentionally built into perl. It is probably
either something with your system itself, or some buggy interaction between
your perl build and your system.
> Also, for what it's worth, our programs really are that large. We've
> done a number of things to try to reduce the footprint of the programs
> (other than what's in perldoc -q memory). One example I learned is
> that that doing this:
>
> $part_info{$part} = [ $nomenclature, $cost, $min_qty, $max_qty ];
>
> takes up more memory than this:
>
> $part_info{$part} = join '|', $nomenclature, $cost, $min_qty,
> $max_qty;
>
> (not to mention not working with Berkeley). But the bottom line is the
> data we bring together is huge.
Are you sure you can't bring it together outside of Perl, then? What you
have shown seems like the raison d’être for SQL databases.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Tue, 5 Sep 2006 10:57:49 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Memory Limitations for Perl Programs?
Message-Id: <slrnefr7jt.1fk.tadmc@magna.augustmail.com>
Chris Hamel <hamelcd@hotmail.com> wrote:
> or is this a limitation built
> into Perl?
No.
perl will happily use all the available memory.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 5 Sep 2006 10:48:55 -0700
From: "Chris Hamel" <hamelcd@hotmail.com>
Subject: Re: Memory Limitations for Perl Programs?
Message-Id: <1157478535.575095.214850@e3g2000cwe.googlegroups.com>
In Reply to various posts...
ONE.
> it might be helpful if you could show us what is displayed after you
> issue the command "perl -V"
When I perl -V, I get the following:
Summary of my perl5 (revision 5.0 version 8 subversion 0)
configuration:
Platform:
osname=3Daix, osvers=3D4.3.3.0, archname=3Daix
uname=3D'aix prod21 3 4 000a932f4c00 '
config_args=3D'-des'
hint=3Drecommended, useposix=3Dtrue, d_sigaction=3Ddefine
usethreads=3Dundef use5005threads=3Dundef useithreads=3Dundef
usemultiplicity=3Dundef
useperlio=3Ddefine d_sfio=3Dundef uselargefiles=3Ddefine usesocks=3Dund=
ef
use64bitint=3Dundef use64bitall=3Dundef uselongdouble=3Dundef
usemymalloc=3Dn, bincompat5005=3Dundef
Compiler:
cc=3D'cc', ccflags =3D'-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-qmaxmem=3D16384 -qnoansialias -DUSE_NATIVE_DLOPEN -q32 -D_LARGE_FILES
-qlonglong',
optimize=3D'-O',
cppflags=3D'-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-qmaxmem=3D16384 -qnoansialias -DUSE_NATIVE_DLOPEN'
ccversion=3D'3.6.4.0', gccversion=3D'', gccosandvers=3D''
intsize=3D4, longsize=3D4, ptrsize=3D4, doublesize=3D8, byteorder=3D4321
d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdblsize=
=3D8
ivtype=3D'long', ivsize=3D4, nvtype=3D'double', nvsize=3D8, Off_t=3D'of=
f_t',
lseeksize=3D8
alignbytes=3D8, prototype=3Ddefine
Linker and Libraries:
ld=3D'ld', ldflags =3D' -brtl -L/usr/local/lib -b32'
libpth=3D/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=3D-lbind -lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW
perllibs=3D-lbind -lnsl -ldl -lld -lm -lc -lcrypt -lbsd -lPW
libc=3D/lib/libc.a, so=3Da, useshrplib=3Dfalse, libperl=3Dlibperl.a
gnulibc_version=3D''
Dynamic Linking:
dlsrc=3Ddl_aix.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D'
-bE:/usr/local/lib/perl5/5.8.0/aix/CORE/perl.exp'
cccdlflags=3D' ', lddlflags=3D' -bhalt:4 -bM:SRE
-bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lc
-L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under aix
Compiled at Jul 17 2003 17:16:18
@INC:
/usr/local/lib/perl5/5.8.0/aix
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/aix
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
.
TWO.
> there is an explicit Large-Memory readme on the IBM site where this
> is all explained in detail.
> The Keywords for a search should be "-bmaxdata", "LARGE_PAGE_DATA" and
> "LDR_CNTRL".
- - -
> If your perl is 32 bit (as /usr/opt/perl5/bin/perl that comes with AIX),
> the following may help:
> http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/gen...
These comments / link regarding large memory looks very promising and
appears to describe exactly what I'm experiencing. I don't know what
the lead time is to get this understood and changed, but I am hopeful.
Thank you kindly; I will pursue this.
THREE.
> You should upgrade that. 5.8.0 is fairly buggy (but I have no particular
> reason to think that that is the source of this particular problem.)
Perl 5.8.0 is buggy? I did not know that. I do have infrequent
problems with variables holding values I have never assigned or
dropping values for no apparent reason. Perhaps it is time to upgrade.
If we have to re-compile anyway...
FOUR.
> Is this with a wide variety of perl programs, or have you only tried
> one program? How about something like:
The Ceiling applies to pretty much every program we run. We have 300+
Perl programs in our production environment, only a couple dozen of
which we've had to invoke BerkeleyDB due to this problem.
FIVE.
> Are you sure you can't bring it together outside of Perl, then? What you
> have shown seems like the raison d'=EAtre for SQL databases.
My code snipped may have oversimplified the tasks at hand.
With regards to taking my solutions outside of Perl... we do, as often
as we can, and much of our data is already in Oracle or DB2 tables.
More importantly, we incorporate quite a bit of SQL into our Perl.
However, at the risk of boring you with the details of my work
environment, I'll share with you why Perl works so wonderfully for us
and why we want to expand its use.
I work for a company that builds helicopters. The product can take
years to build, and a single aircraft can have 10,000+ components, each
one needed and scheduled to deliver at various points in those years it
takes to complete the product. We use a planning / scheduling tool
which runs in memory and operates off of delimited flat files... which
initally come from a mainframe (fixed-width).
Perl is masterful at how it can handle the flat files, both before we
load them into the models and after we get the data out of the models.
We create hundreds of different reports from these flat files, most of
which we output to MS Excel spreadsheets (God bless
Spreadsheet::WriteExcel). Many of our programs require a lot of
recursion, specifically when we want to tie a deliverable aircraft to
the lowest component or vice versa. If you saw how the data was
structured it would make a lot more sense.
I work closely with a database/SQL guru, and he's not comfortable with
recursion in SQL. Maybe that's our own ignorance, but with Perl
handling it all so nicely, it hardly seems important. I could be
wrong; after all, it's me that's asking for help, n'est-ce pas?
I guess we would offload some of these tasks to databases... but then
we would be loading the databases, running the programs, dumping the
databases back to flat files. Quite a bit of overhead for what is
currently a pretty speedy process in Perl.
SIX.
> perl will happily use all the available memory.
Somehow I thought it would... But you never know. Didn't DOS have a
self-imposed memory limitation?
I am grateful for all of the insight and advice. Thank you for your
replies.
Chris H.
------------------------------
Date: 5 Sep 2006 09:03:42 -0700
From: kjstandish@gmail.com
Subject: PERL 'pwd' equivalent???
Message-Id: <1157472222.271510.219580@i42g2000cwa.googlegroups.com>
I am a novice with PERL and am writing a script that will be used on
both UNIX and Windows platforms. I need a PERL function that will
return the current path (similar to 'pwd' in UNIX) so I can use full
path info. in filenames etc. Please advise...thanks in advance!
------------------------------
Date: Tue, 05 Sep 2006 16:13:47 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: PERL 'pwd' equivalent???
Message-Id: <%mhLg.4741$ub5.1781@trnddc07>
kjstandish@gmail.com wrote:
> I am a novice with PERL and am writing a script that will be used on
> both UNIX and Windows platforms. I need a PERL function that will
> return the current path (similar to 'pwd' in UNIX) so I can use full
> path info. in filenames etc. Please advise...thanks in advance!
See "perldoc Cwd"
jue
------------------------------
Date: 5 Sep 2006 09:21:34 -0700
From: kjstandish@gmail.com
Subject: Re: PERL 'pwd' equivalent???
Message-Id: <1157473294.304430.139990@h48g2000cwc.googlegroups.com>
Perfect...thanks!
J=FCrgen Exner wrote:
> kjstandish@gmail.com wrote:
> > I am a novice with PERL and am writing a script that will be used on
> > both UNIX and Windows platforms. I need a PERL function that will
> > return the current path (similar to 'pwd' in UNIX) so I can use full
> > path info. in filenames etc. Please advise...thanks in advance!
>=20
> See "perldoc Cwd"
>=20
> jue
------------------------------
Date: 5 Sep 2006 17:48:18 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: PERL 'pwd' equivalent???
Message-Id: <Xns9835824238003castleamber@130.133.1.4>
kjstandish@gmail.com wrote:
> Perfect...thanks!
Write replies, even if they are short, *under* the part you're replying
to, and remove all lines that are no longer needed to provide a context to
understand your reply [1].
Furthermore: perl is the program that reads, compiles, and executes your
program written in Perl.
PERL is something different [2]
[1] <http://johnbokma.com/mexit/2006/04/11/how-to-reply.html>
[2]
<http://answers.com/topic/principal-exchange-rate-linked-security-perl>
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
------------------------------
Date: 05 Sep 2006 16:08:47 GMT
From: xhoster@gmail.com
Subject: Re: Perl socket timeout
Message-Id: <20060905120904.479$lN@newsreader.com>
mdemmitt@gmail.com wrote:
> Hi,
> I am new to perl socket programming. I have written a simple perl
> server. I call:
> $client = $server->accept()
>
> I want the $client socket to timeout and automatically close after 15
> seconds.
From what you have shown, you are not doing anything with the $client
connection, so there is nothing to time out. Is it really the accept
call (on the $server socket) which you wish to timeout?
> Is this possible. I've googled for this, but can't find
> anything specific to my question. Anyone have experience with this.
There is more than one way to do it, and the best way depends on what
you want to do after timing out. You could use "alarm", or you could
use IO::Select. (If canread returns the $server socket, then you know you
can call accept on it without blocking.)
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 5 Sep 2006 13:49:38 -0700
From: mdemmitt@gmail.com
Subject: Re: Perl socket timeout
Message-Id: <1157489378.461798.54540@i42g2000cwa.googlegroups.com>
xhoster@gmail.com wrote:
> mdemmitt@gmail.com wrote:
> > Hi,
> > I am new to perl socket programming. I have written a simple perl
> > server. I call:
> > $client = $server->accept()
> >
> > I want the $client socket to timeout and automatically close after 15
> > seconds.
>
> From what you have shown, you are not doing anything with the $client
> connection, so there is nothing to time out. Is it really the accept
> call (on the $server socket) which you wish to timeout?
The code above is not all of the code. The line above is used to
accept an incoming connection. Afterwards, I read from and write to
$client. Eventually, when the client wants the server to close the
connection it sends a specific token, let's say the token is "END". I
want to account for the possibility of the client machine crashing or
failing to send END. To account for these possibilities, I want $client
to automatically close 15 seconds after it has been opened. Is this
possible? I will look into alarm and see if there is a way I can use
that to replicate the functionality I am looking for. It would be
nice, however, to be able to set some timeout value for a client
socket.
Thanks,
Mike
>
> > Is this possible. I've googled for this, but can't find
> > anything specific to my question. Anyone have experience with this.
>
> There is more than one way to do it, and the best way depends on what
> you want to do after timing out. You could use "alarm", or you could
> use IO::Select. (If canread returns the $server socket, then you know you
> can call accept on it without blocking.)
>
> Xho
>
> --
> -------------------- http://NewsReader.Com/ --------------------
> Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 5 Sep 2006 10:17:09 -0700
From: chris.ritchie@gmail.com
Subject: Re: Regexp slowdown
Message-Id: <1157476629.049658.287390@m79g2000cwm.googlegroups.com>
For the people who've actually suggested things: thanks for the sincere
responses. I'll work this one out.
For the flamers: settle. I didn't come here to muck up your forum.
I'm sorry I can't post my code, but I can't take it out of context
enough to make it nonproprietary. But I've only asked for help with
ways the intepreter works and interfaces with the OS, which is what I
need. If I can't spot fundamental errors in my regexs, then I have
bigger problems.
And as the arguments have become repetative (as in, someone's not
reading what's already been said) there is no longer any point.
------------------------------
Date: Tue, 05 Sep 2006 14:01:34 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Regexp slowdown
Message-Id: <x7veo25h1d.fsf@mail.sysarch.com>
>>>>> "AQ" == Ala Qumsieh <notvalid@email.com> writes:
AQ> chris.ritchie@gmail.com wrote:
>> I have a subroutine that does a rather extensive expression match (the
>> expression is ~80 characters long). It's looking for this expression
>> in strings limited to 500 characters.
AQ> [snip]
>> What else could it be?
AQ> I suggest you strip down the code to the barest minimum, and see what
AQ> is the cause for the slowdown.
AQ> Another thought is whether you are using any of the special regexp
AQ> variables: $& $' $`
those will slow down other regexes as it forces copies of the string to
be made in other regexes even if they don't grab anything. using those
is not likely to slow a regex down based on the input.
AQ> Of course, as other said, it is impossible to guess what is causing
AQ> the problem without seeing any code.
hmm, do i hear a greek chorus of that chant?
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 9689
***************************************