From bader at cs.odu.edu Sat Apr 1 13:52:21 2000 From: bader at cs.odu.edu (Terry) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Modules talk In-Reply-To: Message-ID: Hey all... Thanks for the Module talk on Thursday... good stuff... I have another question at the moment or request, does anyone have a successful cgi running that deals with cookies? I have not been able to successfully get my cookie to work.... If so would it be possible to get the source just to see how you worked it? Thanks.... Terry Bader Old Dominion University, Computer Science Dept http://www.cs.odu.edu/~bader bader@cs.odu.edu icq: 5202487 work:(757)683-5871 pager:(757)326-2003 From mark at mrmark.com Tue Apr 4 09:54:45 2000 From: mark at mrmark.com (Mark D Wolinski) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Perl Book Message-ID: Hi all... As I mentioned last meeting, I received a letter of inquiry from Angela Kozlowski at Sams Publishing looking for people interested in doing a Perl book. At the time, I had requested more info from her and finally received it. While I'm not advanced enough for it, perhaps someone in our group is. Not only would this offer the opportunity to work on a perl book, if you're lead author you also get royalties and your name on the jacket...not to mention some good PR for yourself. I'd certainly encourage anyone who's knowledge of Perl is advanced to get in touch with her. She has been in touch with me from her: angela@butterfly22.com address. Mark Here's the information she sent along: Hello! Thank you for your response! I'm sorry it's taken me so long to get back to you. I was unfortunately pulled away to a conference all last week and didn't have much time to access email. The Perl book we are currently interested in publishing is intended to be in our new "White Book" series. The White books provide content relative to the professional's work. The book explains how the technology is used and can be used rather than how the technology is supposed to work. Workarounds are always explored if necessary. The advice and code and examples all reflect practical and realistic ways for solving problems. These books are typically 600-800 pages in length and are preferably aimed at an intermediate audience. The books are very author driven and are not as tied to a specific structure as our other series. We are currently in search of someone who can take the lead author role on this project. The lead author generally takes the lead role in creating the outline and the vision for the book. The lead would prepare the proposal (outline and book information sheet) and then be the person who would stay on top of news on the subject in case we need to add or change anything at a later point. The lead author typically writes 40-50% of the book at minimum. They receive a royalty and an advance, rather than just a flat fee. Of course, the lead is the name on the front cover. If this role interests you, I can forward the materials you'll need to create the proposal and we can discuss the book in more detail. If you'd rather be more of a contributor (write a chapter or a couple chapters), that is fine as well and we can decide how much you'll contribute once we have an outline finalized. Please let me know how you'd like to be involved and we can proceed from there. Any and all questions are welcome. Much thanks! Angela ________________________ Angela Kozlowski Acquisitions Editor Sams Publishing (612) 435-2977 angela@butterfly22.com angela.kozlowski@macmillanusa.com From chicks at chicks.net Tue Apr 4 22:27:23 2000 From: chicks at chicks.net (chicks@chicks.net) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Modules talk In-Reply-To: Message-ID: On Sat, 1 Apr 2000, Terry wrote: > Hey all... Thanks for the Module talk on Thursday... good stuff... I'm glad somebody got something out of it. > I have another question at the moment or request, does anyone have a > successful cgi running that deals with cookies? I have not been able > to successfully get my cookie to work.... If so would it be possible > to get the source just to see how you worked it? I don't have a CGI example. But these lines begin every mod_perl program I write. my $r = shift; my %in = $r->headers_in(); my %args = $r->method eq 'POST' ? $r->content : $r->args; $r->header_out("Perl-Version" => $]); $r->content_type("text/html"); $r->send_http_header; my $cookie = $in{'Cookie'}; You might prefer to check out the documentation for the CGI::Cookie module. man CPAN if you haven't yet for an easy way to install it. :-) -- Q: Why did Bill Gates cross the road? A: To avoid the Department of Justice. From mark at mrmark.com Thu Apr 13 13:35:32 2000 From: mark at mrmark.com (Mark D Wolinski) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Some News.. In-Reply-To: Message-ID: Hello all... Although I haven't updated the home page yet... The next meeting is going to be Wednesday, April 26. Please note, we moved it to Wednesday because some folks said they can make it on Wednesday, but not on Thursday, so we'll see how we do. Same place (see web page for directions), same time (7:34 p.m.). Mark W From bader at cs.odu.edu Thu Apr 13 13:38:08 2000 From: bader at cs.odu.edu (Terry) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Some News.. In-Reply-To: Message-ID: Whats the topic this time 'round? On Thu, 13 Apr 2000, Mark D Wolinski wrote: > Hello all... > > Although I haven't updated the home page yet... > > The next meeting is going to be Wednesday, April 26. > > Please note, we moved it to Wednesday because some folks said they can make > it on Wednesday, but not on Thursday, so we'll see how we do. > > Same place (see web page for directions), same time (7:34 p.m.). > > Mark W > Terry Bader Old Dominion University, Computer Science Dept http://www.cs.odu.edu/~bader bader@cs.odu.edu icq: 5202487 work:(757)683-5871 pager:(757)326-2003 From mark at mrmark.com Thu Apr 13 13:43:16 2000 From: mark at mrmark.com (Mark D Wolinski) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Some News.. In-Reply-To: Message-ID: Hmm, as I recall it's going to be discussing Arrays and Variables I believe. Mark W -----Original Message----- From: owner-norfolk-pm-list@pm.org [mailto:owner-norfolk-pm-list@pm.org]On Behalf Of Terry Sent: Thursday, April 13, 2000 2:38 PM To: norfolk-pm-list@happyfunball.pm.org Subject: Re: [HRPM] Some News.. Whats the topic this time 'round? On Thu, 13 Apr 2000, Mark D Wolinski wrote: > Hello all... > > Although I haven't updated the home page yet... > > The next meeting is going to be Wednesday, April 26. > > Please note, we moved it to Wednesday because some folks said they can make > it on Wednesday, but not on Thursday, so we'll see how we do. > > Same place (see web page for directions), same time (7:34 p.m.). > > Mark W > Terry Bader Old Dominion University, Computer Science Dept http://www.cs.odu.edu/~bader bader@cs.odu.edu icq: 5202487 work:(757)683-5871 pager:(757)326-2003 From chicks at chicks.net Thu Apr 13 14:03:05 2000 From: chicks at chicks.net (chicks@chicks.net) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Some News.. In-Reply-To: Message-ID: On Thu, 13 Apr 2000, Mark D Wolinski wrote: > Hmm, as I recall it's going to be discussing Arrays and Variables I > believe. That's it! I'm basically planning on following along through the arrays chapter in the Perl Cookbook. Maybe our media guy can post some announcements. :-) -- Q: Why did Bill Gates cross the road? A: To avoid the Department of Justice. From mark at mrmark.com Fri Apr 14 09:56:31 2000 From: mark at mrmark.com (Mark D Wolinski) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Website has been updated In-Reply-To: Message-ID: The website has been updated to reflect the next meeting information. http://norfolk.pm.org/ Mark W From webmaster at udtseals.com Mon Apr 17 08:36:41 2000 From: webmaster at udtseals.com (Michael Theiss) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] just a test Message-ID: <000501bfa871$f7016da0$c301a8c0@alphas.com> This is simply a test, I have not received andy messages from the list yet. This should be the first one. magic From dentonb at linuxfan.com Mon Apr 17 12:06:46 2000 From: dentonb at linuxfan.com (Denton B) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] just a test References: <000501bfa871$f7016da0$c301a8c0@alphas.com> Message-ID: <20000417170325.70121.qmail@hotmail.com> Yeap...it works... ----- Original Message ----- From: "Michael Theiss" To: Sent: Monday, April 17, 2000 9:36 AM Subject: [HRPM] just a test > This is simply a test, > I have not received andy messages from the > list yet. This should be the first one. > magic > > From lsteinha at my-deja.com Mon Apr 17 14:50:42 2000 From: lsteinha at my-deja.com (Lyle Steinhardt) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Problem compiling Sybperl with perl5.6.0 Message-ID: Can anyone assist? I'm trying to install SybPerl 2.11 into a Perl 5.6.0 binary on a Solaris 2.6 server. I'm getting a type mismatch error in DLIB.xs. Lyle Steinhardt --== Sent via Deja.com http://www.deja.com/ ==-- Share what you know. Learn what you don't. From mpatten at exis.net Mon Apr 17 17:15:03 2000 From: mpatten at exis.net (Mike Patten) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Is dbmopen different in Perl 5.6.0? Message-ID: I thought I'd try the 'ggh' program from (chapter 14 of) the _Perl_Cookbook_ because it looked interesting but I ran into a problem. These lines: 44. $dotdir = $ENV{HOME} || $ENV{LOGNAME}; 45. $HISTORY = $opt_database || "$dotdir/.netscape/history.db"; 46. 47. die "no netscape history dbase in $HISTORY: $!" unless -e $HISTORY; 48. die "can't dbmopen $HISTORY: $!" unless dbmopen %hist_db, $HISTORY,\ 0666; generate this error: can't dbmopen /home/mpatten/.netscape/history.db: File exists at /home/mpatten/bin/ggh line 48. It should be able to open an existing file, shouldn't it? (Do I need to learn to use the 'tie' function to do this stuff?) I recently upgraded from 5.005 to 5.6.0, is dbmopen different? I don't know; I haven't used the function before but I followed the book exactly. -- Mike Patten From mark at mrmark.com Mon Apr 17 17:50:07 2000 From: mark at mrmark.com (Mark D Wolinski) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Is dbmopen different in Perl 5.6.0? In-Reply-To: Message-ID: While I'm not sure if it's related, I tested upgrading to 5.6 with my system and found it did not like the DB_File I was using, croaked left and right over my database called (using Tie). So... Mark W > -----Original Message----- > From: owner-norfolk-pm-list@pm.org > [mailto:owner-norfolk-pm-list@pm.org]On Behalf Of Mike Patten > Sent: Monday, April 17, 2000 6:15 PM > To: HRPM > Subject: [HRPM] Is dbmopen different in Perl 5.6.0? > > > I thought I'd try the 'ggh' program from (chapter 14 of) the > _Perl_Cookbook_ because it looked interesting but I ran into a problem. > > These lines: > 44. $dotdir = $ENV{HOME} || $ENV{LOGNAME}; > 45. $HISTORY = $opt_database || "$dotdir/.netscape/history.db"; > 46. > 47. die "no netscape history dbase in $HISTORY: $!" unless -e $HISTORY; > 48. die "can't dbmopen $HISTORY: $!" unless dbmopen %hist_db, $HISTORY,\ > 0666; > > generate this error: > can't dbmopen /home/mpatten/.netscape/history.db: File exists at > /home/mpatten/bin/ggh line 48. > > It should be able to open an existing file, shouldn't it? (Do I need to > learn to use the 'tie' function to do this stuff?) I recently upgraded > from 5.005 to 5.6.0, is dbmopen different? I don't know; I haven't used > the function before but I followed the book exactly. > > -- > Mike Patten > > > From chicks at chicks.net Tue Apr 18 12:10:44 2000 From: chicks at chicks.net (chicks@chicks.net) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Is dbmopen different in Perl 5.6.0? In-Reply-To: Message-ID: On Mon, 17 Apr 2000, Mike Patten wrote: > 45. $HISTORY = $opt_database || "$dotdir/.netscape/history.db"; If I recall correctly , the dbm subsystem adds the extension itself. Try it without the '.db'. > can't dbmopen /home/mpatten/.netscape/history.db: File exists at > /home/mpatten/bin/ggh line 48. Is Netscape open at the time? You may be getting 'file exists' since it's open by Netscape. > I recently upgraded from 5.005 to 5.6.0, is dbmopen different? Do you have an old perl binary lieing around you can try? Are you sure your modules are up to date? Did it pass all the tests? The 5.6.0 release notes indicate that dbm does fail on some non-x86 architectures. But the odds of tripping over that bug seem rather remote. -- Q: Why did Bill Gates cross the road? A: To avoid the Department of Justice. From mpatten at exis.net Wed Apr 19 04:43:02 2000 From: mpatten at exis.net (Mike Patten) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Is dbmopen different in Perl 5.6.0? In-Reply-To: Message-ID: On Tue, 18 Apr 2000 chicks@chicks.net wrote: > On Mon, 17 Apr 2000, Mike Patten wrote: > > 45. $HISTORY = $opt_database || "$dotdir/.netscape/history.db"; > > If I recall correctly , the dbm subsystem adds the extension itself. Try > it without the '.db'. I tried that and it creates a new "Berkeley DB 2.X Hash/Little Endian (Version 5)" file called "history" (at least that's what 'file' says it is) and a few lines later I get an error about using an uninitialized value when I try to use %dist_db. The perlfunc man page says that you should leave of the .dir or .pag extension if there is one. > > can't dbmopen /home/mpatten/.netscape/history.db: File exists at > > /home/mpatten/bin/ggh line 48. > > Is Netscape open at the time? You may be getting 'file exists' since it's > open by Netscape. No, I didn't even have X running, let alone netscape. (And I checked with top to double check. I know that sometimes it hangs around.) > > I recently upgraded from 5.005 to 5.6.0, is dbmopen different? > > Do you have an old perl binary lieing around you can try? Are you sure > your modules are up to date? Did it pass all the tests? The 5.6.0 > release notes indicate that dbm does fail on some non-x86 architectures. > But the odds of tripping over that bug seem rather remote. I just checked and found a file called /usr/bin/perl5.00503 so I changed #!/usr/bin/perl to #!/usr/bin/perl5.00503 and got the same error so I guess it's nothing new. I had to recompile the extra modules I've added but the only database module I've added was Mysql. I kept the old modules after compiling the new version. (I said I wanted to support the old modules when I compiled it but they didn't work.) Yes, when I compiled Perl 5.6.0, it passed all the tests when I did 'make test.' My computer is running on an Intel Pentium so I doubt that that's the problem. The only module the script calls explicitly is Getopt::Long but I've read that the 'dbmopen' function calls others for what it deems appropriate for the particular file. I assumed that all the scripts in the _Perl_Cookbook_ worked with Perl 5.005. I guess it wouldn't have worked with the old version either, at least on my computer. I think I might have to use 'tie' if I really want to use this script. Thanks for the helpful suggestions. -- Mike Patten From mpatten at exis.net Wed Apr 19 18:59:08 2000 From: mpatten at exis.net (Mike Patten) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Is dbmopen different in Perl 5.6.0? In-Reply-To: Message-ID: On Mon, 17 Apr 2000, Mark D Wolinski wrote: > While I'm not sure if it's related, I tested upgrading to 5.6 with my system > and found it did not like the DB_File I was using, croaked left and right > over my database called (using Tie). > > So... I don't know whether it's related, either. I do know that Perl 5.6.0 comes with its own DB_File module. I also looked over the source again and in the middle of the program is a line that says, "require DB_File; DB_File->import();". I've looked at the DB_File perldoc but didn't find anything in there about an import method but all the examples said "use DB_File" so I look but didn't find a DB_File.pl; only DB_File.pm. I'm still scratching my head... -- Mike Patten From jduffy at semcor.com Thu Apr 20 02:24:54 2000 From: jduffy at semcor.com (Jeff Duffy) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Next Class for Introductory Perl Message-ID: <38FEB0C6.6F83B077@semcor.com> All, My apologies for the delay in getting information out to you; it's been a pretty hectic week. The next class will be held this Saturday, April 22 2000 at 10am. The topics covered this session wil include Lists, Arrays, and Basic Control Structures, so we'll have some nice meaty material to dig into this weekend. I wanted to announce as early as possible that due to unavoidable circumstances, class #3, which was scheduled for the 29th of April 2000, will be delayed until the following Saturday, which is the 6th of May. Nothing else has changed; we'll just make sure that there is plenty of homework assigned this time around so you can take advantage of the extra time and get the concepts we've covered so far down pat. The class website will be going up soon: as a result I am asking that anyone who is not signed up on the Hampton Roads Perl Mongers list (http://norfolk.pm.org) does so, as that will become our primary method of communication after this class. For those who did not attend class #1, the directions can be found on the website mentioned above. I hope to see you all again Saturday, and have a great week until then. Jeff -- Jeffrey A. Duffy Principal Engineer ACS Services Havelock, NC jduffy@semcor.com From jduffy at semcor.com Thu Apr 20 14:23:06 2000 From: jduffy at semcor.com (Jeff Duffy) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] *cough* Correction. Message-ID: <38FF591A.8C67F6E0@semcor.com> All, Just a few hours ago, I said: "I wanted to announce as early as possible that due to unavoidable circumstances, class #3, which was scheduled for the 29th of April 2000, will be delayed until the following Saturday, which is the 6th of May." I was, of course, completely and utterly wrong. The class that needs to be postponed is class #4, which was originally slated to occur on the 6th of May. This class will be delayed until the 13th of May, one week later. So to reiterate: Class #3 will be held on the 29th of April as planned. Class #4 will be postponed from the 6th of May to the 13th of May. Now that we have that straightened out, I'd like to remind everyone to please sign up on the HRPM mailing list. Information can be found at http://norfolk.pm.org. Thanks! Jeff -- Jeffrey A. Duffy Principal Engineer ACS Services Havelock, NC jduffy@semcor.com From mark at mrmark.com Mon Apr 24 09:19:26 2000 From: mark at mrmark.com (Mark D Wolinski) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Reminder: Meeting This Wednesday In-Reply-To: Message-ID: Hi all, As a general reminder, our next meeting is scheduled for Wednesday, April 26 at 7:34 p.m. Directions to the meeting are located on our web site: http://norfolk.pm.org/ Mark W From rthomas at efws.com Mon Apr 24 20:58:40 2000 From: rthomas at efws.com (RCT) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] win perl Message-ID: <000001bfae59$c757b6c0$0200a8c0@rclm2> OK guys what is the trick to get Perl to run on a windows box Don't say install Unix this is a laptop that can be hidden from the boss so the learning of perl can be done at work and it's a machine that will not take Linux because of the strange configuration Thanks R.C.Thomas RCLM GP / NNSY C-1100IP http://www.rclm.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 1736 bytes Desc: not available Url : http://mail.pm.org/archives/norfolk-pm/attachments/20000424/b8210811/winmail.bin From jduffy at semcor.com Mon Apr 24 22:12:58 2000 From: jduffy at semcor.com (Jeff Duffy) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] win perl References: <852568CC.000BFD3D.00@NTMTA2.semcor.com> Message-ID: <39050D3A.21DFFD7D@semcor.com> RCT wrote: > > OK guys what is the trick to get Perl to run on a windows box > Don't say install Unix this is a laptop that can be hidden from > the boss so the learning of perl can be done at work and it's a > machine that will not take Linux because of the strange configuration Okay, I won't say 'Install Unix' if you: 1) Take a breath. 2) Promise to send only text, non multipart email in the future :) Anyway, There are two ways to get Perl on a Windows machine. The first and easiest way is to download the ActiveState port of Perl to Win32, which comes with the pretty GUI installer and so forth: http://www.activestate.com. Or you can use a precompiled binary: http://people.netscape.com/kristian/nsPerl/ Jeff -- Jeffrey A. Duffy jduffy@semcor.com perl -e 'print pack"H*","4A6566662C20416E6F74686572205065726C204861636B65720A"' From chicks at chicks.net Tue Apr 25 11:48:05 2000 From: chicks at chicks.net (chicks@chicks.net) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] win perl In-Reply-To: <000001bfae59$c757b6c0$0200a8c0@rclm2> Message-ID: On Mon, 24 Apr 2000, RCT wrote: > OK guys what is the trick to get Perl to run on a windows box Don't > say install Unix this is a laptop that can be hidden from the boss so > the learning of perl can be done at work and it's a machine that will > not take Linux because of the strange configuration If you're running NT, you could always run VMware for NT and put the linux du jour into it. -- "Outside of a dog, a man's best friend is a good book. Inside of a dog, it's too dark to read." - Groucho Marx From webmaster at udtseals.com Tue Apr 25 14:06:39 2000 From: webmaster at udtseals.com (Michael Theiss) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Perl Mongers Meeting Tomorrow Message-ID: <008301bfaee9$74e15280$c301a8c0@alphas.com> Hi all, I just wanted to say that I am bummed out that I can't make the Perl Mongers meeting tomorrow night. I have a business dinner to go to, "yucky." I will be there in spirit, though. Michael Theiss webmaster@udtseals.com From rthomas at efws.com Tue Apr 25 23:06:53 2000 From: rthomas at efws.com (RCT) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] win perl In-Reply-To: <39050D3A.21DFFD7D@semcor.com> Message-ID: <000201bfaf34$dac3f9e0$0200a8c0@rclm2> hi Jeff I Think I'm down to text now (sorry)let me know if I'm not both types of perl downloads were tried before I asked for help with no luck. The slick install http://www.activestate.com. says it fixes the problems that the other http://people.netscape.com/kristian/nsPerl/ has with the dreaded windows registry but like most thing Windows it does not work. So again what is the trick to get Perl to run on a windows box? VMware suggestion is just unimaginative and silly. This is a laptop with minimal resources and after all perl is not resource hungry or so I here. This group was trying to be helpful to the new comer in to programming and yet no way to start writing a perl script has been yet brought up. I think way to many things are assumed buy those that have been doing it everyday for years R.C.Thomas RCLM GP / NNSY C-1100IP http://www.rclm.com/ From chicks at chicks.net Tue Apr 25 23:36:33 2000 From: chicks at chicks.net (chicks@chicks.net) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] win perl In-Reply-To: <000201bfaf34$dac3f9e0$0200a8c0@rclm2> Message-ID: On Wed, 26 Apr 2000, RCT wrote: > I Think I'm down to text now Yep. > VMware suggestion is just unimaginative and silly. OH! I'm hurt . . . . no, not really. :-) > This is a laptop with minimal resources and after all perl is not > resource hungry or so I here. I figured as much. It was worth a try. > This group was trying to be helpful to the new comer in to programming > and yet no way to start writing a perl script has been yet brought up. > I think way to many things are assumed buy those that have been doing > it everyday for years Well, maybe. Trying to figure out what those assumptions are is hard. But we have been trying. One of the things we assumed from the class perspective is that you're working under linux and that most linuxes come with such things built-in and mostly working. (Certain unpatched Red Hat's sadly excluded.) It would have made the class a lot harder to design if we covered installing perl with any justice. And it would have been a major distraction for most. With HRPM less than 24 hours away, why don't you bring the laptop to the meeting and we'll look at it as a group?!? Two other alternatives come to mind: (1) There is a /Learning Perl for Win32/ O'Reilly book that probably explains installing perl, but I haven't checked to make sure. (2) I am happy to provide a shell account on my user box (wakko.fini.net) if anyone in HRPM wants access to a machine with lots of modules already installed in a recent perl. :-) -- Q: Why did Bill Gates cross the road? A: To avoid the Department of Justice. From mark at mrmark.com Thu Apr 27 22:02:50 2000 From: mark at mrmark.com (Mark D Wolinski) Date: Thu Aug 5 00:08:03 2004 Subject: [HRPM] Web Site Updated Message-ID: The web site has been updated with the information about our next meeting. http://norfolk.pm.org/ This question was raised last night: How many people are on the HRPM mailing list? A. 5 B. 6 C. 12 D. 20 And you have no life lines remaining... The answer is: D - 20 people are currently subscribed to our list. Aren't you glad you had you read this e-mail? Mark W From jduffy at semcor.com Sat Apr 29 23:14:14 2000 From: jduffy at semcor.com (Jeff Duffy) Date: Thu Aug 5 00:08:04 2004 Subject: [HRPM] Re:'My Class' Program Message-ID: <390BB316.794B1B1@semcor.com> Valerie wrote: > I finished correcting my first perl program we reviewed in class today. I > have another problem... the program only works with whole numbers. Can you > give me a hint? How should I proceed? Note how you are generating the average. Nothing wrong with it, but think carefully about what the result of the math will be: $average = $total/4; Let's take a look at your test cases: if($average == 4){ $average = 'A'; }elsif($average==3){ $average = 'B'; }elsif($average==2){ $average ='C'; }elsif($average==1){ $average ='D'; }else {die }; In any case where the average of the grades works out to be a number with a decimal part (i.e. not evenly divisible by 4), none of the test cases match, so it falls through to your default case (the else{} clause). Since the behavior of your default clause is to 'die', the program stops. This calls for a bit of change in your testing logic. What you want is to print a letter grade average based on whether your GPA is _at or above_ a particular score. Try experimenting with the <, >, <=, and >= numeric test operators to make that work. You can also make your debugging easier by having your else{} clause print the value of $average before calling die so you can see what is going on in your decision logic. Give this a shot and let me know if you need assistance finding the answer. Thanks again to Val for giving us code to look at. I'd like everyone else to work on this too, and submit some of their own code for the class' benefit. Jeff -- Jeffrey A. Duffy jduffy@semcor.com perl -e 'print pack"H*","4A6566662C20416E6F74686572205065726C204861636B65720A"'