[11462] in Perl-Users-Digest
Perl-Users Digest, Issue: 5062 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 5 00:07:41 1999
Date: Thu, 4 Mar 99 21:00:17 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 4 Mar 1999 Volume: 8 Number: 5062
Today's topics:
"cant last outside a block" not caught at compile time? <mra@pobox.com>
any plan to port perl to windowsce? (GEMINI)
Re: can I make this code better? (Ronald J Kimball)
Re: does perl discourage obfuscated code? (was Re: Perl <Russell_Schulz@locutus.ofB.ORG>
Re: does perl discourage obfuscated code? (was Re: Perl <Russell_Schulz@locutus.ofB.ORG>
Re: does perl discourage obfuscated code? (was Re: Perl <rra@stanford.edu>
FAQ 1.3: Which version of Perl should I use? <perlfaq-suggestions@perl.com>
Re: grep oddity - looking for explaination <jdf@pobox.com>
How would I split out specific elements? (Alan Young)
IO::File problem <KlausRusch@atmedia.net>
Netscape PubX Password Encryption <tja@ormont.com>
Re: Number of decimal places in Perl (Ronald J Kimball)
Re: Passing quoted args in backquotes (Ronald J Kimball)
Re: Perl Flatfile seach (Ronald J Kimball)
Please recommend good book of CGI with C++ to me. mjj0829@netsgo.com
Re: procmail-ish mail handler in perl? (Ronald J Kimball)
Re: Regex example from Camel book (Ronald J Kimball)
Re: Script Search (Martien Verbruggen)
Re: THOSE REVISED FAQ-ITEMS FROM TOM C. (Ronald J Kimball)
Yesterday! <aaronau@mailexcite.com>
Re: Yesterday! (Sean McAfee)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 04 Mar 1999 22:38:22 -0500
From: Mark Atwood <mra@pobox.com>
Subject: "cant last outside a block" not caught at compile time?
Message-Id: <m1hfs0fvwx.fsf@zot.localdomain>
Running:
#!/usr/bin/perl
sub main {
print "wump\n";
last if 1;
}
&main();
Outputs:
wump
Can't "last" outside a block at ./tst.pl line 5.
Why isn't this caught at compile time?
--
Mark Atwood | But that's the way of the puritans - mind like a steel trap:
mra@pobox.com | you take the bait, and it snaps shut in its deathgrip.
| -- Rich Grise <richgrise@entheosengineering.com>
------------------------------
Date: 27 Feb 1999 08:33:10 GMT
From: dennis@info4.csie.nctu.edu.tw (GEMINI)
Subject: any plan to port perl to windowsce?
Message-Id: <7b8ak6$f4d$1@netnews.csie.NCTU.edu.tw>
hi all,
I am wondering if there is any plan about porting perl
to windowsce currently?
thanks.
------------------------------
Date: Thu, 4 Mar 1999 22:52:16 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: can I make this code better?
Message-Id: <1do5wba.vmsojqf3tj0gN@bay4-152.quincy.ziplink.net>
[Did you intend to have Followup-To: poster for all your messages in
this thread? I think this answer is of general interest, so I'm
following up to the newsgroup.]
Alan Young <alany@2021.com> wrote:
> Am I correct in that it splits to an anonymous array?
{ 'It' being '(split /\|/)' in '(split /\|/)[0]' }
No. It splits to a simple list.
This would split to an anonymous array:
[ split /\|/ ]
> Based on
> perlref and perldoc -q split (which is mostly similar to Programming
> Perl's section as well) I think this is the case, but confirmation
> would be nice! :)
Actually, Programming Perl's section is similar to perldoc -q split.
;-)
--
chipmunk (Ronald J Kimball) <rjk@linguist.dartmouth.edu>
perl -e 'print map chop, sort split shift, reverse shift
' 'j_' 'e._jP;_jr/_je=_jk{_jn*_j &_j :_j @_jr}_ja)_js$_j
~_jh]_jt,_jo+_jJ"_jr>_ju#_jt%_jl?_ja^_jc`_jh-_je|' -rjk-
------------------------------
Date: Thu, 4 Mar 1999 22:21:27 -0500
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: does perl discourage obfuscated code? (was Re: Perl evangelism)
Message-Id: <19990304.222127.0Q5.rnr.w164w@locutus.ofB.ORG>
Russ Allbery <rra@stanford.edu> writes:
> Actually, among all of the languages that I know, the one that takes
> the prise for the most generally unreadable language (and it's not
> even *close*) is FORTRAN, mostly due to the variable naming
> conventions that most FORTRAN programmers use.
yes; that and the GOTOing everywhere.
> Perl honestly isn't anywhere near the same ballpark, if you're looking
> at actual production Perl code.
of course, I've never seen a FORTRAN program use $_ as a variable. :-|
--
Russell_Schulz@locutus.ofB.ORG Shad 86c
------------------------------
Date: Thu, 4 Mar 1999 22:23:38 -0500
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: does perl discourage obfuscated code? (was Re: Perl evangelism)
Message-Id: <19990304.222338.1P3.rnr.w164w@locutus.ofB.ORG>
bart.lateur@skynet.be (Bart Lateur) quotes me and writes:
>> you're going to be the proud owner of a ton of read-only code.
> "write-only", but anyway.
yeah, I noticed that on re-reading. imagine my delight to see a handful
of followups harping on that one typo...
>> Perl encourages hard-to-read code. that's just the way it is,
> Perl does encourage you to write very concise code.
not just Perl! so does half the newsgroup. `don't put " where they
aren't necessary.' `oh no -- if it's longer it'll be COBOL.' `why
aren't you using the fact that || returns the non-0 value to shorten
this to 2 lines?' etc.
but concise in itself isn't bad. conciseness is good when it reduces
a section of code to something you can grasp as one big functional chunk.
(this is why I think i as a loop variable is fine for one-liners but
stupid for bigger blocks; I am repulsed by so much of my own code that
used i as a loop iterator over a huge block of code. what in the WORLD
was I thinking? was I THAT tight for disk space a few years ago?)
> When you get more experience, you find out that you can often write
> code in one or two lines, which would require writing a complex,
> lengthy function in other languages.
but then when you call that function, it's just one chunk again. so
the place where it's used will be _clearer_. I don't see this as a
big win, except when writing the function itself.
if you've got all of the meat in one big loop over the data, even
Perl's conciseness won't reduce it to a small enough chunk to be
digestible.
> At first, this will look intimidating. But it's mostly a matter of
> getting used to the idiom. Then, you'll recognize the patterns ("oh, a
> Schwartzian Transform"), and they'll be readable just fine.
you can't use a Schwartzian Transform to bolster your side of the
argument if it's a keystone in mine! :-)
--
Russell_Schulz@locutus.ofB.ORG Shad 86c
------------------------------
Date: 04 Mar 1999 20:43:01 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: does perl discourage obfuscated code? (was Re: Perl evangelism)
Message-Id: <yld82ozgve.fsf@windlord.stanford.edu>
Russell Schulz <Russell_Schulz@locutus.ofB.ORG> writes:
> Russ Allbery <rra@stanford.edu> writes:
>> Perl honestly isn't anywhere near the same ballpark, if you're looking
>> at actual production Perl code.
> of course, I've never seen a FORTRAN program use $_ as a variable. :-|
Yes, but once you have some familiarity with Perl, $_ really isn't that
cryptic of a variable. $_ is just "that thing I'm working on right now."
For quite a bit of programming, having a special name for "that thing I'm
working on right now" actually makes code *more* readable, since the
reader doesn't have to figure out what the current key piece of data is
and what variable it's in all the time.
And I'm not objecting to things like i and j as array indices. (See
Pike.) I'm objecting to having programs with twenty-odd variables with
names like ii and l and m and n and a and bb.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 4 Mar 1999 20:39:46 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 1.3: Which version of Perl should I use?
Message-Id: <36df5202@csnews>
(This excerpt from perlfaq1 - General Questions About Perl
($Revision: 1.21 $, $Date: 1999/01/26 09:55:05 $)
part of the standard set of documentation included with every
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq1.html
if your negligent system adminstrator has been remiss in his duties.)
Which version of Perl should I use?
You should definitely use version 5. Version 4 is old, limited,
and no longer maintained; its last patch (4.036) was in 1992,
long ago and far away. Sure, it's stable, but so is anything
that's dead; in fact, perl4 had been called a dead, flea-bitten
camel carcass. The most recent production release is 5.005_02
(although 5.004_04 is still supported). The most cutting-edge
development release is 5.005_54. Further references to the Perl
language in this document refer to the production release unless
otherwise specified. There may be one or more official bug fixes
for 5.005_02 by the time you read this, and also perhaps some
experimental versions on the way to the next release. All
releases prior to 5.004 were subject to buffer overruns, a grave
security issue.
--
echo "Your stdio isn't very std."
--Larry Wall in Configure from the perl distribution
------------------------------
Date: 04 Mar 1999 23:46:30 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Sandy Maple <sandym@landolittlepeople.com>
Subject: Re: grep oddity - looking for explaination
Message-Id: <m3hfs0y255.fsf@joshua.panix.com>
Sandy Maple <sandym@landolittlepeople.com> writes:
> In order to fix the bug I was working on, I changed line 12 in the
> source code from
>
> $exists=grep(?$dir?i, @uniqueDirs);
>
> to
>
> $exists=grep(/$dir/i, @uniqueDirs);
>
> and the grep works just fine.
Have you read the section in perlop concerning ?PATTERN? ?
> I didn't expect this to work because the search string, $dir,
> contains the character '/' so, logically, the grep should
> misinterpret the first '/' it comes to as the end of the search
> string, but it doesn't. I figure I have some reading to do...
By the time the regex engine sees the pattern, the delimiters have
been stripped; it has no idea whether you used /foo/ or m^foo^ or
whatever. / is not a regex metacharacter.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Fri, 05 Mar 1999 04:53:02 GMT
From: alany@2021.com (Alan Young)
Subject: How would I split out specific elements?
Message-Id: <36e4631e.19982721@news.supernews.com>
I have an array of items in the form
"item|image|shortdesc|longdesc|stuff|... etc"
I want to break out only specific elements.
This is what I currently have (thanks to the gracious help of Larry
Rosler).
Notes: %Inventory is created in main:: because it's used in several
places in the script. This is the code that creates it (thanks LR):
# Build a hash for the inventory
my ($inventory) = "./$RootDir/inventory.db";
my ($INV) = new IO::File "<$inventory";
die "Unable to open inventory file in $RootDir" if !$INV;
%Inventory = map {(split /\|/)[0], $_} <$INV>;
Thank you for your time and consideration.
=====================================================================
sub DisplayCart {
# Debug
if ($DEBUG == 1) {
&LogIt ($DBG, "Entered DisplayCart");
} # End if
$cart = "$sc_CartPath/${CART_ID}.cart" if !$cart;
$CART = new IO::File "<$cart";
die "Unable to open $cart." if !$CART;
# Slurp the cart.
@CartContents = <$CART>;
# Display error if cart is empty and return
# I know this could be an if () {} structure, but I was
# experimenting. Are there any negative side effects with a
# do {} if () structure? I don't think there would be, but
# perl constantly surprises me.
do {
print start_html('Empty Cart'),
$sc_EmptyCartErrorMessage,
end_html;
return;
} if (-z $CART);
# Build array of information for existing items - thanks LR
my @items = sort map {
my $item = (split /\|/)[0];
$Inventory{$item} || " Item $item does not exist in inventory."
} @CartContents;
# I know the aligns in Tr and td are redundant, but they don't
# hurt, and I don't trust the different browsers to parse this
# correctly otherwise.
print start_html('Cart Contents'),
table({-align=>'center', -border=>'1', -width=>'95%'},
Tr({-align=>'left', -valign=>'top'},
th([qw/Item Quantity Description Price Subtotal/])
)
);
###################################################################
# This is the next area I think can be improved, probably using a
# map or grep command. The biggest problem I have is in getting
# everything into one array from two strings, and only two elements
# of one string!
foreach my $item (@items) {
($itm, $qty) = split /\|/;
@ITEM = split /\|/, $Inventory{$itm};
my @item = [qw!$itm $qty $ITEM[5] $ITEM[6] \
{(($ITEM[6]*$qty)*100)/100!)]
print td({-align=>'left', -valign=>'top'}, @item);
} # End foreach
###################################################################
print end_html;
} # End DisplayCart
--
Alan Young Technical Support
http://members.xoom.com/AlanYoung 2021.Interactive, LLC
If your happy and you know it, clunk your chains! http://www.2021.com
1284 The Rule of Fives states that all things happen in fives, or are
divisible by or are multiples of five, or are somehow directly or
indirectly related to a five.
------------------------------
Date: Wed, 03 Mar 1999 15:17:50 +0100
From: Klaus Johannes Rusch <KlausRusch@atmedia.net>
Subject: IO::File problem
Message-Id: <36DD448E.C34CB8E3@atmedia.net>
The following code core dumps under Perl 5.003_93 for OS/2:
use IO::File;
$fh = IO::File -> new_tmpfile() or die "$!";
print $fh "Test";
$fh -> setpos(1);
Process terminated by SIGSEGV
Bug or error in my code?
Klaus Johannes Rusch
--
KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/
------------------------------
Date: Thu, 4 Mar 1999 23:32:43 -0500
From: "Thomas J. Allocco" <tja@ormont.com>
Subject: Netscape PubX Password Encryption
Message-Id: <Z5JD2.322$EU1.6766@nntp1.nac.net>
I am developing a cgi application in Perl that needs to share the user
database from a Netscape PublishingXpert 2.2 installation. My plan is to
prompt the user for login and password, encrypt the password and then
compare that to the encrypted password in the USR_PASSWD field of the
user_accts table.
My problem is that I do not understand the encryption method used by
Netscape. The USR_PASSWD field contains 32 bytes of binary data (not hex).
Not what I would expect for an MD5 (16 bytes) or SHA (20 bytes) digest. The
USR_PWD_ALGORITHM field in this table is set to 2 for all the entries.
I have been unable to find any meaningful information about this in the news
groups and the documentation. Can anyone shed some light on this for me? Do
you know of a Perl module that does the necessary magic?
Thanks, Tom
------------------------------
Date: Thu, 4 Mar 1999 22:52:17 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Number of decimal places in Perl
Message-Id: <1do5xlr.14klf31742bukN@bay4-152.quincy.ziplink.net>
<matthew_keene@ansett.com.au> wrote:
> Can anyone tell me how the default number of decimal places gets set in Perl.
> If I run:
>
> $decimal1 = 1/6 ;
> print "Decimal value is $decimal1\n" ;
>
> I get:
>
> Decimal value is 0.166666666666667
>
> I can round the value using int, printf or sprintf, but I'm interested about
> the default behaviour, and whether I can modify it.
perlvar:
$# The output format for printed numbers. This
variable is a half-hearted attempt to emulate
awk's OFMT variable. There are times, however,
when awk and Perl have differing notions of what
is in fact numeric. The initial value is %.ng,
where n is the value of the macro DBL_DIG from
your system's float.h. This is different from
awk's default OFMT setting of %.6g, so you need to
set "$#" explicitly to get awk's value.
(Mnemonic: # is the number sign.)
Use of "$#" is deprecated.
Note that last line.
Programming Perl gives further instruction:
Use of $# is now deprecated and is allowed only for maintaining
backwards compatibility with older versions of Perl. You should use
printf instead.
So, you really should stick with printf and sprintf.
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
perl -e'$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'
------------------------------
Date: Thu, 4 Mar 1999 22:52:19 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Passing quoted args in backquotes
Message-Id: <1do5xsn.uom4xpzponxzN@bay4-152.quincy.ziplink.net>
Jalil Feghhi <jalil@corp.home.net> wrote:
> I need to run a command that should take a quoted arg. Something like:
>
> `cmd "-v $arg"`
>
> I have tried the above, escaping the quotes, and also defining a var like
> ($a = "-v $arg") and then use it inside the backquote as in `cmd $a`. None
> worked!
>
> Any way to do this?
~> perl
print `echo "-v abc"`
-v abc
~>
Works for me.
Are you sure you didn't mean
`cmd -v "$arg"`
?
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
perl -le 'print "Just another \u$^X hacker"'
------------------------------
Date: Thu, 4 Mar 1999 22:52:22 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Perl Flatfile seach
Message-Id: <1do5xxb.wgswq4104yje5N@bay4-152.quincy.ziplink.net>
carys <carys@indigo.ie> wrote:
> # uninitialised values on line below? thought I was initialising (or
> declaring)
> # an array which had the following elements.
>
> @headings =
> ($Title,$Subsection,$Course,$Duration,$Full-time,$Part-time,$Entry,$Comments
> );
$Full-time subtracts the return value of the time() function from the
value of the variable $Full. The value of $Full is unitialized.
Same for $Part-time.
You can't use -hyphens- in indentifiers. Use _underscores_ instead.
However, you seem to be confusing Perl arrays with C structs. An array
in Perl contains an ordered list of *unnamed* elements.
Once the hyphen problem is fixed, the above line is equivalent to:
@headings = (undef, undef, undef, undef, undef, undef, undef, undef);
I think you need to review the perldata documentation.
> $SearchString = $ENV{'QUERY_STRING'};
>
> # another uninitialised value here?
> ($tag,$search) = split (/=/, $SearchString);
You will get a warning with that line if $ENV{'QUERY_STRING'} was not
defined. You should verify that $SearchString has a defined value
before proceeding with the search.
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Fri, 05 Mar 1999 03:51:09 GMT
From: mjj0829@netsgo.com
Subject: Please recommend good book of CGI with C++ to me.
Message-Id: <7bnkba$o4b$1@nnrp1.dejanews.com>
Hi, I'm new here, frankly I'm new to CGI. I wanna make a bulletin board or a
chat program by myself. Would you recommend some good books to me? Ah, I
wonder which's best language to bulid CGI program between C/C++ and Perl. I
know this newsgroup is more concerning perl but I've studied C++ (I'm a
college student majoring in Computer Science.) and I think it can be useless
to study peal newly. So If there are those who know about the diefferences,
please notice to me. I'll appreciate that. And if you know a website where
has some source code of CGI program, please inform me. Good-bye and take
care~!
My E@mail is
MJJ0829@netsgo.com
MICHAEL's child Bo-hae from S.Korea
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 4 Mar 1999 22:52:25 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: procmail-ish mail handler in perl?
Message-Id: <1do5yeh.1jvmz1212vgqfjN@bay4-152.quincy.ziplink.net>
David L. Cassell <cassell@mail.cor.epa.gov> wrote:
> Kodachrome Halpern wrote:
> >
> > Elaine Ashton explains it all:
> > :tom has some cool stuff here;
> > :http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/ qmail
> > :is written in Perl as is majordomo and a bunch of other doodads...so,
> > :I'm sure that it has been done.
> >
> > Thanks, but:
> >
> > http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/msort
> >
> > 404 - NOT FOUND
> >
> > http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/qmail
> >
> > 404 - NOT FOUND
>
> Umm, you may have misunderstood what Elaine meant. She didn't
> mean to suggest that you would find 'msort' or 'qmail' at that URL.
Actually, the page
http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/
does contain a link to
http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/msort/
which does give a 404 not found.
So where did the msort directory go?
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
perl -e 'for(@ARGV){require $_;print "$_\n $INC{$_}\n"}' File/Find.pm
------------------------------
Date: Thu, 4 Mar 1999 22:52:26 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Regex example from Camel book
Message-Id: <1do5yl8.141enwpuhq7kkN@bay4-152.quincy.ziplink.net>
Robert E Webb <bwebb@fred.net> wrote:
> $qq=12345.6789;
> $qq =~ 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;
> print "$qq\n";
>
> I get use of unitialized variable.
You have your expression all out of order!
$qq =~ 1
This applies the regex /1/ to the value of $qq.
while s/(\d)(\d\d\d)(?!\d)/$1,$2/
This repeats the above as long as the regex /(\d)(\d\d\d)(?!\d)/ matches
the value of $_.
ITYM
1 while $qq =~ s/(\d)(\d\d\d)(?!\d)/$1,$2/;
--
#!/usr/bin/sh -- chipmunk (aka Ronald J Kimball)
perl -s -e'print sort grep { /\s/ } keys %main::
' -- -is -' Just' -' another ' -'Perl ' -'hacker
' http://www.ziplink.net/~rjk/ [rjk@linguist.dartmouth.edu]
------------------------------
Date: Fri, 05 Mar 1999 04:23:23 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Script Search
Message-Id: <%_ID2.250$Fh.1984@nswpull.telstra.net>
In article <36DF430E.CC449562@northeast.net>,
Mike Rura <rtg@northeast.net> writes:
> A simple script to search my website by standard META-TAG KEYWORDS or
> search a simple database.
>
> Email me in .tar or .zip
Where is that? Which country is .tar or .zip for?
Martien
PS. Do your own programming, or at least offer to pay us.
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Thu, 4 Mar 1999 22:52:27 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: THOSE REVISED FAQ-ITEMS FROM TOM C.
Message-Id: <1do5z2b.z4eeq516k27btN@bay4-152.quincy.ziplink.net>
David Combs <dkcombs@netcom.com> wrote:
> He's been posting lots of individual revised-faq-ITEMS, eg:
Are they really revised?
I think he's just posting them here (no revisions) for people who aren't
bright enough to find them somewhere else.
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Fri, 05 Mar 1999 10:55:27 +0800
From: Aaron Au <aaronau@mailexcite.com>
Subject: Yesterday!
Message-Id: <36DF479F.379A5D5@mailexcite.com>
Hi everybody,
I want to input a date code (mmddyyyy)(03011999) and output the last day
format(02281999).
Does anyone have a simple script?
Thanks!
Aaron Au
------------------------------
Date: Fri, 05 Mar 1999 03:32:06 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Yesterday!
Message-Id: <WeID2.10078$Ge3.39532024@news.itd.umich.edu>
In article <36DF479F.379A5D5@mailexcite.com>,
Aaron Au <aaronau@mailexcite.com> wrote:
>I want to input a date code (mmddyyyy)(03011999) and output the last day
>format(02281999).
>Does anyone have a simple script?
First, install the Date::Calc module.
Then:
use Date::Calc qw(Add_Delta_Days);
sub previous_day {
$_[0] =~ /^(\d\d)(\d\d)(\d\d\d\d)$/;
sprintf("%02d%02d%04d", (Add_Delta_Days($3, $1, $2, -1))[1,2,0]);
}
--
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
| K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
| tv+ b++ DI++ D+ G e++>++++ h- r y+>++** | umich.edu
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5062
**************************************