[21793] in Perl-Users-Digest
Perl-Users Digest, Issue: 3997 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 19 06:05:56 2002
Date: Sat, 19 Oct 2002 03: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 Sat, 19 Oct 2002 Volume: 10 Number: 3997
Today's topics:
Re: expanding variables in text strings (Jason Quek)
extract char from string into an 2x2 array (kit)
Re: extract char from string into an 2x2 array (Jay Tilton)
Re: How to write a wc utility in Perl? <goldbb2@earthlink.net>
Re: icmp/udp question <smackdab1@hotmail.com>
Re: maximum string length with the system command <nospam@nospam.com>
mod_perl-1.99_05-3 and Apache::Constants <spam@wedoneenostinkin.spam>
Re: Need advice on a project (wrt to tie'ing to a file <nospam@nospam.com>
Perl tutorial for someone with C background <ian_johnson@zdnet.com>
Re: Perl tutorial for someone with C background <nobody@nowhere.com>
Pipelining (Anirban Chakraborti)
Re: Problem with file Sorting with Perl <nospam@nospam.com>
Re: REGEXP probolem (Mark Healey)
Re: Separating stdout and stderr <vilmos@vilmos.org>
Re: Separating stdout and stderr <nospam@nospam.com>
Re: Sleep(1) is not returning ? <nobody@nowhere.com>
Using OLE in Perl <Mark@ecc-limited.com>
Re: using Perl & TXT as database <jwboer@netscape.net>
Using Perl for calc.. dates <ken_mahi@hotmail.com>
Re: Using Perl for calc.. dates <nobody@nowhere.com>
Re: Win 32 IP Ping <goldbb2@earthlink.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 19 Oct 2002 06:37:02 GMT
From: jason@generationterrorists.com (Jason Quek)
Subject: Re: expanding variables in text strings
Message-Id: <3db7fc75.4871695@news.starhub.net.sg>
Thank you all for your suggestions and solutions.
Jason wrote:
>Unfortunately, I need to use single quote marks in this case.
helgi@decode.is (Helgi Briem) wrote:
>> What?!? Why on earth would you have such a completely
>> moronic, clueless requirement?
Andre <alecler@sympatico.ca> wrote:
>It makes sense if the problem is about replacing placeholders in a
>template. Consider the text hardcoded with single quotes as an example of
>text read from an outside source.
Indeed, I had to use single-quote marks because I was replacing
placeholders in a template.
Thanks and regards,
Jason Q.
----------------------------------
>Hi,
>
>The following works:
>
># -----------------------------------------------------------------
>$one = 'John';
>$two = 'Doe';
>$three = 'name';
>
>$string = '$one$two is my $three';
>$string =~ s/(\$\w+)/$1/eeg;
>
>print $string; # yields 'JohnDoe is my name'
># -----------------------------------------------------------------
>
>
>However, if I have this:
>
># -----------------------------------------------------------------
>$FORM{'one'} = 'John';
>$FORM{'two'} = 'Doe';
>$FORM{'three'} = 'name';
>
>$string = '$FORM{\'one\'}$FORM{\'two\'} is my $FORM{\'three\'}';
># -----------------------------------------------------------------
>
>What is the regular expression I should use to match $FORM{'xxx'}?
>
>Any help would be appreciated.
>Thank you.
>
>
>
>Jason Q.
------------------------------
Date: 18 Oct 2002 22:35:33 -0700
From: manutd_kit@yahoo.com (kit)
Subject: extract char from string into an 2x2 array
Message-Id: <1751b2b5.0210182135.2122f8d9@posting.google.com>
I have a 2 x 2 array,
# to initialize the 2 x 2 array with character,
# my idea is from c++ point of view, it probably will have a better
way..
for $r (0..20){
for $c (0..50){
$myArray[$r][$c] = " ";
}
}
and I've tried the folloing from the book to extract the characters
from a string and put the characters into an array.( put a string into
an array )
@{$myArray[2]} [44..49] = "Hello";
after that, when I print the whole array out, the compiler gives me
this error message (5 times, I believe it related to the length of the
string "hello"):
error message >> Use of uninitialized value in print at test.pl line
52.
# print screen loop
print "\n";
for $r (0..20){
for $c (0..50){
print $myArray[$r][$c]; #<<line 52
}
print "\n";
}
-----------------------------------------------------------------------
I know that there is no specific type of a variable in perl, and it
works if I change it into this way:
@{$myArray[2]}[44] = "Hello";
-----------------------------------------------------------------------
I need the first idea because I want to have one character only in
each cell from the array. Can you give me some ideas or hints to solve
this question?
thanks for you help,
Kit
------------------------------
Date: Sat, 19 Oct 2002 07:31:01 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: extract char from string into an 2x2 array
Message-Id: <3db101cf.53047506@news.erols.com>
manutd_kit@yahoo.com (kit) wrote:
| I have a 2 x 2 array,
It looks more like a 21 x 51 array.
| # to initialize the 2 x 2 array with character,
| # my idea is from c++ point of view, it probably will have a better
| way..
| for $r (0..20){
| for $c (0..50){
| $myArray[$r][$c] = " ";
| }
| }
|
| and I've tried the folloing from the book
What book?
| to extract the characters
| from a string and put the characters into an array.( put a string into
| an array )
|
| @{$myArray[2]} [44..49] = "Hello";
That has six elements on the left of the list assignment, and one on
the right.
$myArray[2][44] gets "Hello"
$myArray[2][45] through $myArray[2][49] get undef
Split the string into characters to get those individual characters
into individual cells.
@{$myArray[2]}[44..49] = split //, "Hello";
^^
^^
Might want to change that to 48, though. "Hello" has only five
characters.
| after that, when I print the whole array out, the compiler gives me
| this error message (5 times, I believe it related to the length of the
| string "hello"):
No, it's related to how many elements in that array slice assignment
have no value in the list on the RHS.
| error message >> Use of uninitialized value in print at test.pl line
| 52.
That's a warning, not an error.
| I need the first idea because I want to have one character only in
| each cell from the array.
Seems like you're carrying some conceptual baggage from another
programming language. Consider using a 21-element array of
51-character strings.
# Initialize
my @myarray = (' ' x 51) x 21;
# Alter part of one string
substr($myarray[2], 44, 5) = "Hello";
# print screen loop
for my $r (0..20) {
print "$myarray[$r]\n";
}
------------------------------
Date: Sat, 19 Oct 2002 01:38:30 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: How to write a wc utility in Perl?
Message-Id: <3DB0EFD6.338AB108@earthlink.net>
Soon wrote:
>
> I would like to write a program in Perl that work like wc in UNIX with
> option -l, -w, and -c
For wc -l, try:
perl -neEND\{print\$.,qq/\n/\} list of files
For wc -c, try:
perl -neBEGIN\{\$/=\\1\}END\{print\$.,qq/\n/\} list of files
(untested)
--
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]
------------------------------
Date: Sat, 19 Oct 2002 07:11:10 GMT
From: "smackdab" <smackdab1@hotmail.com>
Subject: Re: icmp/udp question
Message-Id: <iA7s9.175374$S32.12131564@news2.west.cox.net>
Thanks!
Just want to make sure on 1 point:
> Yes, you can include the sequence number in whatever you're send()'ing
> via UDP. No, you won't need to build raw packets.
Since there is no room in a UDP header for the seq#, do I just put it in
the body of the packet? If so, does the receiver of my UDP packet always
send it back to me?
Basically I want to see if a UDP port is open by sending it a packet with my
seq# and then have it return a packet with the same seq# (From what I can
tell this will work with TCP and ICMP, though there is a specific field for
seq#
in the header)
thanks!
"Rocco Caputo" <troc@netrus.net> wrote in message
news:slrnar1cks.8ma.troc@eyrie.homenet...
> On Fri, 18 Oct 2002 21:04:24 GMT, smackdab wrote:
> > For ICMP, I know I can use select() to see if there is any pending
> > data on my socket. Since I can use IO::Socket I am assuming that I
> > can also use IO::Select instead of the select() call, right ?
>
> IO::Select is just an object-oriented version of select(). It hides
> the nitty-gritty vec() work necessary for working with select(). So
> yes, you can use IO::Select wherever select() is appropriate.
>
> > For UDP, I can't tell from my book if I can use select() or
> > IO::Select... It just mentiones that you can set an alarm in an
> > eval {} block to timeout a recv(). Since I am on windows, I don't
> > use alarm..
>
> You can use select() (and by extension, IO::Select) with UDP. No
> alarm() is necessary.
>
> > Assuming that select will work for UDP, can I set the sequence
> > number with IO::Socket or do I need to manually create the packet ?
>
> UDP packets have no sequence number of their own, so any sequence
> number that your UDP packets have is supplied by you.
>
> Yes, you can include the sequence number in whatever you're send()'ing
> via UDP. No, you won't need to build raw packets.
>
> -- Rocco Caputo / troc@pobox.com / poe.perl.org / poe.sf.net
------------------------------
Date: Fri, 18 Oct 2002 22:23:21 -0700
From: "Tan Nguyen" <nospam@nospam.com>
Subject: Re: maximum string length with the system command
Message-Id: <3db0ebbc_5@nopics.sjc>
"Richard Hospital" <richard.hospital@st.com> wrote in message
news:6c14c143.0210180008.abdc307@posting.google.com...
> Hi all,
>
> What is the maximum string length that can be passed to the system
> command under PC (W2000) ? And is it possible to modify the default
> value ?
>
> Thanks in advance.
Umm....this has nothing to do with Perl. Theoretically, WinNT/2K allows a
maximum of 32Kb for the entire length of a command line (program name and
parameters). However, people has reported that it only allows 2Kb in
practice. There is no environment setting to change this value. What would
you like to do? There are probably much better ways than hitting a command
stuffed with forrest of characters.
------------------------------
Date: Sat, 19 Oct 2002 09:00:35 GMT
From: matt <spam@wedoneenostinkin.spam>
Subject: mod_perl-1.99_05-3 and Apache::Constants
Message-Id: <Ta9s9.10790$zE6.35916@rwcrnsc51.ops.asp.att.net>
I just installed RedHat 8.0 running perl v5.8.0 with mod_perl-1.99_05-3.
I am just starting to play with mod_perl, and I am having some problems.
It looks like Apache::Constants doesn't exist in this release of
mod_perl. There is a module called Apache::Const in my @INC at
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache/Const.pm.
Is this the same (no, just reading the file tells me that)? So what's
the scoop in Constants.pm. I have a calendar script that depends on it.
Thanks in advance for any help. -- Matt
------------------------------
Date: Fri, 18 Oct 2002 22:41:39 -0700
From: "Tan Nguyen" <nospam@nospam.com>
Subject: Re: Need advice on a project (wrt to tie'ing to a file and general strategy)
Message-Id: <3db0f006$1_3@nopics.sjc>
"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
news:ltcvqusvru4fnv3m2lstnuotnfe99cgmv3@4ax.com...
> So, the first question regards how to calculate checksums with perl:
> do I have to resort to external programs (thus, possibly, having to
> use a Windows port of a *nix one for compatibility) or is there a
> (recommended) module suitable for this task?
As pointed out in the previous post, there's Digest::MD5 on CPAN for your
need. However, this beast is very slow (not because of Perl, it's the
algorithm), but good to bring the probability of collision of two distinct
file close to zero.
If you don't mind the chance of two distinct files with the same filename
and checksum, and like to speed up your checksum computation significantly,
you might consider using CRC32. Correct me if I'm wrong, the collision
probability of CRC32 is 2^(-32) which is approximately one out of 4 billion
trials. Might be good enough for you application.
>
> Also, I know (more than) one way to make such a program, but an
> important consideration to take into account is that now I should run
> it on huge (for me) "data sets" (that is of the size of 10^5 files).
>
If you like to keep things in memory, you might want to give an estimate on
how much memory you need to hold the whole thing. This varies widely
depending on the average length of the filenames, average length of string
of size of files and the number of files. (I assume that you'd like to keep
a hash keyed on the filesize with values being filenames), plus a fair
amount of memory needed for checksum computation and Perl.
estimate = number of files * (average length of filenames + average length
of string of size of files) + 30 % extra (Perl and checksum computation).
> I know from FAQs, etc. that a solution is to tie to a file (whatever I
> will use: array, hash...), but there are many modules designed for
> that. Which one do you recommend? I'd prefer a KISS solution, that is,
> I know that some of them use some sort of database libraries
> transparently, but it seems to me an overhead.
>
> In case I decide to use a DB-oriented module, are there any
> portability issues wrt the abovementioned libraries (e.g. are they
> available and work reliably on "all" platforms?).
>
> Also, I would like to cache the data relative to size/checksums when
> they are calculated, so to "include them on the list" when running the
> program subsequent times. Notice that I'm aware this strategy won't
> catch all duplicates between one run and the other, but I'm sure it
> would be nevertheless an enhancement for my purposes...
>
>
> Michele
> --
> Liberta' va cercando, ch'e' si' cara,
> Come sa chi per lei vita rifiuta.
> [Dante Alighieri, Purg. I, 71-72]
>
> I am my own country - United States Confederate of Me!
> [Pennywise, "My own country"]
------------------------------
Date: Sat, 19 Oct 2002 09:02:18 +0200
From: Ian Johnson <ian_johnson@zdnet.com>
Subject: Perl tutorial for someone with C background
Message-Id: <MPG.181b21e4beb4eea098976c@news.hinet.hr>
I would like suggestions on complete and free online Perl tutorial, for
someone with a solid knowledge of C language.
I could have scoured the net for one, but given that in my experience
good and accurate online tutorials on any given language are rare, I
thought asking the experts on the subject might be a better way to go.
Ian
------------------------------
Date: Sat, 19 Oct 2002 18:52:25 +1000
From: "Gregory Toomey" <nobody@nowhere.com>
Subject: Re: Perl tutorial for someone with C background
Message-Id: <IW8s9.56673$g9.162504@newsfeeds.bigpond.com>
Ian Johnson wrote in message ...
>I would like suggestions on complete and free online Perl tutorial, for
>someone with a solid knowledge of C language.
>I could have scoured the net for one, but given that in my experience
>good and accurate online tutorials on any given language are rare, I
>thought asking the experts on the subject might be a better way to go.
>
>Ian
You could ask one of the monks the Perl Monastery
http://perlmonks.com/index.pl?node=Tutorials
or the Intro Tutorial http://www.ebb.org/PickingUpPerl/
Also very useful:
General documentation http://perldoc.com/ (the faqs are a must read)
Quick Reference Guide http://www.rexswain.com/perl5.html
gtoomey
------------------------------
Date: 18 Oct 2002 23:36:08 -0700
From: achakrab@nmsu.edu (Anirban Chakraborti)
Subject: Pipelining
Message-Id: <f33fa166.0210182236.45328540@posting.google.com>
Hi All,
I have a perl program that generates huge amount of data which
is then processed by another perl program.Since the data output is
huge I wanted to use a pipe between the two program.Although i am
using a pipe but I am not able to make the second perl program to read
from the pipe.I am not sure how to do this.
here is my program
// the follwing line unzips the file and pipes it
open(NEW,"gzip -d output.gz |);
now a another perl program should take input from the pipe and i need
it to do it in a program
Please help me out.
Anirban
------------------------------
Date: Fri, 18 Oct 2002 22:12:40 -0700
From: "Tan Nguyen" <nospam@nospam.com>
Subject: Re: Problem with file Sorting with Perl
Message-Id: <3db0e93b$1_2@nopics.sjc>
"raj shank" <natarajshank@hotmail.com> wrote in message
news:c54eb265.0210180322.6b34f70b@posting.google.com...
> Hi,
> I am having problem with sorting a flat file. I am reading the file
> into an array and then I issue the array sort command like this
>
> ###########################################################
> open (inF1, "$my_dir\\outFile1.txt") || die("Can not open file\n");
> my $line2 = ""; my @outF1arr = ();
> while ($line2 = <inF1>)
> {
> push(@outF1arr,$line2);
> }#End while ($line2 = <inF1>)
> ### Sort by user_id
> @outF1arr = sort(@outF1arr);
> ###########################################################
> When it tries to sort the file, it throws out "Out of Memory" error.
> The file I am trying to sort is 500 MB. I tried it on Windows NT and
> Windows 2000 machines. Is this a limitation of Windows NT/2000 or
> limitation of Perl interpreter or the sort command. The system I tried
> had ample memory of 2Gig RAM. Is there a way of sorting the file with
> out reading it into an array or is there a module from CPAN or others
> which sorts file with out file size limits.
> Thanks for your help.
> Raj
Check out http://search.cpan.org/author/CNANDOR/File-Sort-1.01/Sort.pm
This is a merge-sort module which allows you to control when you want to
write stuff to temp files.
2 Gig of RAM might sound enough for your need, but considering that Windows
system needs a lot of memory for its GUI and services, and that Perl uses a
lot of it for bookkeeping, that might not be enough.
------------------------------
Date: 19 Oct 2002 04:31:39 GMT
From: admin@hotmail.com (Mark Healey)
Subject: Re: REGEXP probolem
Message-Id: <dxKndd8YehcW-pn2-qzOvZWRjgxMS@adsl-63-207-135-60.dsl.sndg02.pacbell.net>
On Fri, 18 Oct 2002 02:23:17, Andreas =?iso-8859-1?Q?K=E4h=E4ri?=
<ak@freeshell.org.REMOVE> wrote:
> Submitted by "Mark Healey" to comp.lang.perl.misc:
> > On Thu, 17 Oct 2002 23:51:45, ctcgag@hotmail.com wrote:
> >
> >> admin@hotmail.com (Mark Healey) wrote:
> >> > Why doesn't /reviews\.gif/ match "reviews.gif"?
> >
> > foreach (@BNContent)
>
> Does @BNContent in fact contain an element which contains the
> text string "reviews.gif"?
OK, I'm a complete retard. I accidently switched test data sets.
Mark Healey
marknews(the 'at' thing)healeyonline.com
------------------------------
Date: 18 Oct 2002 22:32:02 -0700
From: Vilmos Soti <vilmos@vilmos.org>
Subject: Re: Separating stdout and stderr
Message-Id: <87iszz3sfh.fsf@my.vilmos.lan>
Garry Williams <garry@ifr.zvolve.net> writes:
> On 18 Oct 2002 14:59:56 -0700, Vilmos Soti <vilmos@vilmos.org> wrote:
>
>> If I open a process with open, then is it possible somehow to access
>> the process' stdout and stderr separately?
>
>
> This a FAQ.
>
> perldoc -q stderr
> "How can I capture STDERR from an external command?"
Sorry. I was looking at the manpage (perlfunc), and I didn't find
a solution around the "open" command.
> Also see IPC::Open3, but pay special attention to the "This is very
> dangerous..." paragraph in that manual page. Probably the FAQ answer
> is best. The FAQ claims it's answer is the "easiest and safest".
I also saw it, and the "very dangerous" scared me away. :-)
>> open (X, "tar cvf /dev/nst0 /mydir");
>
> This doesn't look like copied code...
Yes, since the original command (which is also tar) is fairly long due
to a couple of vars.
Thanks for your answer. I will look into the "perldoc -q stderr" stuff.
Vilmos
------------------------------
Date: Sat, 19 Oct 2002 00:32:24 -0700
From: "Tan Nguyen" <nospam@nospam.com>
Subject: Re: Separating stdout and stderr
Message-Id: <3db109fa$1_4@nopics.sjc>
"Vilmos Soti" <vilmos@vilmos.org> wrote in message
news:87iszz3sfh.fsf@my.vilmos.lan...
> Garry Williams <garry@ifr.zvolve.net> writes:
>
> > On 18 Oct 2002 14:59:56 -0700, Vilmos Soti <vilmos@vilmos.org> wrote:
> >
> >> If I open a process with open, then is it possible somehow to access
> >> the process' stdout and stderr separately?
> >
> >
> > This a FAQ.
> >
> > perldoc -q stderr
> > "How can I capture STDERR from an external command?"
>
> Sorry. I was looking at the manpage (perlfunc), and I didn't find
> a solution around the "open" command.
>
> > Also see IPC::Open3, but pay special attention to the "This is very
> > dangerous..." paragraph in that manual page. Probably the FAQ answer
> > is best. The FAQ claims it's answer is the "easiest and safest".
>
> I also saw it, and the "very dangerous" scared me away. :-)
Since all you need is reading distinct output from stderr and stdout, open3
should suffice. There's nothing to be "scared" of in this context. The
caution is there for those who like to interact with an application such as
"bc" calculator which asks the user to enter input and gives back the
computed results.
You can also explicitly pipe stderr and stdout from a child process to a
parent which is what open3 does anyways.
> >> open (X, "tar cvf /dev/nst0 /mydir");
> >
> > This doesn't look like copied code...
>
> Yes, since the original command (which is also tar) is fairly long due
> to a couple of vars.
>
> Thanks for your answer. I will look into the "perldoc -q stderr" stuff.
>
> Vilmos
------------------------------
Date: Sat, 19 Oct 2002 15:30:15 +1000
From: "Gregory Toomey" <nobody@nowhere.com>
Subject: Re: Sleep(1) is not returning ?
Message-Id: <9Z5s9.56583$g9.162471@newsfeeds.bigpond.com>
Lenny Story wrote in message ...
>Greetings,
>
>Hmm...well, your right...It works now..Surprising....that wasn't the
>answer i expected.
>
>Bodo, thank you for the response.
>-Lenny
>
It's the right answer. What did you expect?
gtoomey
------------------------------
Date: Sat, 19 Oct 2002 10:30:00 +0100
From: "mark wildey" <Mark@ecc-limited.com>
Subject: Using OLE in Perl
Message-Id: <ur29dh4pj8e97d@corp.supernews.com>
Hi there
I have written a small number of scripts that use OLE and really struggle on
the format/sequence of parms. I can use the Macro facility in Excel to
generate some VBA code but converting this into Perl is not always straight
forward.
Is there a document/url that describes how to convert OLE into Perl.
Regards
Mark
P.S. If anyone has any code that deletes an Excel worksheet I would really
appreciate it !
------------------------------
Date: Sat, 19 Oct 2002 11:49:25 +0200
From: Boer <jwboer@netscape.net>
Subject: Re: using Perl & TXT as database
Message-Id: <3DB12AA5.1070406@netscape.net>
Bob Walton wrote:
[ ... ]
> The text-file version will be fine until you get a fair-sized chunk of
> data built up. Then it will be way slow, and the SQL database will
> shine in comparison (if you use mod_perl or something so you don't have
> the connection overhead for every access).
What would you qualify as 'fair sized chunk of data'?
> BTW, you might try the DBI module with DBD-CSV. That will let you use
> exactly the same program with CSV text files as with a full-blown SQL
> database (except for the connection bit).
OK, thanks
JW
------------------------------
Date: Sat, 19 Oct 2002 01:17:34 -0700
From: KM <ken_mahi@hotmail.com>
Subject: Using Perl for calc.. dates
Message-Id: <3DB1151E.1A25831E@hotmail.com>
This is a multi-part message in MIME format.
--------------EF8D5FDFC1BEF42955697217
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--------------EF8D5FDFC1BEF42955697217
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-Mozilla-Status2: 00000000
Message-ID: <3DAE6A47.68D75D14@hotmail.com>
Date: Thu, 17 Oct 2002 00:44:07 -0700
From: KM <ken_mahi@hotmail.com>
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD EBM-Compaq1 (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.lang.perl.misc
Subject: PROB: Using Perl for calc.. dates
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Write a program to prompt the user for a year between 1900 and 2099, and
produce the dates that Eastern Orthodox Easter falls on in both the
Julian and Gregorian calendars. Gauss's Algorithm should be used as
described ( http://www.smart.net/~mmontes/ortheast.html ) and provide
the following functions to implement the program:
instruct( ) instructs the user
prompt( ) supplies the prompt;gets/checks data
rc( ) calculates rc using algorithm and returns it's value
prJulian( ) uses rc to print Julian calendar day
prGregorian( ) uses rc to print Gregorian calendar day
Create an appropriate parameter list for the print functions. These
functions need to print the month, day, and year.
The program is to be designed and implemented only once per invocation.
For additional details on the Orthodox Easter, please check ..
http://www.smart.net/~mmontes/ortheast.html
--------------EF8D5FDFC1BEF42955697217--
------------------------------
Date: Sat, 19 Oct 2002 19:01:32 +1000
From: "Gregory Toomey" <nobody@nowhere.com>
Subject: Re: Using Perl for calc.. dates
Message-Id: <f39s9.56676$g9.162688@newsfeeds.bigpond.com>
KM wrote in message <3DB1151E.1A25831E@hotmail.com>...
And your attempt to solve this problem is ...
gtoomey
------------------------------
Date: Sat, 19 Oct 2002 01:30:51 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Win 32 IP Ping
Message-Id: <3DB0EE0B.84DB4232@earthlink.net>
NewsGroups wrote:
>
> can someone tell me where to get a perl script that will ping 24
> windows computers from a windows server and report back ?
Simultaneously, or one at a time?
If it's acceptable to ping each of those 24 computers in sequence, then
Net::Ping should do it.
If you need those 24 pings to all be done simultaneously, then I would
suggest POE::Component::Client::Ping, or else roll-your-own (search this
group's archives for some roll-your-own type code which I suggested).
--
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 3997
***************************************