From mikeraz at patch.com Wed Sep 3 17:45:47 2003 From: mikeraz at patch.com (Michael Rasmussen) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] accessing list elements Message-ID: <20030903224547.GA20883@patch.com> When reading through some code I came across this: my $pic = $files[rand @files]; huh? rand returns a "random fractional number". And lists are accessed through integers. Or not? A simple test case shows that you can access list members with fractional numbers. This is handy, but puzzling behavior. I couldn't find a reference to this in the docs. Is there any explanation to this besides "Perl does what you expect"? -- Michael Rasmussen aka mikeraz Be appropriate && Follow your curiosity http://www.patch.com/ http://wiki.patch.com/ http://wiki.patch.com/index.php/BicycleCommuting The fortune cookie says: Being popular is important. Otherwise people might not like you. From ckuskie at dalsemi.com Wed Sep 3 18:00:21 2003 From: ckuskie at dalsemi.com (Colin Kuskie) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] accessing list elements In-Reply-To: <20030903224547.GA20883@patch.com> References: <20030903224547.GA20883@patch.com> Message-ID: <20030903230021.GB7026@dalsemi.com> On Wed, Sep 03, 2003 at 03:45:47PM -0700, Michael Rasmussen wrote: > When reading through some code I came across this: > > my $pic = $files[rand @files]; > > huh? rand returns a "random fractional number". And lists are > accessed through integers. > > Or not? > > A simple test case shows that you can access list members with > fractional numbers. This is handy, but puzzling behavior. > I couldn't find a reference to this in the docs. Does it round or truncate? Colin From jkeroes at eli.net Wed Sep 3 18:07:46 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] accessing list elements In-Reply-To: <20030903224547.GA20883@patch.com> References: <20030903224547.GA20883@patch.com> Message-ID: <20030903230746.GG9082@eli.net> On (Wed, Sep 03 15:45), Michael Rasmussen wrote: > When reading through some code I came across this: > > my $pic = $files[rand @files]; > > huh? rand returns a "random fractional number". And lists are > accessed through integers. > > Or not? > > A simple test case shows that you can access list members with > fractional numbers. This is handy, but puzzling behavior. > I couldn't find a reference to this in the docs. > > Is there any explanation to this besides "Perl does what you expect"? perl -le '@a=qw/a b c d/; print @a[0.923423,1.23432,2.345,3.87543]' perl -le '@a=qw/a b c d/; for (0..9) { $n = rand(3); print "$n: $a[$n]" }' Apparently, the array lookup implicitly converts the float to an int. Handy! J From merlyn at stonehenge.com Wed Sep 3 19:50:35 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] accessing list elements In-Reply-To: <20030903224547.GA20883@patch.com> References: <20030903224547.GA20883@patch.com> Message-ID: <86u17te5ra.fsf@blue.stonehenge.com> >>>>> "Michael" == Michael Rasmussen writes: Michael> huh? rand returns a "random fractional number". And lists are Michael> accessed through integers. Michael> Or not? Michael> A simple test case shows that you can access list members with Michael> fractional numbers. This is handy, but puzzling behavior. Michael> I couldn't find a reference to this in the docs. We write about it in Learning Perl, for example. Michael> Is there any explanation to this besides "Perl does what you expect"? Oddly enoughy, I though there was a canonical description in "perldata" or something, but I couldn't find one. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From jkeroes at eli.net Mon Sep 8 11:36:11 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] Sept Perl Mongers Meeting - Randal Schwartz Message-ID: <20030908163611.GB27457@eli.net> Randal L. Schwartz - Perl and Databases Weds 10 Sep 2003 - 6:30-8:00 Uban Grind Coffee, 2214 NE Oregon St. >From the man who needs no introduction comes a brand-spanking new talk. Be one of the first people to see Randal's new lecture, "Perl and Databases". Who's this for? - Hopefully you know some Perl - Might know some Perl OO syntax - Probably not familiar with DBI - Probably familiar with typical SQL and database administration Where do you want to go? - History of Perl and databases - Basic layers of DBI and DBD - Higher-level abstractions - Where to go for further information We have a new meeting location: http://www.urbangrindcoffee.com/ . They're wifi-enabled and very cool to boot. Please support this local business on Wedsnesday and in the future - they're staying open past their usual closing time just for us. J. From jeff at vpservices.com Mon Sep 8 12:28:18 2003 From: jeff at vpservices.com (Jeff Zucker) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] Sept Perl Mongers Meeting - Randal Schwartz In-Reply-To: <20030908163611.GB27457@eli.net> References: <20030908163611.GB27457@eli.net> Message-ID: <3F5CBC32.9000603@vpservices.com> Joshua Keroes wrote: >Randal L. Schwartz - Perl and Databases > Very cool! Randal - can I tape record it for possible quotation of bits (with credit natch) in the O'Reilly Cheetah book? :-) All - I am also looking for DBI "success stories", cool hacks, and brief descriptions of people who have contributed to DBI development (anything from modules, to patches, to usenet/listserv/monks help) for inclusion in the book. I am also seeking out examples of "embedded" DBI -- application frameworks like Slash, Mason, Bricolage, BioPerl that can use DBI as middleware to the backend. Please email me or grab me at the meeting. -- Jeff From cdawson at webiphany.com Mon Sep 8 18:25:13 2003 From: cdawson at webiphany.com (Chris Dawson) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] anyone have experience using ircomm with perl? Message-ID: <3F5D0FD9.4080309@webiphany.com> I have tried to write a script which reads/writes to the IrCOMM device /dev/ircomm0. I am getting some strange results, but I have never done anything like this before. I tried this script: #!perl if( open FILE, "/dev/ircomm0" ) { print "Opened the port.\n"; while( ) { print $_ . "\n"; } print "Closed port.\n"; } It has the effect of bouncing back anything I send from the palm application which is sending/receiving data to IR. I have experimented with calling open FILE, "<+/dev/ircomm0" (fails) and open FILE, " References: <3F5D0FD9.4080309@webiphany.com> Message-ID: <20030909002607.GE538@eli.net> Chris, On (Mon, Sep 08 16:25), Chris Dawson wrote: > I have tried to write a script which reads/writes to the IrCOMM device > /dev/ircomm0. I am getting some strange results, but I have never done > anything like this before. My only suggestion about communicating with a serial port is to use either Device::SerialPort or Win32::SerialPort which are both available via the CPAN. > if( open FILE, "/dev/ircomm0" ) { > print "Opened the port.\n"; > while( ) { > print $_ . "\n"; > } > print "Closed port.\n"; > } When open() fails you can find out why by using $!. if (open FILE, '/some/file') { } else { warn "can't open /some/file for reading: $!\n"; } Although it *might* be better to die() when you can't open the file. open FILE, '/some/file' or die "can't open /some/file for reading: $!\n"; HTH, Todd From jkeroes at eli.net Tue Sep 9 12:34:14 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] Sept Perl Mongers Meeting - Randal Schwartz In-Reply-To: <20030908163611.GB27457@eli.net> References: <20030908163611.GB27457@eli.net> Message-ID: <20030909173414.GC28221@eli.net> Randal L. Schwartz - Perl and Databases Wed 10 Sep 2003 - 6:30-8:00 Urban Grind Coffee, 2214 NE Oregon St. => Reminder, this meeting is tomorrow. Info at http://pdx.pm.org/ From jkeroes at eli.net Wed Sep 10 13:42:08 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] Sept Perl Mongers Meeting - Randal Schwartz In-Reply-To: <20030908163611.GB27457@eli.net> References: <20030908163611.GB27457@eli.net> Message-ID: <20030910184208.GD7126@eli.net> The meeting is *tonight*. Randal L. Schwartz - Perl and Databases Weds 10 Sep 2003 - 6:30-8:00 Urban Grind Coffee, 2214 NE Oregon St. Info at http://pdx.pm.org/ From jkeroes at eli.net Thu Sep 11 01:33:03 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] Fwd: O'Reilly UG Program--Learning Lab Discount Message-ID: <20030911063303.GB8874@eli.net> This may be of interest to some of you. J ----- Forwarded message from Marsee Henon ----- From: Marsee Henon Date: Wed, 10 Sep 2003 19:18:29 -0700 (PDT) Subject: O'Reilly UG Program--Learning Lab Discount Special deal alert--we're offering a 50% discount on the Linux/Unix Certification Series from the O'Reilly Learning Lab. With this User Group-only discount, your members can save nearly $1000 on these online courses. And everyone who completes the four-course series earns a University of Illinois System Administration Certificate. This offer ends November 1, 2003. Why Learning Lab? We partnered with Learning Lab two years ago because we felt they'd created the best online learning environment we'd ever seen. Every class includes compelling, hands-on content, root access to a Linux server, an online coach, and a free O'Reilly book. Want to let your members know about this special 50% discount? To enroll for the the Learning Lab Linux/Unix Certification Series go to: http://oreilly.useractive.com/linuxa/ Please use the code ORALL1 We've created a set of web site banners and text announcements that you can use: http://ug.oreilly.com/banners/learninglab/ We hope your members find these courses a convenient, enjoyable way to go 'Back to School.' ----- End forwarded message ----- From dpool at hevanet.com Thu Sep 11 11:09:05 2003 From: dpool at hevanet.com (david pool) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] Fwd: O'Reilly UG Program--Learning Lab Discount References: <20030911063303.GB8874@eli.net> Message-ID: <3F609E21.8080601@hevanet.com> Joshua Keroes wrote: > This may be of interest to some of you. > >And everyone who completes the four-course series earns a > University of Illinois System Administration Certificate. Hey, my alma mater! d From jkeroes at eli.net Thu Sep 11 13:28:46 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] Oct Meeting: Lightning Talks! Message-ID: <20030911182846.GG8874@eli.net> It's time for you to speak back to your local Perl mongers. Tell us what you do. Tell us how you use Perl. Tell us what turns your crank, what warbles your whistle, what intrigues the heck out of you. Show us a thing or two. Lightning Talks are back. You'll have 5 minutes to wax poetic about anything Perl-related. There's more info and a signup page on our wiki: http://pdx.pm.org/kwiki/index.cgi?PortlandPerlMongers Yrs, Joshua PS Of course, I'm happy to help with any half fleshed-out ideas. From poec at yahoo.com Mon Sep 15 15:42:43 2003 From: poec at yahoo.com (Ovid) Date: Mon Aug 2 21:34:24 2004 Subject: [Pdx-pm] Perl Job available in BVTN Message-ID: <20030915204243.31678.qmail@web40412.mail.yahoo.com> If anyone's interested, it looks like there's a job opening in Beaverton. http://www.danga.com/jobs/programmer200309.html Cheers, Curtis ===== Silence is Evil http://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jkeroes at eli.net Thu Sep 18 12:01:42 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Fwd: [Edited] Newsletter from O'Reilly UG Program, September 17 Message-ID: <20030918170142.GS530@eli.net> Selected pdx.pm-ish forwards from the Sep 17 O'Reilly usergroup newsletter (if you want the full email, just ask for it from marsee@oreilly.com) -Joshua ================================================================ O'Reilly News for User Group Members September 17, 2003 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Wireless Hacks -Enterprise Services Architecture ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Louis Rosenfeld, ("Information Architecture for the World Wide Web"), 2003 Dublin Core Conference, Seattle, WA--Sep 28-Oct 2 -Jason Hunter, ("Java Servlet Programming, 2nd Ed" & "Java Enterprise Best Practices"), SDForum Emerging Technology SIG, Palo Alto, CA--Oct 14 ---------------------------------------------------------------- Conferences ---------------------------------------------------------------- -Ends September 24--O'Reilly Emerging Technology Conference Call for Participation -The Second Annual O'Reilly Mac OS X Conference, Santa Clara, CA ---------------------------------------------------------------- Articles ---------------------------------------------------------------- -Single Sign-on for Your Web Applications [with Kerberos] -Ten Tips for Building a Flash Remoting Application ================================================================ ================================================================ Book News ================================================================ ***Wireless Hacks Order Number: 5598 "Wireless Hacks" offers 100 industrial-strength tips about wireless networking, contributed by experts who use the tips every day. Written for intermediate to advanced wireless users, this book is full of direct, practical, ingenious solutions to real-world networking problems. Whether your wireless network needs to extend to the edge of your office or to the other end of town, this collection of non-obvious, "from the field" techniques will show you how to get the job done. http://www.oreilly.com/catalog/wirelesshks/ Sample Hacks are available online: http://www.oreilly.com/catalog/wirelesshks/chapter/index.html ***Enterprise Services Architecture Order Number: 5512 "Enterprise Services Architecture" outlines a disciplined and structured approach to understanding how today's enterprise applications will make use of web services. Aimed at senior management and IT professionals, the book presents a forward-looking architecture that can meet future development challenges with ease and agility. This book was commissioned by SAP, but we're making it available to the general public because we believe the information can help the marketplace come to grips with the architectural revolution that is underway. http://www.oreilly.com/catalog/entservapps/ Chapter 1, "Concepts and Philosophy," is available online: http://www.oreilly.com/catalog/entservapps/chapter/index.html ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Louis Rosenfeld, ("Information Architecture for the World Wide Web"), 2003 Dublin Core Conference, Seattle, WA-- Sep 28-Oct 2 Louis is a featured speaker at the 2003 Dublin Core Conference: Supporting Communities of Discourse and Practice-Metadata Research and Applications. http://dc2003.ischool.washington.edu/index.html Bell Harbor International Conference Center 2211 Alaskan Way, Pier 66 Seattle, WA 98121 http://dc2003.ischool.washington.edu/venue.html ***Jason Hunter, ("Java Servlet Programming, 2nd Ed" & "Java Enterprise Best Practices"), SDForum Emerging Technology SIG, Palo Alto,CA--Oct 14 Jason will be presenting XQuery, a W3C specification for querying XML or anything that can have an XML facade such as a relational database. It has the backing of all the big players including Oracle, IBM, BEA, and Microsoft, and has several open source implementations as well. In this talk you'll learn how to use XQuery, when to use XQuery, and which implementations to trust. For more information, including cost, go to: http://www.sdforum.org/p/calEvent.asp?CID=1188&mo=10&yr=2003 7pm, Tuesday, October 14 Cubberley Community Center 4000 Middlefield Road, Room H-1 Palo Alto, CA ================================================ Conference News ================================================ ***Ends September 24--O'Reilly Emerging Technology Conference Call for Participation Programmers, technologists, researchers, CTOs, CIOs, hackers, and entrepreneurs are invited to submit proposals to lead tutorial and conference sessions at the 3rd Annual O'Reilly Emerging Technology Conference slated for February 9-12, 2004 in San Diego, CA. Suggested topics include: Interfaces and Services, Social Software, Untethered, Location, Hardware, and Business Models, as a start. The submission deadline for proposals is September 24, 2003. http://conferences.oreillynet.com/etcon/?CMP=NLC-W80C43814372 ***The Second Annual O'Reilly Mac OS X Conference, Santa Clara, CA--October 27-30 Tracks this year include Fearless Programming, Scripting Genius, Sys Admin and Networking Mac Style, Media and Publishing, and Emerging Topics. User Group members can use code DSUG to register and receive 20% off conference pricing. To register, go to: http://conferences.oreillynet.com/cs/macosx2003/create/ord_mac03 O'Reilly Mac OS X Conference October 27-30, 2003 Westin Santa Clara, Santa Clara, CA http://conferences.oreilly.com/macosxcon/ ================================================ News From O'Reilly & Beyond ================================================ --------------------- Open Source --------------------- ***Single Sign-on for Your Web Applications [with Kerberos] Jason Garman walks you through the implementation of SPNEGO, which allows for single sign-on of your web applications with Apache and Kerberos. http://www.onlamp.com/pub/a/onlamp/2003/09/11/kerberos.html Jason is the author of "Kerberos: The Definitive Guide." Order Number: 4036 http://www.oreilly.com/catalog/kerberos/ --------------------- Web --------------------- ***Ten Tips for Building a Flash Remoting Application Flash Remoting has not changed much for the release of Flash MX 2004, which is good news for programmers building complex Rich Internet Applications (RIA). Flash Remoting still offers the most flexible, intuitive way to add an application server to an RIA. Tom Muck, author of O'Reilly's upcoming "Flash Remoting: The Definitive Guide," offers ten tips for building a Flash Remoting application that will help programmers deliver the most efficient RIA possible. http://www.oreillynet.com/pub/a/javascript/2003/09/16/flashremoting.html ----- End forwarded message ----- From jkeroes at eli.net Fri Sep 19 13:32:02 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Lightning Talks; Vacation Message-ID: <20030919183202.GD12830@eli.net> Wed 10 Sep 2003 is the next PDX.pm Lightning Talks. Talk about anything Perl-related for 5 minutes. You, yes you; I'm talking to you! If you've never spoken before, consider this an excellent opportunity to bolster the resumé, to learn how to talk in front of a crowd, to show and tell, to entertain your Portland compatriots, to bring up a Perl problem that irritates you, to demonstrate a witty solution to a frustrating problem, to discuss your favorite CPAN modules, to rant about the idiocy of $PERL_FEATURE_NOT_BUG, to talk about your favorite book, to show off your latest evil, evil perl hack, to... ...there are so many things you can talk about. Give it a shot. We have gone down from 3 talks to 2, please add to the list: http://pdx.pm.org/kwiki/ #---------- # Vacation #---------- In other news, after this weekend, I leave for a two week trip to Peru, returning the night before the next meeting. Todd Caine will take the reigns in my stead. If you have any questions about your talk or anything PDX.pm-related, drop Todd an email at tcaine@eli.net . -Joshua From jkeroes at eli.net Fri Sep 19 16:19:44 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Lightning Talks; Vacation In-Reply-To: <20030919183202.GD12830@eli.net> References: <20030919183202.GD12830@eli.net> Message-ID: <20030919211944.GG12830@eli.net> Whoops, the sharp-eyed among you have called bullshit on me. I admit it: I haven't yet figured out how to use Time::Warp and Quantum::Superpos- itions to fashion even the most rudimentary of time machines. In fact, the upcoming meeting isn't on some fictional "Weds 10 Sep 2003" but rather in October. That's right, the next meeting is Weds 10 *Oct* 2003. Sorry for the confusion. -J From jkeroes at eli.net Fri Sep 19 19:40:14 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Lightning Talks; Vacation In-Reply-To: <20030919173501.0ba2e895.randall@sonofhans.net> References: <20030919173501.0ba2e895.randall@sonofhans.net> Message-ID: <20030920004014.GK3854@eli.net> On (Fri, Sep 19 17:35), Randall wrote: > Thus spoke Joshua Keroes > ( Fri, 19 Sep 2003 14:19:44 -0700 ): > > > That's right, the next meeting is Weds 10 *Oct* 2003. Sorry for the > > confusion. > > isn't that a friday? *ducks* I give up. It's the second weds of next month. October 2003 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 I'm pretty sure that's the 8th, but then I've been wrong before. -J From cdawson at webiphany.com Sun Sep 21 12:57:46 2003 From: cdawson at webiphany.com (Chris Dawson) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] to fork or thread... Message-ID: <3F6DE69A.8060405@webiphany.com> Hello, I am trying to write a SOAP client/server program. I want to start another program inside my start() method, and then stop that program using the stop() method. I am unsure as to how I should execute the child program, and then what I should do to stop it. I have been experimenting with fork, but I don't know the proper way to kill the child process. I am happy to use perl 5.8 and the threads module if necessary, but I am not clear on whether I should signal the external application, kill it using it's pid, or what. Any suggestions? This is all happening in a linux environment, so that should simplify things. I have tried writing a script which upon the stop() method, runs a 'killall program_name' but this appears to leave a bunch of zombie processes, which is not optimal. They don't get cleaned/reaped until the program is shutdown completely, and I want to have this running non-stop for a while. I don't think the zombies are an issue and are not consuming resources, but I think there must be a limit to the number of child processes associated with an application, correct? So, briefly this is pseudo-code for what I want to do sub start { $pid = ( exec | fork | new thread | async start ) "program name" return true } sub stop { kill $pid return true } Thanks, Chris From rootbeer at redcat.com Sun Sep 21 13:15:58 2003 From: rootbeer at redcat.com (Tom Phoenix) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] to fork or thread... In-Reply-To: <3F6DE69A.8060405@webiphany.com> References: <3F6DE69A.8060405@webiphany.com> Message-ID: On Sun, 21 Sep 2003, Chris Dawson wrote: > I have been experimenting with fork, but I don't know the proper way to > kill the child process. Many processes terminate on their own, when their input runs out or whatever. If your program can be made to do this, that's almost certainly the best way to go. But if it is going to run until you stop it, keep the pid (returned from fork), and use that to kill the child. Probably like this, if you want it simple: kill 'HUP', $pid; If there's some reason that your process might survive the HUP signal, there are others, like 'INT'. But don't let anyone tell you to use signal 9 before you've tried something simpler. > I have tried writing a script which upon the stop() method, runs a > 'killall program_name' but this appears to leave a bunch of zombie > processes, which is not optimal. The FAQ talks about this; try 'perldoc -q zombies'. > I don't think the zombies are an issue and are not consuming resources, > but I think there must be a limit to the number of child processes > associated with an application, correct? Don't leave dead children lying around. This advice is also useful when you're not programming. Does that take care of what you're looking for? Cheers! --Tom Phoenix From kyle at silverbeach.net Sun Sep 21 14:36:38 2003 From: kyle at silverbeach.net (Kyle Hayes) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] to fork or thread... In-Reply-To: <3F6DE69A.8060405@webiphany.com> References: <3F6DE69A.8060405@webiphany.com> Message-ID: <200309211236.38186.kyle@silverbeach.net> On Sunday 21 September 2003 10:57, Chris Dawson wrote: > Hello, > > I am trying to write a SOAP client/server program. I want to start > another program inside my start() method, and then stop that program > using the stop() method. I am unsure as to how I should execute the > child program, and then what I should do to stop it. I have been > experimenting with fork, but I don't know the proper way to kill the > child process. I am happy to use perl 5.8 and the threads module if > necessary, but I am not clear on whether I should signal the external > application, kill it using it's pid, or what. Any suggestions? This is > all happening in a linux environment, so that should simplify things. I > have tried writing a script which upon the stop() method, runs a > 'killall program_name' but this appears to leave a bunch of zombie > processes, which is not optimal. They don't get cleaned/reaped until > the program is shutdown completely, and I want to have this running > non-stop for a while. I don't think the zombies are an issue and are > not consuming resources, but I think there must be a limit to the number > of child processes associated with an application, correct? Child processes will persist as zombies until the parent process gets the process termination code. So, you need to have a call to waitpid somewhere or that within a SIGCHLD signal handler. I am assuming that you are on some form of Unix-like OS. I have no idea if any of this is useful for Windows. 'perldoc -f waitpid' is your friend. I usually put a waitpid inside a while loop inside the SIGCHLD handler. Seems like overkill, but two or more child processes can die before you get into the SIGCHLD handler so you need to check the return status for all of them. You need to set up a signal handler for SIGCHLD. Be aware that there are some tricky race conditions to having a parent program monitor child programs. I would suggest looking at Net::Server and similar modules. It is harder than you'd think to get this stuff right in a lot of cases. Best, Kyle From dpool at hevanet.com Fri Sep 26 13:00:37 2003 From: dpool at hevanet.com (david pool) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Perl runs on ? OS's Message-ID: <3F747EC5.3040103@hevanet.com> Can anyone come up with an official or semi-official count of operating systems Perl runs on? I'm working on a grant application that rewards interoperability but I've been unable to come up with a count. David Pool From ckuskie at dalsemi.com Fri Sep 26 13:14:25 2003 From: ckuskie at dalsemi.com (Colin Kuskie) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Perl runs on ? OS's In-Reply-To: <3F747EC5.3040103@hevanet.com> References: <3F747EC5.3040103@hevanet.com> Message-ID: <20030926181425.GD23482@dalsemi.com> On Fri, Sep 26, 2003 at 11:00:37AM -0700, david pool wrote: > Can anyone come up with an official or semi-official count of operating > systems Perl runs on? I'm working on a grant application that rewards > interoperability but I've been unable to come up with a count. You could check out Perl's configure script. That may help. Colin From chromatic at wgz.org Fri Sep 26 14:01:28 2003 From: chromatic at wgz.org (chromatic) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Perl runs on ? OS's In-Reply-To: <3F747EC5.3040103@hevanet.com> Message-ID: On Friday, September 26, 2003, at 11:00 AM, david pool wrote: > Can anyone come up with an official or semi-official count of > operating systems Perl runs on? I'm working on a grant application > that rewards interoperability but I've been unable to come up with a > count. Last I remember, it was 70-odd platforms. I've only been able to find Jarkko's slides from OSCON 2002 after 5.8.0 was released: New Platforms: AtheOS Mac OS Classic Mac OS X MinGW NonStop-UX NetWare UTS Regained Platforms: BeOS DYNIX/ptx Mac OS Classic NCR MP-RAS POSIX-BC VM/ESA z/OS (OS/390) Lost Platforms: AmigaOS Throw in at least five free BSDs: FreeBSD, NetBSD, OpenBSD, Darwin, and BSDi, GNU/Linux in all of its incarnations, several Unix variants including Solaris, AIX, and HP-UX, VMS, Cygwin, Windows, Mac OS X, and more obscure platforms such as OS/2, WinCE, and the PlayStation. I've missed a few in that list too. That's 30 so far. -- c From rootbeer at redcat.com Fri Sep 26 14:02:53 2003 From: rootbeer at redcat.com (Tom Phoenix) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Perl runs on ? OS's In-Reply-To: <3F747EC5.3040103@hevanet.com> References: <3F747EC5.3040103@hevanet.com> Message-ID: On Fri, 26 Sep 2003, david pool wrote: > Can anyone come up with an official or semi-official count of operating > systems Perl runs on? It's not even semi-official, but in the Stonehenge introductory Perl classes, we mention that it runs on these systems: Acorn, Amiga, AS400, Atari, BeOS, LynxOS, Mac OS Classic, MS-DOS, Netware, MVS, OS/2, Plan9, Psion, QNX ,VOS, VMS, Windows 95/98/NT/2000 ...and you can sometimes get it to work for you on a Unix machine, like a Cray, Mac OS X, or Linux, too. --Tom Phoenix From dpool at hevanet.com Fri Sep 26 15:23:40 2003 From: dpool at hevanet.com (david pool) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Perl runs on ? OS's References: <3F747EC5.3040103@hevanet.com> Message-ID: <3F74A04C.3020804@hevanet.com> Tom Phoenix wrote: > It's not even semi-official, but in the Stonehenge introductory Perl > classes, we mention that it runs on these systems: > > Acorn, Amiga, AS400, Atari, BeOS, LynxOS, Mac OS Classic, MS-DOS, > Netware, MVS, OS/2, Plan9, Psion, QNX ,VOS, VMS, Windows 95/98/NT/2000 > > ...and you can sometimes get it to work for you on a Unix machine, like a > Cray, Mac OS X, or Linux, too. :-D , That's perfect, thanks Tom! David From dpool at hevanet.com Fri Sep 26 15:28:49 2003 From: dpool at hevanet.com (david pool) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Perl runs on ? OS's References: Message-ID: <3F74A181.9070001@hevanet.com> Very nice. Thanks! d chromatic wrote: > On Friday, September 26, 2003, at 11:00 AM, david pool wrote: > >> Can anyone come up with an official or semi-official count of >> operating systems Perl runs on? I'm working on a grant application >> that rewards interoperability but I've been unable to come up with a >> count. > > > Last I remember, it was 70-odd platforms. I've only been able to find > Jarkko's slides from OSCON 2002 after 5.8.0 was released: > > New Platforms: > > AtheOS > Mac OS Classic > Mac OS X > MinGW > NonStop-UX > NetWare > UTS > > Regained Platforms: > > BeOS > DYNIX/ptx > Mac OS Classic > NCR MP-RAS > POSIX-BC > VM/ESA > z/OS (OS/390) > > Lost Platforms: > AmigaOS > > Throw in at least five free BSDs: FreeBSD, NetBSD, OpenBSD, Darwin, and > BSDi, GNU/Linux in all of its incarnations, several Unix variants > including Solaris, AIX, and HP-UX, VMS, Cygwin, Windows, Mac OS X, and > more obscure platforms such as OS/2, WinCE, and the PlayStation. I've > missed a few in that list too. That's 30 so far. From tcaine at eli.net Mon Sep 29 12:53:43 2003 From: tcaine at eli.net (Todd Caine) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Lightning Talks! Message-ID: <20030929175343.GG28325@eli.net> Hi Folks, The next Portland Perl Mongers meeting is coming up soon! WHAT: pdx.pm Lightning Talks WHEN: Wed 8 Oct 2003 - 6:30-8:00 WHERE: Urban Grind Coffee (http://www.urbangrindcoffee.com/) WHO: http://pdx.pm.org/kwiki/ =*=*=*=*= CALL FOR PARTICIPATION =*=*=*=*= So far we have 4 5-minute talks scheduled. We need more people to give a brief talk (maximum of 5 minutes) about *anything* Perl related. You can sign up to give a Lightning Talk at http://pdx.pm.org/kwiki/. This is your chance to give something back to the group. We promise not to bite! =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* Be sure to mark your calendar. Cheers, Todd From tcaine at eli.net Mon Sep 29 13:45:57 2003 From: tcaine at eli.net (Todd Caine) Date: Mon Aug 2 21:34:25 2004 Subject: [Pdx-pm] Lightning Talks! In-Reply-To: <20030929183104.87922.qmail@web40406.mail.yahoo.com> References: <20030929175343.GG28325@eli.net> <20030929183104.87922.qmail@web40406.mail.yahoo.com> Message-ID: <20030929184557.GJ28325@eli.net> The maximum time allowed for each Lightning Talk will be 8 minutes. Thanks for the correction! Todd On (Mon, Sep 29 11:31), Ovid wrote: > > Just wanted to point out that the home page says "eight minutes". I can shrink mine to five > minutes, that's not a problem, but I don't know if the others are expecting that :) > > --- Todd Caine wrote: > > > > We need more people to give a brief talk (maximum of 5 minutes) about *anything* Perl related.