[30912] in Perl-Users-Digest
Perl-Users Digest, Issue: 2157 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 25 16:09:43 2009
Date: Sun, 25 Jan 2009 13:09:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 25 Jan 2009 Volume: 11 Number: 2157
Today's topics:
Re: Help: Process text block <tadmc@seesig.invalid>
Re: Help: Process text block <someone@example.com>
Re: Help: Process text block <someone@example.com>
Re: inputting the ephemerides <tim@burlyhost.com>
Re: inputting the ephemerides <hjp-usenet2@hjp.at>
new CPAN modules on Sun Jan 25 2009 (Randal Schwartz)
Re: OCaml, Language syntax, and Proof Systems <xahlee@gmail.com>
Re: Peer Review for Folder Delete Script <tadmc@seesig.invalid>
Re: Peer Review for Folder Delete Script <1usa@llenroc.ude.invalid>
Re: Peer Review for Folder Delete Script <XXjbhuntxx@white-star.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 25 Jan 2009 06:44:43 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Help: Process text block
Message-Id: <slrngnonlr.66f.tadmc@tadmc30.sbcglobal.net>
Amy Lee <openlinuxsource@gmail.com> wrote:
> The text block is from "dG" to the next "dG". And further I just process
> the first block.
> I don't know how to write such condition to do that. I used "while" loop
> to do that but still failed. So could anyone show me some points?
--------------------------------------
#!/usr/bin/perl
use warnings;
use strict;
my $buffer = '';
while ( <DATA> ) {
if ( /dG = / and $buffer ) {
process_block($buffer);
$buffer = '';
}
$buffer .= $_;
}
process_block($buffer);
sub process_block { print "(($_[0]))\n\n" }
__DATA__
10 dG = -27.9 Gm01_9996700_9996828_gma-MIR1520b
1 U 0 2 0 1 0 0
2 U 1 3 0 2 0 0
3 U 2 4 0 3 0 0
4 C 3 5 0 4 0 0
5 U 4 6 12 5 0 0
6 A 5 7 0 6 0 0
7 A 6 8 0 7 0 0
8 A 7 9 45 8 0 0
9 A 8 10 46 9 0 0
10 U 9 11 0 10 0 0
10 dG = -27.3 Gm01_9996700_9996828_gma-MIR1520b
1 U 0 2 0 1 0 0
2 U 1 3 0 2 0 0
3 U 2 4 0 3 0 0
4 C 3 5 0 4 0 0
5 U 4 6 35 5 0 0
6 A 5 7 0 6 0 0
7 A 6 8 0 7 0 0
8 A 7 9 16 8 0 0
9 A 8 10 0 9 0 0
10 U 9 11 0 10 0 0
10 dG = -27.2 Gm01_9996700_9996828_gma-MIR1520b
1 U 0 2 0 1 0 0
2 U 1 3 0 2 0 0
3 U 2 4 0 3 0 0
4 C 3 5 71 4 0 0
5 U 4 6 0 5 0 0
6 A 5 7 0 6 0 0
7 A 6 8 0 7 0 0
8 A 7 9 0 8 0 9
9 A 8 10 128 9 8 10
10 U 9 11 127 10 9 11
--------------------------------------
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Sun, 25 Jan 2009 08:14:00 -0800
From: "John W. Krahn" <someone@example.com>
Subject: Re: Help: Process text block
Message-Id: <8d0fl.212047$2w3.46470@newsfe19.iad>
Amy Lee wrote:
> Hello,
>
> I have many files fill with following contents.
>
> 10 dG = -27.9 Gm01_9996700_9996828_gma-MIR1520b
> 1 U 0 2 0 1 0 0
> 2 U 1 3 0 2 0 0
> 3 U 2 4 0 3 0 0
> 4 C 3 5 0 4 0 0
> 5 U 4 6 12 5 0 0
> 6 A 5 7 0 6 0 0
> 7 A 6 8 0 7 0 0
> 8 A 7 9 45 8 0 0
> 9 A 8 10 46 9 0 0
> 10 U 9 11 0 10 0 0
> 10 dG = -27.3 Gm01_9996700_9996828_gma-MIR1520b
> 1 U 0 2 0 1 0 0
> 2 U 1 3 0 2 0 0
> 3 U 2 4 0 3 0 0
> 4 C 3 5 0 4 0 0
> 5 U 4 6 35 5 0 0
> 6 A 5 7 0 6 0 0
> 7 A 6 8 0 7 0 0
> 8 A 7 9 16 8 0 0
> 9 A 8 10 0 9 0 0
> 10 U 9 11 0 10 0 0
> 10 dG = -27.2 Gm01_9996700_9996828_gma-MIR1520b
> 1 U 0 2 0 1 0 0
> 2 U 1 3 0 2 0 0
> 3 U 2 4 0 3 0 0
> 4 C 3 5 71 4 0 0
> 5 U 4 6 0 5 0 0
> 6 A 5 7 0 6 0 0
> 7 A 6 8 0 7 0 0
> 8 A 7 9 0 8 0 9
> 9 A 8 10 128 9 8 10
> 10 U 9 11 127 10 9 11
>
> The text block is from "dG" to the next "dG". And further I just process
> the first block. So that's following contents.
>
> 1 U 0 2 0 1 0 0
> 2 U 1 3 0 2 0 0
> 3 U 2 4 0 3 0 0
> 4 C 3 5 0 4 0 0
> 5 U 4 6 12 5 0 0
> 6 A 5 7 0 6 0 0
> 7 A 6 8 0 7 0 0
> 8 A 7 9 45 8 0 0
> 9 A 8 10 46 9 0 0
> 10 U 9 11 0 10 0 0
>
> I don't know how to write such condition to do that. I used "while" loop
> to do that but still failed. So could anyone show me some points?
$ echo "
10 dG = -27.9 Gm01_9996700_9996828_gma-MIR1520b
1 U 0 2 0 1 0 0
2 U 1 3 0 2 0 0
3 U 2 4 0 3 0 0
4 C 3 5 0 4 0 0
5 U 4 6 12 5 0 0
6 A 5 7 0 6 0 0
7 A 6 8 0 7 0 0
8 A 7 9 45 8 0 0
9 A 8 10 46 9 0 0
10 U 9 11 0 10 0 0
10 dG = -27.3 Gm01_9996700_9996828_gma-MIR1520b
1 U 0 2 0 1 0 0
2 U 1 3 0 2 0 0
3 U 2 4 0 3 0 0
4 C 3 5 0 4 0 0
5 U 4 6 35 5 0 0
6 A 5 7 0 6 0 0
7 A 6 8 0 7 0 0
8 A 7 9 16 8 0 0
9 A 8 10 0 9 0 0
10 U 9 11 0 10 0 0
10 dG = -27.2 Gm01_9996700_9996828_gma-MIR1520b
1 U 0 2 0 1 0 0
2 U 1 3 0 2 0 0
3 U 2 4 0 3 0 0
4 C 3 5 71 4 0 0
5 U 4 6 0 5 0 0
6 A 5 7 0 6 0 0
7 A 6 8 0 7 0 0
8 A 7 9 0 8 0 9
9 A 8 10 128 9 8 10
10 U 9 11 127 10 9 11
" | perl -ne'print if ?dG? ... /dG/ and ! /dG/'
1 U 0 2 0 1 0 0
2 U 1 3 0 2 0 0
3 U 2 4 0 3 0 0
4 C 3 5 0 4 0 0
5 U 4 6 12 5 0 0
6 A 5 7 0 6 0 0
7 A 6 8 0 7 0 0
8 A 7 9 45 8 0 0
9 A 8 10 46 9 0 0
10 U 9 11 0 10 0 0
John
--
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
------------------------------
Date: Sun, 25 Jan 2009 12:09:12 -0800
From: "John W. Krahn" <someone@example.com>
Subject: Re: Help: Process text block
Message-Id: <EF3fl.17694$B_1.9617@newsfe01.iad>
Amy Lee wrote:
> On Mon, 26 Jan 2009 01:41:02 +0800, Amy Lee wrote:
>
>> On Sun, 25 Jan 2009 08:14:00 -0800, John W. Krahn wrote:
>>
>>> Amy Lee wrote:
>>>>
>>>> I have many files fill with following contents.
[ *SNIP* ]
>>>> The text block is from "dG" to the next "dG". And further I just process
>>>> the first block. So that's following contents.
[ *SNIP* ]
>>>> I don't know how to write such condition to do that. I used "while" loop
>>>> to do that but still failed. So could anyone show me some points?
>>>
[ *SNIP* ]
>>> " | perl -ne'print if ?dG? ... /dG/ and ! /dG/'
[ *SNIP* ]
>> Thank you very much, anyway, how to write this into codes? Especially ?dG?
>> ... /dG/ part.
$ perl -MO=Deparse -ne'print if ?dG? ... /dG/ and ! /dG/'
LINE: while (defined($_ = <ARGV>)) {
print $_ if ?dG? ... /dG/ and not /dG/;
}
-e syntax OK
Or:
while ( <FILEHANDLE> ) {
if ( ?dG? ... /dG/ ) {
print unless /dG/;
}
}
> And furthermore, could you explain the codes? I didn't understand it
> clearly. Thank you very much.
?dG? only matches the first time it is found while /dG/ will match every
time it is found. '...' is the flip-flop operator. The expression is
false until the left operand is true and then it is true until the right
operand is true when it becomes false again. So it matches the first
line that contains 'dG' until the next line that contains 'dG' and then
quits looking. And once it has found the correct line(s), you don't
want to print the line that contains 'dG', just the other lines.
John
--
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
------------------------------
Date: Sun, 25 Jan 2009 09:50:58 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: inputting the ephemerides
Message-Id: <7E1fl.8957$B01.1334@newsfe13.iad>
Larry Gates wrote:
> On Sat, 24 Jan 2009 08:08:14 -0800, Tim Greer wrote:
>
>> Peter J. Holzer wrote:
>>
>>> On 2009-01-24 06:40, Tim Greer <tim@burlyhost.com> wrote:
>>>> Larry Gates wrote:
>>>>
>>>>> Wouldn't a split work well here?
>>>>
>>>> Split works well when you don't have white space in the fields
>>>> themselves,
>>>
>>> You can split on other strings than whitespace.
>>
>> Yes, I know, but the OP wants to split on whitespace in this case.
>> :-)
>
> This is what I've got now:
>
> my $filename = 'eph6.txt';
> my $filename2 = 'outfile1.txt';
> open(my $fh, '<', $filename) or die "cannot open $filename: $!";
> open(my $gh, $filename2) or die "cannot open $filename2: $!";
Did you mean to open that above $filename2 for write?
> while (my $line = <$fh>) {
> $line =~ s/\t/ /g;
> $line =~ s/ER/ /g;
> $line =~ s/°/ /g;
Why are you replacing \t with " "? I might have missed why in a
previous post of yours?
> print $gh $line;
You are printing to the $gh filehandle, yet you didn't open it for write
above.
> print STDOUT $line;
Just print $line. STDOUT is default.
> }
> close($fh);
> seek($gh,0,0);
> while (my $line = <$gh>) {
>
> my @s = split / /, $line;
>
> # print $gh $line;
You still have $gh open, are stepping through it with while, and then
print to it as you're stepping through it?
> print STDOUT @s;
You don't need STDOUT, though if you specifically want to specify it,
you can.
> }
>
> close($gh);
I have more questions about the above code, but this is just getting
more confusing.
> # perl reg2.pl
>
> I've got 2 questions:
>
> q1) How do I loop over @s and print them out with a delimiter to see
> if I
> have what I think I have? One response is, "how many times do we have
> to
> tell you this?" I think the answer is at least 3; I can't figure it
> out and have tried serially.
Use for() on @s. Why are you wanting to put the values in @s just to
check what you can already check when you're stepping through the file
with what's in $line?
> q2) How do I write to $gh and replace thw entire file, even if there
> are fewer characters in the replacer?
That depends on how you are opening it for writing and reading. I'm
confused about the method you've chosen to use in the above code. You
never opened $gh for write. I don't know if once you do redirect for
write if you'll see the file containing the data you want. I'm just
going by your last post above in reply to me, I didn't read this entire
thread, so I hestitate to try and offer answers.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
------------------------------
Date: Sun, 25 Jan 2009 19:36:26 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: inputting the ephemerides
Message-Id: <slrngnpc9a.lca.hjp-usenet2@hrunkner.hjp.at>
On 2009-01-25 00:37, Larry Gates <larry@example.invalid> wrote:
> q1) How do I loop over @s and print them out with a delimiter to see if I
> have what I think I have? One response is, "how many times do we have to
> tell you this?" I think the answer is at least 3; I can't figure it out
> and have tried serially.
If you think we have told you already why don't you reread previous
messages and see what you find? And if you did so and found nothing (or
found something you don't understand), why don't you say so?
hp
------------------------------
Date: Sun, 25 Jan 2009 05:42:25 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Jan 25 2009
Message-Id: <KE0IIp.xxn@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Acme-RequireModule-0.01
http://search.cpan.org/~gfuji/Acme-RequireModule-0.01/
Extends require() to accept module names
----
Audio-Extract-PCM-0.04_56
http://search.cpan.org/~pepe/Audio-Extract-PCM-0.04_56/
Extract PCM data from audio files
----
Business-DateTime-0.0.3
http://search.cpan.org/~stocks/Business-DateTime-0.0.3/
----
Business-DateTime-0.0.4
http://search.cpan.org/~stocks/Business-DateTime-0.0.4/
----
CPANPLUS-Dist-Gentoo-0.05
http://search.cpan.org/~vpit/CPANPLUS-Dist-Gentoo-0.05/
CPANPLUS backend generating Gentoo ebuilds.
----
Darcs-Inventory-1.4
http://search.cpan.org/~david/Darcs-Inventory-1.4/
Read and parse a darcs version 1 or 2 inventory file
----
Darcs-Notify-2.0.1
http://search.cpan.org/~david/Darcs-Notify-2.0.1/
Do something cool when a Darcs repository has patches added or removed
----
Date-Extract-P800Picture-0.03
http://search.cpan.org/~ipenburg/Date-Extract-P800Picture-0.03/
class for extracting the date and the hour from the filename of pictures taken with a Sony-Ericsson P800 camera phone.
----
Email-MIME-Attachment-Stripper-1.316
http://search.cpan.org/~rjbs/Email-MIME-Attachment-Stripper-1.316/
strip the attachments from an email
----
Email-MIME-ContentType-1.015
http://search.cpan.org/~rjbs/Email-MIME-ContentType-1.015/
Parse a MIME Content-Type Header
----
Email-MIME-Encodings-1.312
http://search.cpan.org/~rjbs/Email-MIME-Encodings-1.312/
A unified interface to MIME encoding and decoding
----
Email-MIME-Modifier-1.443
http://search.cpan.org/~rjbs/Email-MIME-Modifier-1.443/
Modify Email::MIME Objects Easily
----
Email-MessageID-1.401
http://search.cpan.org/~rjbs/Email-MessageID-1.401/
Generate world unique message-ids.
----
Fey-0.1901
http://search.cpan.org/~drolsky/Fey-0.1901/
Better SQL Generation Through Perl
----
Finance-Bank-IE-PermanentTSB-0.03
http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB-0.03/
Perl Interface to the PermanentTSB Open24 homebanking on <http://www.open24.ie>
----
GSM-ARFCN-0.03
http://search.cpan.org/~mrdvt/GSM-ARFCN-0.03/
Absolute Radio Frequency Channel Number (ARFCN) Converter
----
Games-Solitaire-Verify-0.05
http://search.cpan.org/~shlomif/Games-Solitaire-Verify-0.05/
verify solutions for solitaire games.
----
IO-Epoll-0.02
http://search.cpan.org/~brucek/IO-Epoll-0.02/
Scalable IO Multiplexing for Linux 2.5.44 and higher
----
IO-Socket-SSL-1.22
http://search.cpan.org/~sullr/IO-Socket-SSL-1.22/
Nearly transparent SSL encapsulation for IO::Socket::INET.
----
KiokuDB-0.23
http://search.cpan.org/~nuffin/KiokuDB-0.23/
Object Graph storage engine
----
KiokuDB-Backend-BDB-0.13
http://search.cpan.org/~nuffin/KiokuDB-Backend-BDB-0.13/
BerkeleyDB backend for KiokuDB.
----
Math-RandomOrg-0.05_01
http://search.cpan.org/~gwilliams/Math-RandomOrg-0.05_01/
Retrieve random numbers and data from random.org.
----
Moose-Micro-0.001
http://search.cpan.org/~hdp/Moose-Micro-0.001/
succinctly specify Moose attributes
----
Net-Twitter-2.04
http://search.cpan.org/~cthom/Net-Twitter-2.04/
Perl interface to twitter.com
----
POE-Component-Server-IRC-1.36
http://search.cpan.org/~bingos/POE-Component-Server-IRC-1.36/
A fully event-driven networkable IRC server daemon module.
----
Parse-Binary-0.11
http://search.cpan.org/~audreyt/Parse-Binary-0.11/
Unpack binary data structures into object hierarchies
----
RT-Authen-ExternalAuth-0.08
http://search.cpan.org/~zordrak/RT-Authen-ExternalAuth-0.08/
RT Authentication using External Sources
----
Regexp-IPv6-0.01
http://search.cpan.org/~salva/Regexp-IPv6-0.01/
Regular expression for IPv6 addresses
----
Regexp-IPv6-0.02
http://search.cpan.org/~salva/Regexp-IPv6-0.02/
Regular expression for IPv6 addresses
----
SVG-GD-0.19
http://search.cpan.org/~ronan/SVG-GD-0.19/
----
SVG-GD-0.20
http://search.cpan.org/~ronan/SVG-GD-0.20/
----
SWISH-Filter-0.10
http://search.cpan.org/~karman/SWISH-Filter-0.10/
filter documents for indexing with Swish-e
----
UMLS-Interface-0.15
http://search.cpan.org/~btmcinnes/UMLS-Interface-0.15/
Perl interface to the Unified Medical Language System (UMLS)
----
Variable-Magic-0.28
http://search.cpan.org/~vpit/Variable-Magic-0.28/
Associate user-defined magic to variables from Perl.
----
persona-0.02
http://search.cpan.org/~elizabeth/persona-0.02/
control which code will be loaded for an execution context
----
self-0.30
http://search.cpan.org/~gugod/self-0.30/
provides '$self' in OO code.
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Sat, 24 Jan 2009 21:19:28 -0800 (PST)
From: Xah Lee <xahlee@gmail.com>
Subject: Re: OCaml, Language syntax, and Proof Systems
Message-Id: <b363d02e-4d32-43bd-bdcb-31abe4dfb246@r15g2000prh.googlegroups.com>
Addendum:
The above is not a terrible insight, but i suppose it should be useful
for some application. Today, there's huge number of languages, each
screaming ME! To name a few that are talked about by geekers, there's
Arc, Clojure, Scalar, F#, Erlang, Ruby, Groovy, Python 3, Perl6. (for
a big list, see: Proliferation of Computing Languages) So, if i want
to learn another lang down the road, and wish it to be a joy to use,
usable docs, large number of usable libraries, or well supported,
practical community that doesn't loop into monad or tail recursion
every minute, then which one should i buy? With criterions of
industrial background, not culty, lang beauty matter not that much, in
mind, i think Erlang, F# would be great choices, while langs like Qi,
Oz, Arc, Perl6, would be most questionable.
Perm url:
=E2=80=A2 Language, Purity, Cult, and Deception
http://xahlee.org/UnixResource_dir/writ/lang_purity_cult_deception.html
http://xahlee.blogspot.com/2009/01/language-purity-cult-and-deception.html
Xah
=E2=88=91 http://xahlee.org/
=E2=98=84
------------------------------
Date: Sun, 25 Jan 2009 06:37:36 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Peer Review for Folder Delete Script
Message-Id: <slrngnon8g.66f.tadmc@tadmc30.sbcglobal.net>
Cosmic Cruizer <XXjbhuntxx@white-star.com> wrote:
> Hi Tad, it's been a few years since I've had the pleasure of you critiquing
> my code.
Looks like April 2004 by my records.
> When I use warnings, I generally only have it enabled while I'm testing.
Why?
There are many runtime warnings, they can catch things in production
that your test cases missed.
So there is a benefit.
What "cost" do you see that outweighs that benefit?
> I've never tried using open in the following format:
> open my $OUT, '>>', $output or die "could not open '$output' $!";
That is the standard idiom for opening files nowadays.
It makes use of the 3-arg form of open() and indirect filehandles.
> I'll give it a try.
perldoc perlopentut
...
There is also a 3-argument version of open, which ...
...
Indirect Filehandles
open's first argument can be a reference to a filehandle. As of
perl 5.6.0, if the argument is uninitialized, Perl will automatically
create a filehandle and put a reference to it in the first argument
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Sun, 25 Jan 2009 14:49:22 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Peer Review for Folder Delete Script
Message-Id: <Xns9B9E63EAF54asu1cornelledu@127.0.0.1>
Cosmic Cruizer <XXjbhuntxx@white-star.com> wrote in
news:Xns9B9D6ED82B3ADccruizermydejacom@207.115.33.102:
> Here is my code. All feedback is welcomed.
>
> #################################################################
Use
=for comment
File Name: directory_cleanup.pl
WARNING: This script can be very unforgiving and damaging. Make
sure the the correct path is listed, otherwise extreme data loss my
occur ...
=cut
instead of # characters for long block comments like that. Also,
s/my occur/may occur/.
Better yet, write your comments in a proper POD.
> # WARNING: This script can be very unforgiving and damaging.
How about having the user type in the path and confirm? (or, is this
script going to be periodically invoked by a scheduler?)
> my $base_dir='E:\Jobs';
> my $days=31;
...
> ### Do not change anything below this line ###
I recommend that you consider the option of putting configuration
variables in configuration files.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Sun, 25 Jan 2009 17:30:20 GMT
From: Cosmic Cruizer <XXjbhuntxx@white-star.com>
Subject: Re: Peer Review for Folder Delete Script
Message-Id: <Xns9B9E6073F529Eccruizermydejacom@207.115.17.102>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in
news:Xns9B9E63EAF54asu1cornelledu@127.0.0.1:
> Also, s/my occur/may occur/.
Caught it... but still thanks to your attention to detail :)
> Better yet, write your comments in a proper POD.
I probably should have started using POD years ago, but some of the biggest
complements I get are on my consistent and copious comments. Recently some
utility/support scripts I wrote over eight years ago to support a vendor
supplied application were being reviewed in a project to replace that
application. Even though I was somewhat embarrassed about my awkward coding
(it was much worse back then), I was very pleased with how everyone said my
comments made it very easy to understand why and what the scripts are
doing. On the other hand, I've always written the comments so I can easily
figure out what the heck I did.
> How about having the user type in the path and confirm? (or, is this
> script going to be periodically invoked by a scheduler?)
This script will be scheduled to run once a week by the Windows scheduler.
While I would like to say this script is a case of "implement and
forget"... we all know that is not always the case.
> I recommend that you consider the option of putting configuration
> variables in configuration files.
In cases where I know the script will be used for multiple runs, I create
.conf files so the script can call them using @argv from the scheduler. In
this case, the script is being used to support a statement about why and
when the folders are removed. This script will provide the appropriate
amount of rigor without overkill.
Thanks!
...Cos
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 2157
***************************************