[15449] in Perl-Users-Digest
Perl-Users Digest, Issue: 2859 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 25 14:05:57 2000
Date: Tue, 25 Apr 2000 11:05:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <956685915-v9-i2859@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 25 Apr 2000 Volume: 9 Number: 2859
Today's topics:
Any Free Web Site That Allows Running Perl CGI? (William Djaja Tjokroaminata)
Re: Any Free Web Site That Allows Running Perl CGI? (Randal L. Schwartz)
Re: Any Free Web Site That Allows Running Perl CGI? <adam.fletch@ntlworld.com>
Re: bit manipulation <sb@muccpu1.muc.sdm.de>
Re: Can I use perl to report free disk space in NT? <nasinowski@hbesoftware.com>
Re: CGI script changing NIS+ password <rootbeer@redcat.com>
Re: Converting hex/decimal to binary <sb@muccpu1.muc.sdm.de>
Re: Critique My Code <sariq@texas.net>
Re: Crypt module suggestions <adams1015@worldnet.att.net>
Re: Date standardization without Date::Manip <sariq@texas.net>
Re: Date standardization without Date::Manip <sb@muccpu1.muc.sdm.de>
Re: Decimal to Hex <sb@muccpu1.muc.sdm.de>
Re: Decimal to Hex (Randal L. Schwartz)
Re: Decimal to Hex <sb@muccpu1.muc.sdm.de>
Re: Decimal to Hex (Randal L. Schwartz)
Easy Installation of Modules <shon@mad.scientist.com>
Re: Easy Installation of Modules <tony_curtis32@yahoo.com>
Re: Easy Installation of Modules <sb@muccpu1.muc.sdm.de>
Efficient manipulation of simple date? (Jesse T Sheidlower)
exception handling (Michael P. Soulier)
How to delete multiple files from an array of file name <scotnet@sympac.com.au>
Re: How to delete multiple files from an array of file <aqumsieh@hyperchip.com>
Re: How to delete multiple files from an array of file <sariq@texas.net>
Re: how to get the error string for ($? >> 8) <lr@hpl.hp.com>
Re: how to put this in one reg exp. <lr@hpl.hp.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 25 Apr 2000 14:23:31 GMT
From: billtj@Glue.umd.edu (William Djaja Tjokroaminata)
Subject: Any Free Web Site That Allows Running Perl CGI?
Message-Id: <8e49p3$t2e$1@hecate.umd.edu>
Hi,
Does anybody know any free web site where we can have our own web page and
where we also can run CGI scripts, especially Perl CGI scripts?
I just got my free web site at www.geocities.com, but apparently I can
only create static HTML pages.
Thanks.
Regards,
Bill
------------------------------
Date: 25 Apr 2000 07:55:11 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Any Free Web Site That Allows Running Perl CGI?
Message-Id: <m1g0sab580.fsf@halfdome.holdit.com>
>>>>> "William" == William Djaja Tjokroaminata <billtj@Glue.umd.edu> writes:
William> Does anybody know any free web site where we can have our own
William> web page and where we also can run CGI scripts, especially
William> Perl CGI scripts?
William> I just got my free web site at www.geocities.com, but apparently I can
William> only create static HTML pages.
www.prohosting.com
www.virtualave.net
if there are more, please tell me.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Tue, 25 Apr 2000 18:39:13 +0100
From: "Fletch" <adam.fletch@ntlworld.com>
Subject: Re: Any Free Web Site That Allows Running Perl CGI?
Message-Id: <6LkN4.2639$Ci6.53233@news6-win.server.ntlworld.com>
http://www.f2s.com
------------------------------
Date: 25 Apr 2000 15:26:27 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: Re: bit manipulation
Message-Id: <8e4df3$d80$2@solti3.sdm.de>
In article <MPG.1359c52e70d87a798a8b4@nntp.hpl.hp.com>, Larry Rosler <lr@hpl.hp.com> wrote:
> In article <8cmd85$r4q$1@fcnews.fc.hp.com> on 8 Apr 2000 04:40:37 GMT,
> Jack Applin <neutron@fc.hp.com> says...
>> I have the following dreadful code:
>>
>> ($secs, $mins, $hours, $days, $mons, $years) = (
>> ($when>>0) & 0x1f,
>> ($when>>5) & 0x3f,
>> - ($when>>11) & 0x1f,
>> ($when>>16) & 0x1f,
>> ($when>>21) & 0x0f,
>> ($when>>25) & 0x1f,
>> );
>>
>> There must be a better way to do this. It seems that unpack could be used,
>> but the b format doesn't seem right. Any ideas?
> Yes. Use a 'better' (i.e. maybe two orders of magnitude faster)
> language for this task.
> union { unsigned i;
> unsigned secs:5, mins:6, hours:5, days:5, mons:4, years:5;
> } u;
> unsigned when, secs, mins, hours, days, mons, years;
> u.i = when;
> secs = u.secs;
> mins = u.mins;
> ...
> I'm surprised Steffen Beyer hasn't chimed in yet with how Bit::Vector or
> whatever will solve this right in Perl.
I didn't because I think the Bit::Vector module would be an overkill in
this case! :-)
And the solution with pack/unpack looks very effective to me - anyway,
I'm not an expert on pack/unpack, you better stick to whatever Larry
says in this matter! :-)
Best regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: Tue, 25 Apr 2000 14:33:21 GMT
From: Nelson Asinowski <nasinowski@hbesoftware.com>
Subject: Re: Can I use perl to report free disk space in NT?
Message-Id: <3905ACAC.1080105@hbesoftware.com>
dbm wrote:
> =
> I am trying to write a (please don't laugh) Batch file to check
> the available disk space on about 45 servers. =
> =
> I am going to run this machine on an NT domain, using an account
> with admin rights. All of the disk space queries will be done
> using unc names, not hard mapping.
Goto the following page
http://www.deja.com/home_ps.shtml
on the keyword line enter the words "disk" and "space"
on the forum line put in "comp.lang.perl.misc"
then run the search. =A0 You will get about 300 hits but within one or tw=
o =
pages you will
see the past discussions on this question.
------------------------------
Date: Tue, 25 Apr 2000 10:58:44 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: CGI script changing NIS+ password
Message-Id: <Pine.GSO.4.10.10004251056040.25963-100000@user2.teleport.com>
On Tue, 25 Apr 2000 bolero92@my-deja.com wrote:
> Is there any example of cgi script
> which is used for changing NIS+ password?
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service.
> If no, can you tell me how to do it?
It's probably a bad idea, but if you're really set on doing it.... Use a
Usenet archive (such as Deja) to see what's been said when others have
asked this question.
http://www.deja.com/
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 25 Apr 2000 15:29:04 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: Re: Converting hex/decimal to binary
Message-Id: <8e4dk0$d80$3@solti3.sdm.de>
In comp.lang.perl.misc H C <carvdawg@patriot.net> wrote:
> Before I start down this road, does anyone have any working
> examples of turning a hex or decimal number into it's representative
> binary 1's and 0's?
-------------------- cut here -------------------- cut here --------------------
Suggestion for the perlfaq4 manpage:
------------------------------------
How do I convert from hexadecimal to decimal:
1) $dec = 0xDEADBEEF;
2) $dec = hex("DEADBEEF");
3) $dec = unpack("N", pack("H8", substr("0" x 8 . "DEADBEEF", -8)));
4) use Bit::Vector;
$vec = Bit::Vector->new_Hex(32, "DEADBEEF");
$dec = $vec->to_Dec();
How do I convert from decimal to hexadecimal:
1) $hex = sprintf("%X", 3735928559);
2) $hex = unpack("H*", pack("N", 3735928559));
3) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$hex = $vec->to_Hex();
How do I convert from octal to decimal:
1) $dec = 033653337357; # note the leading '0'
2) $dec = oct("33653337357");
3) use Bit::Vector;
$vec = Bit::Vector->new(32);
$vec->Chunk_List_Store(3, split(//, reverse "33653337357"));
$dec = $vec->to_Dec();
How do I convert from decimal to octal:
1) $oct = sprintf("%o", 3735928559);
2) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$oct = reverse join('', $vec->Chunk_List_Read(3));
How do I convert from binary to decimal:
1) $dec = unpack("N", pack("B32",
substr("0" x 32 . "11011110101011011011111011101111", -32)));
2) use Bit::Vector;
$vec = Bit::Vector->new_Bin(32, "11011110101011011011111011101111");
$dec = $vec->to_Dec();
How do I convert from decimal to binary:
1) $bin = unpack("B*", pack("N", 3735928559));
2) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$bin = $vec->to_Bin();
The remaining transformations (e.g. hex -> oct, bin -> hex, etc.)
are left as an exercise to the inclined reader. :-)
Note: The advantage of the Bit::Vector module is that it works with
numbers of ANY size and that it is optimized for speed (it is
written in C, internally, and uses very efficient algorithms).
Note: Instead of $vec = Bit::Vector->new_Dec(32, -559038737);
you can also use $vec = Bit::Vector->new_Dec(33, 3735928559);
and possibly $vec->Resize(32); afterwards if necessary.
-------------------- cut here -------------------- cut here --------------------
Hope this helps! :-)
Yours,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: Tue, 25 Apr 2000 09:02:55 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Critique My Code
Message-Id: <3905A58F.D477AAB7@texas.net>
Gabe wrote:
>
> "Tom Briles" <sariq@texas.net> wrote in message
> news:3904999C.821D0FA9@texas.net...
> > You'll want to turn on warnings and taint checking here (-wT).
>
> I've read the docs on the taint switch, but I don't understand it. What does
> it do? Why is it useful?
I don't know to what docs you're referring (perlrun?), but
perldoc -q taint # (which points you to perlsec)
explains all.
- Tom
------------------------------
Date: Tue, 25 Apr 2000 14:39:33 GMT
From: "Veronica Adams" <adams1015@worldnet.att.net>
Subject: Re: Crypt module suggestions
Message-Id: <F6iN4.22690$PV.1600981@bgtnsc06-news.ops.worldnet.att.net>
Tom Phoenix <rootbeer@redcat.com> wrote in message
> These are good questions, but it's like saying, "I'm going to be fixing my
> house up this weekend. Any ideas which tools I should use?" :-)
Yea I know. You can use a hack saw on wood but man, its made for metal :)
> If you're wanting to encrypt these so that, in case someone hacks into
> your machine, your customers' credit card numbers won't be revealed: Don't
> do it that way. Put the secret information onto another machine, behind a
> firewall which lets the data go through one-way only.
No, no, no. The ssl stuff is on another machine, and behind a firewall. I
wouldn't touch it otherwise. I just want the cc# encrypted wile they sit on
the server for added security. I know that if they really want the info they
break the encryption but it'd be one more pain to go through.
>
> If you're wanting your users to be able to work with you over an encrypted
> web connection, you should probably search for the docs, FAQs, and
> newsgroups about web servers and how to make secure web connections.
I know how to use sll/shttp. Thats not really my question. I'll be more
clear next time.
> If you're wondering, "How can I tell which encryption methods are just
> snake oil?" you should probably find an encryption expert to advise you.
>
> My favorite encryption module is, of course, Crypt::Rot13. What I like
> most is the author's attempts to keep it up-to-date: It's already at
> version 0.6!
>
Sarcasm? :p
------------------------------
Date: Tue, 25 Apr 2000 09:28:41 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Date standardization without Date::Manip
Message-Id: <3905AB99.21F5DA78@texas.net>
[ Another Jeopardectomy performed ]
> >
> > Place your response *after* the quoted text. Properly quote the
> message
> > so that the author is attributable.
> >
drode@my-deja.com wrote:
>
> Your *opinion* on the proper method to quote is noted.
It's not an opinion. Kindly help yourself (and others) by reading the
FAQs about Usenet.
Time to lower the killfile score for "my-deja.com" (again).
Oh, and if you want me to see your response, you'll have to change your
address (again).
- Tom
------------------------------
Date: 25 Apr 2000 15:50:19 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: Re: Date standardization without Date::Manip
Message-Id: <8e4err$dla$3@solti3.sdm.de>
In article <8e280o$6n8$1@nnrp1.deja.com>, drode@my-deja.com wrote:
> I am not asking if I should use the mod, I am stating that I cannot use
> it.
> Therefore, I would like to know if anyone else has sloved a similar
> problem WITHOUT using Date:Manip.
>>
>> Have you seen the advice in the Date::Manip docs about "SHOULD I USE
>> DATE::MANIP"? Cheers!
Have you had a look at Date::Calc?
It is written in C, internally, and should be much faster than Date::Manip.
However, there is also a certain penalty involved in loading the module
first, of course.
Regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: 25 Apr 2000 15:46:08 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: Re: Decimal to Hex
Message-Id: <8e4ek0$dla$2@solti3.sdm.de>
In article <38F8ED79.942962B4@crosswinds.net>, Greg Willatt <gpwillatt@crosswinds.net> wrote:
> I was wondering if ther was a function for converting Decimal into hex ?
-------------------- cut here -------------------- cut here --------------------
Suggestion for the perlfaq4 manpage:
------------------------------------
How do I convert from hexadecimal to decimal:
1) $dec = 0xDEADBEEF;
2) $dec = hex("DEADBEEF");
3) $dec = unpack("N", pack("H8", substr("0" x 8 . "DEADBEEF", -8)));
4) use Bit::Vector;
$vec = Bit::Vector->new_Hex(32, "DEADBEEF");
$dec = $vec->to_Dec();
How do I convert from decimal to hexadecimal:
1) $hex = sprintf("%X", 3735928559);
2) $hex = unpack("H*", pack("N", 3735928559));
3) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$hex = $vec->to_Hex();
How do I convert from octal to decimal:
1) $dec = 033653337357; # note the leading '0'
2) $dec = oct("33653337357");
3) use Bit::Vector;
$vec = Bit::Vector->new(32);
$vec->Chunk_List_Store(3, split(//, reverse "33653337357"));
$dec = $vec->to_Dec();
How do I convert from decimal to octal:
1) $oct = sprintf("%o", 3735928559);
2) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$oct = reverse join('', $vec->Chunk_List_Read(3));
How do I convert from binary to decimal:
1) $dec = unpack("N", pack("B32",
substr("0" x 32 . "11011110101011011011111011101111", -32)));
2) use Bit::Vector;
$vec = Bit::Vector->new_Bin(32, "11011110101011011011111011101111");
$dec = $vec->to_Dec();
How do I convert from decimal to binary:
1) $bin = unpack("B*", pack("N", 3735928559));
2) use Bit::Vector;
$vec = Bit::Vector->new_Dec(32, -559038737);
$bin = $vec->to_Bin();
The remaining transformations (e.g. hex -> oct, bin -> hex, etc.)
are left as an exercise to the inclined reader. :-)
Note: The advantage of the Bit::Vector module is that it works with
numbers of ANY size and that it is optimized for speed (it is
written in C, internally, and uses very efficient algorithms).
Note: Instead of $vec = Bit::Vector->new_Dec(32, -559038737);
you can also use $vec = Bit::Vector->new_Dec(33, 3735928559);
and possibly $vec->Resize(32); afterwards if necessary.
-------------------- cut here -------------------- cut here --------------------
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: 25 Apr 2000 08:54:29 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Decimal to Hex
Message-Id: <m1hfcq9nwq.fsf@halfdome.holdit.com>
>>>>> "Steffen" == Steffen Beyer <sb@muccpu1.muc.sdm.de> writes:
Steffen> In article <38F8ED79.942962B4@crosswinds.net>, Greg Willatt <gpwillatt@crosswinds.net> wrote:
>> I was wondering if ther was a function for converting Decimal into hex ?
Steffen> -------------------- cut here -------------------- cut here --------------------
Steffen> Suggestion for the perlfaq4 manpage:
Steffen> ------------------------------------
Steffen> How do I convert from hexadecimal to decimal:
Uh, no. This is "how do I read a hex number?"
Steffen> 1) $dec = 0xDEADBEEF;
$dec is not "a decimal number". It's just a number. You can
print it as decimal (which is the most common).
Steffen> How do I convert from decimal to hexadecimal:
Uh no. These are "how do I get a number represented as hex?"
Steffen> How do I convert from octal to decimal:
"how do I read an octal number?"
Steffen> How do I convert from decimal to octal:
"how do I get a number represented as octal?"
Steffen> How do I convert from binary to decimal:
You get the pattern. :)
Steffen> The remaining transformations (e.g. hex -> oct, bin -> hex, etc.)
Steffen> are left as an exercise to the inclined reader. :-)
it would be easier once you see that you're not "converting to/from
decimal" on *any* of these. You are getting a number in the middle of
each step.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 25 Apr 2000 16:02:56 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: Re: Decimal to Hex
Message-Id: <8e4fjg$dla$5@solti3.sdm.de>
In article <m1hfcq9nwq.fsf@halfdome.holdit.com>, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
> Steffen> How do I convert from hexadecimal to decimal:
> Uh, no. This is "how do I read a hex number?"
> Steffen> 1) $dec = 0xDEADBEEF;
> $dec is not "a decimal number". It's just a number. You can
> print it as decimal (which is the most common).
> Steffen> How do I convert from decimal to hexadecimal:
> Uh no. These are "how do I get a number represented as hex?"
> Steffen> How do I convert from octal to decimal:
> "how do I read an octal number?"
> Steffen> How do I convert from decimal to octal:
> "how do I get a number represented as octal?"
> Steffen> How do I convert from binary to decimal:
> You get the pattern. :)
> Steffen> The remaining transformations (e.g. hex -> oct, bin -> hex, etc.)
> Steffen> are left as an exercise to the inclined reader. :-)
> it would be easier once you see that you're not "converting to/from
> decimal" on *any* of these. You are getting a number in the middle of
> each step.
Correct. But you know what I meant. :-)
Regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: 25 Apr 2000 09:24:06 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Decimal to Hex
Message-Id: <m1ln2287yx.fsf@halfdome.holdit.com>
>>>>> "Steffen" == Steffen Beyer <sb@muccpu1.muc.sdm.de> writes:
Steffen> Correct. But you know what I meant. :-)
*I* know what you meant. But I didn't know that *you* know what you
meant, and anyone else staring at us would wonder if *either* of us
knew what we meant!
In practice, it's best not to talk about "internal numbers" as "decimal".
If anything, they're "binary"!
Instead, using proper terminology, you bring enlightenment sooner.
And yes, how you talk about it *does* matter. I think I have a little
experience to offer here... :
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Tue, 25 Apr 2000 15:21:22 GMT
From: Shon Stephens <shon@mad.scientist.com>
Subject: Easy Installation of Modules
Message-Id: <8e4d57$bc3$1@nnrp1.deja.com>
I have multiple systems with perl installed on them. I would like to
install a module. Has anyone come up with a scheme to package a module
(sorta like pkgadd or rpm) so that I don't have to do a perl
Makefile.PL and make install on every system I want to install the
module on?
--
Shon Stephens
UNIX Systems Administrator
shon@mad.scientist.com
"You want a piece of me?"
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 25 Apr 2000 10:58:05 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Easy Installation of Modules
Message-Id: <87wvlmyxyq.fsf@shleppie.uh.edu>
>> On Tue, 25 Apr 2000 15:21:22 GMT,
>> Shon Stephens <shon@mad.scientist.com> said:
> I have multiple systems with perl installed on them. I
> would like to install a module. Has anyone come up with
> a scheme to package a module (sorta like pkgadd or rpm)
> so that I don't have to do a perl Makefile.PL and make
> install on every system I want to install the module on?
"cpan" (which does "perl -MCPAN -eshell"). Then "install
MODULENAME" and sit back as it follows dependencies.
hth
t
------------------------------
Date: 25 Apr 2000 16:01:22 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: Re: Easy Installation of Modules
Message-Id: <8e4fgi$dla$4@solti3.sdm.de>
In article <8e4d57$bc3$1@nnrp1.deja.com>, Shon Stephens <shon@mad.scientist.com> wrote:
> I have multiple systems with perl installed on them. I would like to
> install a module. Has anyone come up with a scheme to package a module
> (sorta like pkgadd or rpm) so that I don't have to do a perl
> Makefile.PL and make install on every system I want to install the
> module on?
Maybe "BnP" does what you need?
Have a look at http://www.engelschall.com/u/sb/download/bnp/ to find out!
Good luck!
Regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: 25 Apr 2000 13:28:09 -0400
From: jester@panix.com (Jesse T Sheidlower)
Subject: Efficient manipulation of simple date?
Message-Id: <8e4kj9$f9h$1@panix.com>
I have a relatively simple problem with manipulating date
formats, but the recent thread on Date::Manip seems to
suggest that it's a large and slow module to use, so I
was hoping to get some advice on the best way of approaching
my problem.
I am getting data into a bibliographic field that can be in
various formats, such as "21 Nov.", "Nov. 21," "21 November,"
plain "Nov." or "November", and things without months such
as "Spring".
I want to have two variables, one with an abbreviated month
name and one with the name in full; if there is a day-date
it should precede the month. Thus "21 Nov." and "21 November"
with a day, "Nov." and "November" without, and anything without
a month, such as "Spring," should be untouched.
This isn't a major part of my program so I don't want to
clog it up with Date::Manip if that's really such a slow
module, but it does seem as if that module would make it
easy to deal with this. On the other hand, unlike the poster
in the previous thread, I'm not doing especially complex
manipulations, so perhaps there's a simpler way.
Thanks.
Jesse Sheidlower
<jester@panix.com>
------------------------------
Date: 25 Apr 2000 17:48:36 GMT
From: msoulier@storm.ca (Michael P. Soulier)
Subject: exception handling
Message-Id: <slrn8gbmsp.av0.msoulier@localhost.localdomain>
Hey people. I'm planning an OO Perl app, and I want real exception
handling with full objects. I've looked at the CPAN, and I see Exceptions.pm,
and Error.pm. They look very much alike. Did I miss anything else? Does anyone
have any favorites?
I also saw a news post about a Throwable.pm module. Anything on that?
Cheers,
Mike
--
Michael P. Soulier <msoulier@storm.ca>
--------------------------------------
"To listen to the words of the learned, and to instill into others the
lessons of science, is better than religious exercises."
-- Prophet Muhammad (pbuh)
------------------------------
Date: Wed, 26 Apr 2000 00:19:17 +1000
From: Scotty <scotnet@sympac.com.au>
Subject: How to delete multiple files from an array of file names?
Message-Id: <3905A964.3E4CB5A1@sympac.com.au>
Hi there,
I have an array of file names (all images) and I would like to know the
bes way to delete them.
Should I do it one at a time in a foreach loop? (dosn't really sound
very nice...)
How can i hand mutiple file names to unlink?
I have seen in a book this example:
$count = unlink (LIST);
and they say:
$count is a count of the number of files deleted.
The LIST is the list of files to be deleted.
So do I just substitute the word LIST with @filenmaes ...... I don't
understand how to get the
file name into the list.
Thanks for you time
Scott Laughton.
------------------------------
Date: Tue, 25 Apr 2000 14:43:07 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: How to delete multiple files from an array of file names?
Message-Id: <7azoqi8cn8.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>
Scotty <scotnet@sympac.com.au> writes:
> Hi there,
>
> I have an array of file names (all images) and I would like to know the
> bes way to delete them.
perldoc -f unlink
> Should I do it one at a time in a foreach loop? (dosn't really sound
> very nice...)
No you don't have to.
> How can i hand mutiple file names to unlink?
Did you read the docs?
> I have seen in a book this example:
>
> $count = unlink (LIST);
>
> and they say:
> $count is a count of the number of files deleted.
> The LIST is the list of files to be deleted.
>
> So do I just substitute the word LIST with @filenmaes ...... I don't
> understand how to get the
> file name into the list.
The perldocs (perldoc -f unlink) show you an example.
my $count = unlink @filenames;
unless ($count == @filenames) {
print "Not all files deleted!\n";
}
--Ala
------------------------------
Date: Tue, 25 Apr 2000 09:59:00 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: How to delete multiple files from an array of file names?
Message-Id: <3905B2B4.C095A722@texas.net>
Scotty wrote:
>
> Hi there,
If you feel that it is necessary to post identical messages in multiple
newsgroups, use the cross-posting feature of your news software.
- Tom
------------------------------
Date: Tue, 25 Apr 2000 10:18:23 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: how to get the error string for ($? >> 8)
Message-Id: <MPG.136f7339995a16ea98a973@nntp.hpl.hp.com>
In article <8e3cvm$4uv$1@orpheus.gellyfish.com> on 25 Apr 2000 07:12:06
+0100, Jonathan Stowe <gellyfish@gellyfish.com> says...
> On Mon, 24 Apr 2000 14:40:26 GMT li wrote:
> >
> > Is there a way to get the error string for errors returned by 'system'
> > command?
> >
> > Graham Barr's Errno.pm gives the system E* status code, but how do one
> > gets the string? (By getting correspondent comment line in the
> > errno.h? :-)
>
> As far as I can determine these messages are the same as the ones you would
> get by assigning the value to $! and printing the result but YMMV :
>
> for ( 1 .. 124 )
> {
> $! = $-;
> print "$_ : $!\n";
> }
$FORMAT_LINES_LEFT
$-
Nah. You unshifted from the $ too soon, and got $- instead of $_ .
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 25 Apr 2000 10:37:30 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: how to put this in one reg exp.
Message-Id: <MPG.136f77b312fc5d3b98a975@nntp.hpl.hp.com>
In article <8e3q78$acp$1@news.tue.nl> on 25 Apr 2000 09:58:00 GMT, Hans
<hans-jan@stack.nl> says...
> I'd like to simplify this
>
> if ($line =~ /<!--begin0-->/) {
> print POST ("<!--begin0-->\n");
> if ($line =~ /<!--begin1-->/) {
> print POST ("<!--begin1-->\n");
> if ($line =~ /<!--begin2-->/) {
> print POST ("<!--begin2-->\n");
> ........begin10
>
> into
>
> $var1 = 'begin0' OR 'begin1' ....begin 10
> if ($line =~ /.....$var1....) {
> print POST ("<!--"+$var+"-->\n");
Tim Northover's answer shows how to do the pattern match and capture the
matched number, but doesn't fully address the concatenation into the
output string.
The Perl string concatenation operator is '.', not '+'. See `perldoc
perlop`. You could also simply interpolate into a double-quoted string:
"<!--$var-->\n"
The '-w' flag would warn you about your error of trying to concatenate
strings using the numerical addition operator. Use it always!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 2859
**************************************