From george at metaart.org Tue Feb 1 12:21:58 2005 From: george at metaart.org (George Woolley) Date: Tue Feb 1 12:05:12 2005 Subject: [oak perl] Oakland.pm Meeting: Tue. Feb. 8 Message-ID: <200502011221.58705.george@metaart.org> cut & paste from http://www.metaart.org/opug/ .......................... Next meeting * when: Tue. Feb. 8 at 7:30-9:30pm (on 2nd Tuesdays since Dec. 2002) * where: Connie's Cantina 3340 Grand Ave., Oakland CA * directions: [link to] directions and ascii map * theme: wiki * activities: o introductions o giveaways o short talks on the theme and discussion o short talks on other topics + on stupid Perl tricks by Josh Wait + on Python by Stephen Kolupaev o eat Mexican food o ... * who: open to anyone interested. * how much: no fee for our meetings. However, it would be kool if you got something to eat and/or drink. * RSVP: if you want to be sure to have a seat at the Oakland.pm table. From george at metaart.org Tue Feb 1 18:05:03 2005 From: george at metaart.org (George Woolley) Date: Tue Feb 1 17:48:08 2005 Subject: [oak perl] Mailing List Problem - status & thanks Message-ID: <200502011805.03309.george@metaart.org> For three or four days posts to the mailing lists were not being sent on and not being archived. I reported the problem to Perl Mongers in detail and they quickly took action. As far as I can tell, the posts that were stuck have been both sent on and archived. Also, it looks like new posts are being handled correctly. If you notice anything amiss with the mailing list, let me know. Adrien Lamothe, Joshua Wait, Mike Lewis and Sandy Santra supplied useful inputs to my report and/or to my subsequent thinking about the problem. Thanks! George From george at metaart.org Thu Feb 3 13:12:31 2005 From: george at metaart.org (George Woolley) Date: Thu Feb 3 12:55:28 2005 Subject: [oak perl] Meeting RSVPS Message-ID: <200502031312.31100.george@metaart.org> I've gotten feedback from many of you. Thanks. If anyone else wants to be sure to have a place at the table, let me know. From george at metaart.org Thu Feb 3 16:33:37 2005 From: george at metaart.org (George Woolley) Date: Thu Feb 3 16:16:51 2005 Subject: [oak perl] Fwd: Newsletter from O'Reilly UG Program, Feb 3 Message-ID: <200502031633.37490.george@metaart.org> ---------- Forwarded Message ---------- Subject: Newsletter from O'Reilly UG Program, Feb 3 Date: Thursday 03 February 2005 3:19 pm From: Marsee Henon ... ================================================================ O'Reilly News for User Group Members February 3, 2005 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -AppleScript: The Missing Manual -Creating Photomontages with Photoshop: A Designer's Notebook -Internet Annoyances -Google Hacking for Penetration Testers -Home Networking Annoyances -Linux Server Security, 2nd Edition -Buffer Overflow Attacks -Configuring NetScreen Firewalls ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Hadley Stern ("iPod & iTunes Hacks"), Boston Macintosh User Group, Boston, MA--February 9 -Tim O'Reilly, EclipseCon, Burlingame, CA--February 28-March 3 -O'Reilly at PhotoShop World, Las Vegas, NV--March 9 ---------------------------------------------------------------- Conference News ---------------------------------------------------------------- -OSCON Call For Proposals Now Open -Register for the 2005 O'Reilly Emerging Technology Conference, San Diego, CA--March 14-17 -Registration Is Open for the 2005 MySQL Users Conference, Santa Clara, CA--April 18-21 ---------------------------------------------------------------- News ---------------------------------------------------------------- -Hacking Google -Get Your Hands Dirty! -"Make" subscriptions now available -Don't Miss O'Reilly at LinuxWorld, Boston, MA--February 15-17 -Programming eBay Web Services with PHP 5 and Services_Ebay -Freevo: Freedom For Your TV -Michael Stutz On Using Linux For Everyday Activities -Top Ten AppleScript Tips -Output Like a Pro with iPhoto 5 -Fix Hot Spot Annoyances -Working with Roaming User Profiles -IRC Text to Speech with Java -Internals of Java Class Loading -Build Your Own PVR (for Free) with HackTV -Featured Photographer--Ofer Halevi: The Art of Juxtaposition -Learning Lab: Save 40% on Web Programming Certificate Courses -A-Z Web Site Indexes Explained ================================================ Book News ================================================ Did you know you can request a free book to review for your group? Ask your group leader for more information. For book review writing tips and suggestions, go to: http://ug.oreilly.com/bookreviews.html Don't forget, you can receive 20% off any O'Reilly, No Starch, Paraglyph, Pragmatic Bookshelf, SitePoint, or Syngress book you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. http://www.oreilly.com/ ***Free ground shipping is available for online orders of at least $29.95 that go to a single U.S. address. This offer applies to U.S. delivery addresses in the 50 states and Puerto Rico. For more details, go to: http://www.oreilly.com/news/freeshipping_0703.html ---------------------------------------------------------------- New Releases ---------------------------------------------------------------- ***AppleScript: The Missing Manual Publisher: O'Reilly ISBN: 0596008503 Macintosh's ultimate scripting tool, AppleScript, has one major shortcoming: it comes without a manual. This Missing Manual fills the void. While its hands-on approach, with dozens of scripting examples, certainly keeps novices from feeling intimidated, this book is also suited for professionals from system administrators to musicians, ensuring that anyone can learn how to control Mac applications in timesaving and innovative ways. http://www.oreilly.com/catalog/applescripttmm/index.html Chapter 5, "Controlling Files," is available online: http://www.oreilly.com/catalog/applescripttmm/chapter/index.html ***Creating Photomontages with Photoshop: A Designer's Notebook Publisher: O'Reilly ISBN: 0596008589 This collection of groundbreaking digital creations by well-known French artists is a visual smorgasbord for digital imaging professionals, graphic artists, photographers, and anyone involved in the creation of digital images and animations. But it's more than a full-color feast for the eyes: reflecting the very best of French graphic design, it guides Photoshop users through all aspects of the photomontage creation process, from initial concept through step-by-step execution. http://www.oreilly.com/catalog/photoshopadn/ ***Internet Annoyances Publisher: O'Reilly ISBN: 0596007353 Recognizing the universal nature of the Net, "Internet Annoyances" strives to make using the internet as stress-free as possible for everyone. This insightful guide effectively addresses and presents solutions for the many glitches that still complicate the internet experience. You'll learn how to thwart would-be hackers, ensure greater security while surfing, eliminate pop-up ads, maximize online services, conduct effective searches, and much more. Chapter 8, "Searching Annoyances," is available online: http://www.oreilly.com/catalog/internetannoy/chapter/index.html ***Google Hacking for Penetration Testers Publisher: Syngress ISBN: 1931836361 "Google Hacking for Penetration Testers" explores the explosive growth of a technique known as "Google Hacking." This simple tool can be bent by hackers and those with malicious intent to find hidden information, break into sites, and access supposedly secure information. Borrowing the techniques pioneered by malicious "Google hackers," this book aims to show security practitioners how to properly protect clients from this often overlooked and dangerous form of information leakage. http://www.oreilly.com/catalog/1931836361/index.html ***Home Networking Annoyances Publisher: O'Reilly ISBN: 0596008082 Need a cure for the headaches associated with running a home network? This book tackles all the common annoyances your network dishes up, whether it's wired or wireless, Mac or PC. With a friendly, off-the-cuff approach, this book guides you safely through common home networking glitches, including file sharing, printing, security, and more. Take a stand against annoyances now: this book is your ticket to serenity. http://www.oreilly.com/catalog/homenetannoy/ Chapter 4, "File-Sharing Annoyances," is available online: http://www.oreilly.com/catalog/homenetannoy/chapter/index.html ***Linux Server Security, 2nd Edition Publisher: O'Reilly ISBN: 0596006705 "Linux Server Security, 2nd Edition" expertly conveys to administrators and developers the tricks of the trade that can help them avoid serious security breaches. The book covers both background theory and practical, step-by-step instructions for protecting a server that runs Linux. Geared toward Linux users with little security expertise, the author explains security concepts and techniques in clear language, beginning with the fundamentals. Stay one step ahead of potential adversaries. http://www.oreilly.com/catalog/linuxss2/ Chapter 12, "System Log Management and Monitoring," is available online: http://www.oreilly.com/catalog/linuxss2/chapter/index.html ***Buffer Overflow Attacks Publisher: Syngress ISBN: 1932266674 The SANS Institute maintains a list of the "Top 10 Software Vulnerabilities." Currently, over half of these vulnerabilities are exploitable by buffer overflow attacks, which allow an attacker to run arbitrary code on a victim's machine. This is the first book specifically aimed at detecting, exploiting, and preventing the most common and dangerous attacks. It provides specific, real code examples on exploiting buffer overflow attacks from a hacker's perspective, and on defending against these attacks for the software developer. http://www.oreilly.com/catalog/1932266674/ ***Configuring NetScreen Firewalls Publisher: Syngress ISBN: 1932266399 "Configuring NetScreen Firewalls" delivers an in-depth look at the NetScreen firewall product line. It covers all of the aspects of the NetScreen product line from the SOHO devices to the Enterprise NetScreen firewalls. Advanced troubleshooting techniques and the NetScreen Security Manager are also covered. http://www.oreilly.com/catalog/1932266399/index.html ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Hadley Stern ("iPod & iTunes Hacks"), Boston Macintosh User Group, Boston, MA--February 9 Come join this O'Reilly author to find out all the cool things that you can do with your iPod! Boston Macintosh User Group MIT Building E51 Room 315 Cambridge, MA http://www.bmac.org/meetings.html ***Tim O'Reilly, EclipseCon, Burlingame, CA--February 28-March 3 Tim is a keynote speaker at this event. http://www.eclipsecon.org/2005/index.htm ***O'Reilly at PhotoShop World, Las Vegas, NV--March 9 Come by and say hi and check out our latest Digital Media books at our booth (#220). Mandalay Bay Resort, Las Vegas, NV http://www.photoshopworld.com/ ================================================ Conference News ================================================ ***OSCON Call For Proposals Now Open Circle August 1-5 on your calendar and join us at the O'Reilly Open Source Convention in beautiful Portland, Oregon. OSCON 2005 will be at the Oregon Convention Center, where we'll have tutorials, sessions, parties, BOFs, and a huge exhibit hall. http://conferences.oreillynet.com/os2005/ The call for participation is open, and you're invited to submit a proposal to lead tutorials and sessions. Visit the submissions page for all the details on tracks and proposal guidelines. Proposals are due no later than February 13, 2005. http://conferences.oreillynet.com/cs/os2005/create/e_sess ***2005 O'Reilly Emerging Technology Conference, San Diego, CA--March 14-17 This year's conference theme is "Remix," which infuses ETech's roll-up-your-sleeves tutorials, to-the-point plenary presentations, and real world focused breakout sessions. Come to ETech and discover how applications and hardware are being deconstructed and recombined in unexpected ways. Learn how users and customers are influencing new interfaces, devices, business models, and services. For all the scoop on tutorials, featured speakers, and conference events, check out: http://conferences.oreillynet.com/etech/ Hurry up before it sells out! User Group members use code DSUG when you register, and receive 20% off the registration price. To register for the conference, go to: http://conferences.oreillynet.com/cs/et2005/create/ord_et05 ***Register for the 2005 MySQL Users Conference, Santa Clara, CA--April 18-21 The MySQL Users Conference, co-presented by O'Reilly Media and MySQL AB, brings together experts, users, and industry leaders with unique MySQL insights, offering attendees a detailed look into new features in MySQL 5.0, sessions and workshops designed to teach best practices, and exposure to new open source technologies. For more information, go to: http://www.mysqluc.com/ User Group members who register before Febuary 28, 2005 get a double discount. Use code DSUG when you register, and receive 20% off the early registration price. To register for the conference, go to: http://conferences.oreillynet.com/cs/mysqluc2005/create/ord_mysql05 ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***Hacking Google With access to more than three million documents in over 30 languages, Google is a researcher's dream. But like any invaluable tool, knowing the insider tricks of the trade is a must to save time and needless effort. Tara Calishain and Rael Dornfest, authors of "Google Hacks, 2nd Edition," have set out to educate the masses to the ins and outs of Google. In today's excerpt, they offer the inside scoop on scattersearching, cartography, Google on the go, Gmail-lite, and AdSense. With over 150 million Google searches conducted every day, why be just a number? http://www.oreillynet.com/pub/a/network/excerpt/ggl_hcks/index.html ***Get Your Hands Dirty! Hackers of all stripes refuse to just take what they???re given. They???re driven to remake it, and getting there is more than half the fun. Here at O'Reilly, we've got the information you need to hack, remix, and master technology at home and at work. In this letter for our Winter 2005 Catalog, Tim O'Reilly talks about how we're celebrating the hacker impulse. http://tim.oreilly.com/articles/dirtyhands_0105.html You'll find all of Tim's collected writings and speeches at: http://tim.oreilly.com/ ***"Make" subscriptions now available The annual subscription price for four issues is $34.95. When you subscribe with this link, you'll get a free issue--the first one plus four more for $34.95. So subscribe for yourself or friends with this great offer for charter subscribers: five volumes for the cost of four. Subscribe at: https://www.pubservice.com/MK/Subnew.aspx?PC=MK&PK=M5ZUGLA --------------------- Open Source --------------------- ***Don't Miss O'Reilly at LinuxWorld, Boston, MA--Feb 15-17 Stop by our booth (#509) to check out our latest Linux and open source titles and listen to our authors including Jonathan Corbet ("Linux Device Drivers, 3rd Ed."), Kyle D. Dent ("Postfix: The Definitive Guide"), Jay Beale ("Snort 2.1 Intrusion Detection, 2nd Ed."), Sam Hiser and Tom Adelstein ("Exploring the JDS Linux Desktop"), and Adam Trachtenberg ("PHP Cookbook"). We will have daily demonstrations on our new magazine "Make" and SafariU (http://academic.oreilly.com/safariu-more.csp). Here is our schedule of events: http://www.oreilly.com/examples/oreilly/ug/linuxworld_speaker_sched.pdf ***Programming eBay Web Services with PHP 5 and Services_Ebay PHP 5 added several new features to the language, yet laundry lists and high-level overviews don't really show what they are or why you might use them. Fortunately, Adam Trachtenberg writes for us. Here's how to use the new features of PHP 5 for writing web services clients. http://www.onlamp.com/pub/a/php/2005/01/27/ebay_webservices.html ***Freevo: Freedom For Your TV PVRs may be the next big thing in home entertainment, but relying on a closed box leaves you few options for customization. The Freevo project is building a platform for developing television-aware applications, whether recording, timeshifting, or general-purpose mayhem. Howard Wen explains the Freevo project and interviews its developers. http://www.linuxdevcenter.com/pub/a/linux/2005/01/27/freevo.html ***Michael Stutz On Using Linux For Everyday Activities Michael Stutz, author of "The Linux Cookbook, 2nd Edition" (No Starch) discusses what inspired him to write this book, when he first started using Linux, and other world views in this LinuxWorld interview. http://www.linuxworld.com/story/47810.htm?DE=1 --------------------- Mac --------------------- ***Top Ten AppleScript Tips AppleScript lets you control Microsoft Word, Adobe Photoshop, FileMaker Pro, and hundreds of other Mac programs with just a few lines of code. But if you think of AppleScript as just a nerdy workflow-automation tool, you're missing out on a lot of power. Truth is, AppleScript has lots of hidden tricks and timesavers built in--and they all come for free with your Mac. Adam Goldstein, author of "AppleScript: The Missing Manual," has hand selected ten of the most useful tips for making AppleScript work for you. http://www.macdevcenter.com/pub/a/mac/2005/02/01/applscrpt_mm.html ***Output Like a Pro with iPhoto 5 Earlier, Derrick Story discussed how iPhoto 5's RAW capability lets you input like a pro. But some of its new output features are quite sophisticated. Here Derrick takes a look at how to create sophisticated slideshows and QuickTime downloads using only iPhoto 5. http://www.macdevcenter.com/pub/a/mac/2005/02/01/iphoto.html --------------------- Windows/.NET --------------------- ***Fix Hot Spot Annoyances Using a Wi-Fi hot spot is a great way to stay connected when you're away from home or the office. But beware: you may be vulnerable to snoopers; you may be unable to send email; and your connection may flake out. Preston Gralla, author of "Internet Annoyances," fixes all your hot spot woes. http://www.windowsdevcenter.com/pub/a/windows/2005/02/01/hot_spot.html ***Working with Roaming User Profiles If you have a highly mobile local user base and are constantly fielding concerns about personalized settings and desktop customizations that don't seem to travel with your users, then roaming user profiles may make your life a lot easier. In this article, Jonathan Hassell, author of "Learning Windows Server 2003," explains how roaming user profiles can save you time and energy. http://www.windowsdevcenter.com/pub/a/windows/2005/02/01/rmng_usr.html --------------------- Java --------------------- ***IRC Text to Speech with Java Paul Mutton creates a multi-platform IRC bot that uses the FreeTTS Java speech synthesizer library to convert IRC messages into audible speech. Why would you want to use an IRC text-to-speech system? By reading out messages as they arrive, you can keep working, diverting your attention to IRC only when necessary. Paul is the author of "IRC Hacks." http://www.onjava.com/pub/a/onjava/2004/09/08/IRCinJava.html ***Internals of Java Class Loading When are two classes not the same? When they're loaded by different class loaders. This is just one of many curious side effects of Java's class-loading system. Binildas Christudas shows how different class loaders relate to one another and how (and why) to build your own custom class loader. http://www.onjava.com/pub/a/onjava/2005/01/26/classloading.html --------------------- Digital Media --------------------- ***Build Your Own PVR (for Free) with HackTV HackTV is a developer app for Mac OS X that you can download for free. It enables you to watch TV (or any video source) on your Mac. Better yet, it enables you to download that content to your hard drive. Erica Sadun shows you the ins and outs of HackTV. http://digitalmedia.oreilly.com/2005/01/26/hacktv.html ***Featured Photographer--Ofer Halevi: The Art of Juxtaposition Whether it's a man standing beside a mannequin in Amsterdam, or a poster of Rabin staring up at a passerby in Israel, Ofer Halevi has an eye for recording the juxtaposition of people and their inanimate environment. In this portfolio you can experience Ofer's passion for detail, interaction, and patterns. http://digitalmedia.oreilly.com/2005/01/12/featured.html --------------------- Web --------------------- ***Learning Lab: Save 40% on Web Programming Certificate Courses This six-course series from the O'Reilly Learning Lab teaches you the skills needed for web programming, web administration, and website development. You'll learn HTML, JavaScript, XML, SQL, Perl, and Unix. Upon completion of the series, students receive a Certificate of Professional Development from the University of Illinois Office of Continuing Education. Sign up by February 22nd, and save 40% on all Web Programming Certificate courses. http://www.oreilly.com/redirector.csp?link=UAWeb&type=news ***A-Z Web Site Indexes Explained A-Z Indexes are a far more accurate than search engines for searching the content of a web site or intranet. For the value they can bring to a site, A-Z indexes are worth the additional cost, but, if you decide to add an index to your site, it's important to find the right person to do the job. http://www.sitepoint.com/article/a-z-indexes ================================================ From Your Peers =============================================== Don't forget to check out the O'Reilly UG wiki to see what user groups across the globe are up to: http://wiki.oreillynet.com/usergroups/index.cgi Until next time-- Marsee ------------------------------------------------------- From santranyc at yahoo.com Fri Feb 4 04:25:54 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Fri Feb 4 04:23:42 2005 Subject: [oak perl] still clueless about "my" Message-ID: Thanks for looking at my code and offering those great suggestion and insights, Belden. All great stuff--some of it I'm already using, some of it I'm studying. But you know, I'm still clueless about using the "my" operator for purposes of scoping. I've studied the definition and the examples and it's all very confusing. *Your* example makes total sense: > > foreach my $file ( glob '*' ) { > my $newfile = $file ; > } because you put the "my" definition within the If statement. But so often in code I see quoted, the "my" statement is put at the very beginning of the quoted code, before the "if" (or sub or while or whatever) statement even starts--so how can that "my" delcaration scope to something? Here's an example: my $princess = "I dream of Jill."; if ($princess =~ /ill\b/) { print "Jill might be ill.\n"; } Now what if this If statement was followed by 6 other If statements... Does some sort of invisible tether link the "my" declaration in the beginning to *only* the very first If statement? Here's another example: my $bedrock = 42; $bedrock++; How and what is the "my" declaration scoping in this example? (This one makes me want to tear my hair out.) If this piece of code was dropped into a huge piece of code, I don't understand how it would scope the definition of $bedrock to anything. This "my" scoping confusion I have is frustrating because I know that scoping is very important. "my" is used in almost every piece of code I read in Perl forums and instruction manuals. But half the time the "my" declaration is in the middle of nowhere, and I can't fathom why it's there or what it's affecting. Boy, I need help with this. Alright, I'm going to eat some worms now. Back to the camel book. --Sandy From blyman at iii.com Fri Feb 4 09:34:16 2005 From: blyman at iii.com (Belden Lyman) Date: Fri Feb 4 09:33:53 2005 Subject: [oak perl] still clueless about "my" In-Reply-To: <20050204122342.7CC4017770@x6.develooper.com> References: <20050204122342.7CC4017770@x6.develooper.com> Message-ID: <1107538455.7150.93.camel@ls104> Hi Sandy, On Fri, 2005-02-04 at 04:25, Sandy Santra wrote: > But you know, I'm still clueless about using the "my" operator > for purposes of scoping. I've studied the definition and > the examples and it's all very confusing. > > *Your* example makes total sense: > > > > > foreach my $file ( glob '*' ) { > > my $newfile = $file ; > > } > My guess is this makes sense to you because you understand the "lifespans" of $file and $newfile within your code. You know where the variables need to exist, and know when the code no longer needs them. > because you put the "my" definition within the If statement. > But so often in code I see quoted, the "my" statement is > put at the very beginning of the quoted code, before the > "if" (or sub or while or whatever) statement even starts--so > how can that "my" delcaration scope to something? It's possible that you've come across some bad code examples- many people, when told to use strict and warnings, "fix" the 'Global symbol' errors by just putting a huge variable declaration at the top of their program. It's also possible that you've come across some code which is doing some tricky things. > Here's an example: > > my $princess = "I dream of Jill."; > if ($princess =~ /ill\b/) { > print "Jill might be ill.\n"; > } > > Now what if this If statement was followed by 6 other If > statements... Does some sort of invisible tether link the > "my" declaration in the beginning to *only* the very first > If statement? > Nope. $princess is available to all the other code within the same scope as $princess. This sounds like a circular definition, so I'll explain a little. Say your program looks like this: 1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 my $princess = 'I dream of Jill.'; 7 8 if ( $princess =~ /ill\b/ ) { 9 might_be_ill(); 10 } 11 12 if ( $princess =~ /ream/ ) { 13 say_ice_cream( $princess ); 14 } 15 16 sub might_be_ill { 17 print "entered might_be_ill()\n"; 18 print "$princess\n"; 19 print "Oh no! She might be ill!\n\n"; 20 } 21 22 sub say_ice_cream { 23 my $p = shift @_; 24 print "entered say_ice_cream()\n"; 25 print "\$p is $p\n"; 26 print "\$princess is $princess\n"; 27 print "did you say ice cream?\n" ; 28 } 29 __END__ entered might_be_ill() I dream of Jill. Oh no! She might be ill! entered say_ice_cream() $p is I dream of Jill. $princess is I dream of Jill. did you say ice cream? Notice that even though $princess isn't passed in to might_be_ill(), that subroutine is still able to see $princess. Play around with might_be_ill() - change $princess and see what happens. And notice also that say_ice_cream() has a private copy of $princess, but is still able to access $princess. Think of '{' as saying, "I am the start of a new scope". And think of '}' as saying, "I am the end of the scope." When you create a 'my'-ed variable, then it can be seen by any code that gets run afterwards in the same scope. { # perl code here } is often referred to as a BLOCK - you'll see this in 'perldoc perlfunc'. Knowing this, you can re-write the above code to make $princess available only to the first IF block. Change lines 6 through 10 to look like this: { # start a new scope my $princess = 'I dream of Jill.' ; if ( $princess =~ /ill\b/ ) { might_be_ill() ; } } # end the scope - $princess disappears and then run the program again. You'll get scoping errors, since we try to use $princess outside its scope. > Here's another example: > > my $bedrock = 42; > $bedrock++; > > How and what is the "my" declaration scoping in this example? > (This one makes me want to tear my hair out.) If this > piece of code was dropped into a huge piece of code, I don't > understand how it would scope the definition of $bedrock > to anything. $bedrock will be limited to the BLOCK of code it's scoped to. If you see a '{' and '}' before and after $bedrock, then chances are good that those define its scope. I say "chances are good" because there are some exceptions. For example, these things *look* like code blocks, but are not. $var =~ s{foo}{bar}g ; # same as $var =~ s/foo/bar/g $var =~ m{foo} ; # same as $var =~ /foo/ ; $var = q{hello world}; # $var = 'hello world'; $var = qq{hello world\n}; # $var = "hello world\n"; @ary = qw{hello world}; # @ary = split /\s/, 'hello world'; On the other hand, you might be dealing with a variable like in the $princess example above- one which is effectively scoped to everything that gets run after the declaration. > > This "my" scoping confusion I have is frustrating because > I know that scoping is very important. "my" is used in > almost every piece of code I read in Perl forums and instruction > manuals. But half the time the "my" declaration is in the > middle of nowhere, and I can't fathom why it's there or > what it's affecting. Boy, I need help with this. > For more than you want to know about scoping, check out MJD's "coping with scoping" article on http://perl.plover.com at http://perl.plover.com/FAQs/Namespaces.html Some of this will go over your head, but it's worth trying to understand. Re-read that article in 6 months: it'll make more sense. Belden From sfink at reactrix.com Fri Feb 4 10:01:50 2005 From: sfink at reactrix.com (Steve Fink) Date: Fri Feb 4 10:02:05 2005 Subject: [oak perl] still clueless about "my" In-Reply-To: <20050204122342.7CC4017770@x6.develooper.com> References: <20050204122342.7CC4017770@x6.develooper.com> Message-ID: <4203B88E.7040509@reactrix.com> Sandy Santra wrote: >> foreach my $file ( glob '*' ) { >> my $newfile = $file ; >> } > > > because you put the "my" definition within the If statement. A 'my' used with a 'for' or 'foreach' is a little bit of an exception to the a-scope-is-enclosed-in-curly-brackets rule. use strict; for my $x (1..2) { print "x=$x\n"; } print $x; is a syntax error because 'for my $...' actually puts the scope of the variable within the for loop's curlies. (This isn't just 'for'; do 'perldoc perlsub' and read the "Private Variables via my()" section for the full details.) And it's worse than that. If you "fix" the above example by saying use strict; my $x; for $x (1..2) { print "x=$x\n"; } print "x is now $x\n"; then in terms of scoping, everything is correct. But (I'm just mentioning this because it's easy to encounter while you're trying out examples) it will print x=1 x=2 x is now That last line will give a "Use of uninitialized value" warning if you run with warnings on. This actually doesn't have that much to do with scoping. It's another magical thing about 'for/foreach'. They implicitly do a 'local $x' on their $x iterator variable. So even though you're talking about the same my'd $x inside and outside the for, the value is reset to what it was before the 'for'. Try this: use strict; my $x = 'smurf hair'; for $x (1..2) { print "x=$x\n"; } print "x is now $x\n"; > Alright, I'm going to eat some worms now. The red wiggly ones have a stronger taste but more nutrition. I would recommend sticking to nightcrawlers when you're not completely confused, and only go for a handful of those red guys if you get entirely lost. From blyman at iii.com Fri Feb 4 13:33:47 2005 From: blyman at iii.com (Belden Lyman) Date: Fri Feb 4 13:33:16 2005 Subject: [oak perl] Good perl examples on the web Message-ID: <1107552827.7150.106.camel@ls104> For anyone who needs some good perl examples to look at and learn from, take a peek at Randal Schwartz's columns at http://www.stonehenge.com/merlyn/columns.html Does anyone know any other websites that consistently have good perl code? Belden From david at fetter.org Fri Feb 4 13:49:06 2005 From: david at fetter.org (David Fetter) Date: Fri Feb 4 13:49:18 2005 Subject: [oak perl] Good perl examples on the web In-Reply-To: <1107552827.7150.106.camel@ls104> References: <1107552827.7150.106.camel@ls104> Message-ID: <20050204214906.GB2132@fetter.org> On Fri, Feb 04, 2005 at 01:33:47PM -0800, Belden Lyman wrote: > > For anyone who needs some good perl examples to look at and learn > from, take a peek at Randal Schwartz's columns at > http://www.stonehenge.com/merlyn/columns.html > > Does anyone know any other websites that consistently have good perl > code? Nope, but I've got a way to vet them. If you find a site with perl code on it, hie it hither before getting too deep into it. :) Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From blyman at iii.com Fri Feb 4 14:45:34 2005 From: blyman at iii.com (Belden Lyman) Date: Fri Feb 4 14:45:05 2005 Subject: [oak perl] Good perl examples on the web In-Reply-To: <20050204214906.GB2132@fetter.org> References: <1107552827.7150.106.camel@ls104> <20050204214906.GB2132@fetter.org> Message-ID: <1107557134.7150.108.camel@ls104> On Fri, 2005-02-04 at 13:49, David Fetter wrote: > On Fri, Feb 04, 2005 at 01:33:47PM -0800, Belden Lyman wrote: > > > > For anyone who needs some good perl examples to look at and learn > > from, take a peek at Randal Schwartz's columns at > > http://www.stonehenge.com/merlyn/columns.html > > > > Does anyone know any other websites that consistently have good perl > > code? > > Nope, but I've got a way to vet them. If you find a site with perl > code on it, hie it hither before getting too deep into it. :) How do you vet? run using Safe, or eyeball the code? Belden, curious From david at fetter.org Fri Feb 4 14:54:55 2005 From: david at fetter.org (David Fetter) Date: Fri Feb 4 14:55:06 2005 Subject: [oak perl] Good perl examples on the web In-Reply-To: <1107557134.7150.108.camel@ls104> References: <1107552827.7150.106.camel@ls104> <20050204214906.GB2132@fetter.org> <1107557134.7150.108.camel@ls104> Message-ID: <20050204225455.GD2132@fetter.org> On Fri, Feb 04, 2005 at 02:45:34PM -0800, Belden Lyman wrote: > On Fri, 2005-02-04 at 13:49, David Fetter wrote: > > On Fri, Feb 04, 2005 at 01:33:47PM -0800, Belden Lyman wrote: > > > > > > For anyone who needs some good perl examples to look at and > > > learn from, take a peek at Randal Schwartz's columns at > > > http://www.stonehenge.com/merlyn/columns.html > > > > > > Does anyone know any other websites that consistently have good > > > perl code? > > > > Nope, but I've got a way to vet them. If you find a site with > > perl code on it, hie it hither before getting too deep into it. :) > > How do you vet? run using Safe, or eyeball the code? TMTOWTDI. :) Putting the code in front of a bunch of people, each of whom has experience & different ways of assessing it would be the "meta-way." For example, Matt's Script Archive and its spawn have a certain stench to them. Then there's checking whether it's "strict clean," "warnings clean," etc. Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From kester at gmail.com Fri Feb 4 15:06:19 2005 From: kester at gmail.com (Kester Allen) Date: Fri Feb 4 15:06:27 2005 Subject: [oak perl] still clueless about "my" In-Reply-To: <4203B88E.7040509@reactrix.com> References: <20050204122342.7CC4017770@x6.develooper.com> <4203B88E.7040509@reactrix.com> Message-ID: <55adb319050204150646dbfcc7@mail.gmail.com> To add my $.01 to the excellent advice already offered, using "my" and strict will protect commonly-named variables. Suppose you have two variables named "$factor", one in the main body, and one in a subroutine, like this: use strict; my ( $a_number, $factor ) = ( 10, 11 ); $a_number = double_this ( $a_number ); print "$a_number $factor\n"; sub double_this { my ( $a_number ) = @_; my $factor = 2.0; return $factor * $a_number; } This'll print "20, 11", as expected. The $factor in the subroutine is a different variable, limited to the sub's scope, and changing it doesn't affect the $factor in the main body. But, if you're not using "my" and strict, you'll get trouble when you reassign $factor: ( $a_number, $factor ) = ( 10, 11 ); $a_number = double_this ( $a_number ); print "$a_number $factor\n"; sub double_this { ( $a_number ) = @_; $factor = 2.0; return $factor * $a_number; } This'll print "20 2", almost certainly not what you wanted. Now, this is certainly a cooked-up example, but it's suprisingly easy to run into it in real life. --Kester From blyman at iii.com Fri Feb 4 15:12:42 2005 From: blyman at iii.com (Belden Lyman) Date: Fri Feb 4 15:12:15 2005 Subject: [oak perl] Good perl examples on the web In-Reply-To: <20050204225455.GD2132@fetter.org> References: <1107552827.7150.106.camel@ls104> <20050204214906.GB2132@fetter.org> <1107557134.7150.108.camel@ls104> <20050204225455.GD2132@fetter.org> Message-ID: <1107558762.7150.113.camel@ls104> On Fri, 2005-02-04 at 14:54, David Fetter wrote: > On Fri, Feb 04, 2005 at 02:45:34PM -0800, Belden Lyman wrote: > > On Fri, 2005-02-04 at 13:49, David Fetter wrote: > > > On Fri, Feb 04, 2005 at 01:33:47PM -0800, Belden Lyman wrote: > > > > > > > > For anyone who needs some good perl examples to look at and > > > > learn from, take a peek at Randal Schwartz's columns at > > > > http://www.stonehenge.com/merlyn/columns.html > > > > > > > > Does anyone know any other websites that consistently have good > > > > perl code? > > > > > > Nope, but I've got a way to vet them. If you find a site with > > > perl code on it, hie it hither before getting too deep into it. :) > > > > How do you vet? run using Safe, or eyeball the code? > > For example, Matt's Script Archive and its spawn have a certain stench > to them. Yes and yes. NMS is a good alternative to the historic MSA scripts. http://nms-cgi.sourceforge.net/ istr reading that even MSA recommends using NMS, and Matt has taken to re-writing some of his old scripts. Still. It's out there. > Then there's checking whether it's "strict clean," "warnings > clean," etc. > It's the "etc." that I'm particularly interested in... I'll wait for your first review. > Cheers, Indeed, oakland.pm is overdue for a beer drink. Belden, really should do something about that-^ From david at fetter.org Fri Feb 4 15:22:51 2005 From: david at fetter.org (David Fetter) Date: Fri Feb 4 15:23:08 2005 Subject: [oak perl] Good perl examples on the web In-Reply-To: <1107558762.7150.113.camel@ls104> References: <1107552827.7150.106.camel@ls104> <20050204214906.GB2132@fetter.org> <1107557134.7150.108.camel@ls104> <20050204225455.GD2132@fetter.org> <1107558762.7150.113.camel@ls104> Message-ID: <20050204232251.GE2132@fetter.org> On Fri, Feb 04, 2005 at 03:12:42PM -0800, Belden Lyman wrote: > On Fri, 2005-02-04 at 14:54, David Fetter wrote: > > On Fri, Feb 04, 2005 at 02:45:34PM -0800, Belden Lyman wrote: > > > On Fri, 2005-02-04 at 13:49, David Fetter wrote: > > > > On Fri, Feb 04, 2005 at 01:33:47PM -0800, Belden Lyman wrote: > > > > > > > > > > For anyone who needs some good perl examples to look at and > > > > > learn from, take a peek at Randal Schwartz's columns at > > > > > http://www.stonehenge.com/merlyn/columns.html > > > > > > > > > > Does anyone know any other websites that consistently have > > > > > good perl code? > > > > > > > > Nope, but I've got a way to vet them. If you find a site with > > > > perl code on it, hie it hither before getting too deep into > > > > it. :) > > > > > > How do you vet? run using Safe, or eyeball the code? > > > For example, Matt's Script Archive and its spawn have a certain > > stench to them. > > Yes and yes. NMS is a good alternative to the historic MSA scripts. > http://nms-cgi.sourceforge.net/ istr reading that even MSA > recommends using NMS, and Matt has taken to re-writing some of his > old scripts. > > Still. It's out there. > > > Then there's checking whether it's "strict clean," "warnings > > clean," etc. > > > > It's the "etc." that I'm particularly interested in... I'll wait for > your first review. If "etc." were an algorithmic, or even a heuristic process for me, I would already have described it. The sight of poor code can be like the sound of fingernails on a chalkboard or the smell of rotting meat. IOW, the reaction happens in well under a second through no (conscious) rational process. Sometimes after that, it's possible, although not necessarily helpful, to go backwards and construct some logical reason for the reaction. > > Cheers, > > Indeed, oakland.pm is overdue for a beer drink. > Belden, really should do something about that-^ Hey, Casa Donde has always been available for meetings. Beer is always available there. Jupiter in Berkeley is OK, but a little noisy. Cheers, D (hic!) -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From blyman at iii.com Fri Feb 4 15:33:53 2005 From: blyman at iii.com (Belden Lyman) Date: Fri Feb 4 15:33:25 2005 Subject: [oak perl] Good perl examples on the web In-Reply-To: <20050204232251.GE2132@fetter.org> References: <1107552827.7150.106.camel@ls104> <20050204214906.GB2132@fetter.org> <1107557134.7150.108.camel@ls104> <20050204225455.GD2132@fetter.org> <1107558762.7150.113.camel@ls104> <20050204232251.GE2132@fetter.org> Message-ID: <1107560033.7150.118.camel@ls104> On Fri, 2005-02-04 at 15:22, David Fetter wrote: > If "etc." were an algorithmic, or even a heuristic process for me, I > would already have described it. The sight of poor code can be like > the sound of fingernails on a chalkboard or the smell of rotting meat. > IOW, the reaction happens in well under a second through no > (conscious) rational process. > Aha. Gotcha. This would make for a fun Oakland.pm meeting (said the member who never goes to Oakland.pm meetings): bring several pieces of code, and... describe why they're execrable? everyone secretly vote on how "good" they think it is? something? Hmm. > Sometimes after that, it's possible, although not necessarily helpful, > to go backwards and construct some logical reason for the reaction. > > > > Cheers, > > > > Indeed, oakland.pm is overdue for a beer drink. > > Belden, really should do something about that-^ > > Hey, Casa Donde has always been available for > meetings. Beer is always available there. Jupiter in Berkeley is OK, > but a little noisy. I'm not sure what's funnier: the Note, the Warning, or the fact that it took me almost a minute to figure out that no, you don't run a bar. Hmm. Drink beer. Throw popcorn at projections of bad code. My Monday evenings are free these next few weeks (until Venece's semester ends and her night class is done). Name a day and I'll probably be there. (Or I'll counteroffer.) Belden From george at metaart.org Fri Feb 4 18:56:00 2005 From: george at metaart.org (George Woolley) Date: Fri Feb 4 18:38:55 2005 Subject: [oak perl] Review Info Message-ID: <200502041856.00856.george@metaart.org> I've modified and added to the intro parapraphs on the Reviews index page including two links that could be useful in writing a book review: http://ug.oreilly.com/bookreviews.html http://www.apress.com/userGroups/writeareview.html Do let me know if you wish to do a review. From santranyc at yahoo.com Fri Feb 4 23:15:55 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Fri Feb 4 23:13:44 2005 Subject: [oak perl] Lexical vs. Package variables Message-ID: Belden, Thanks for the detailed response and all the examples. Code to play with and test! The perl.plover.com URL you gave me referenced an article "Coping With Scoping" that I enjoyed very much. Here's the quote that nailed down one concept for me: "[Lexical ("my") variables are] totally inaccessible to most parts of the program--anything outside the block where the variable is declared. This block is called the scope of the variable. If the variable wasn't declared in any block [i.e., properly scoped], its scope is from the place it was declared to the end of the file." The last sentence was really helpful. It explains what's going on when code is posted without any scope. It means the value is in effect from the "my" declaration through the end of the script. But now I'm grappling with the *basic* idea of scoping: that you're cordoning off a part of your script with a scoped value so that a variable with an identical name elsewhere in the code is unaffected. This actually seems pointless, if I'm foolish enough to believe that a script is always a linear affair, like driving a car past scenery. But somewhere in the back of my mind--sorry to get existential here--I recall seeing loops or "subs" set up at the beginning of a long script that would "trigger" when a certain condition suddenly got satisfied somewhere in the middle of the script. In a way, doesn't that take programming out of the two-dimension lity of a "train on a track going somewhere" to a universe of simultaneity (random events can trigger and run simultaneously ? And if IF and/or WHEN loops can be triggered anywhere in a program, then I can very definitely see the point of having lexical variables in order to lock down their values within their scopes. Coming back down to earth, and trying to understand the advantages of lexical variables, how about this example as a demonstration of some basic concepts involved: #TEST1 -- lexical trumps package sub standard { my $x = red; print "x\n"; # should print red } print "x\n"; # should print only newline #TEST2 package trumps lexical $x = pink; print "x\n"; # should print pink sub marine { my $x = blue; print "x\n"; # should print blue } print "x\n"; # should print pink *** But of course I guess I can test this when I get home tonight. --Sandy From santranyc at yahoo.com Sat Feb 5 02:16:45 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Sat Feb 5 02:14:24 2005 Subject: [oak perl] corrected lexical script Message-ID: <5.1.0.14.2.20050205051515.02aea090@pop.mail.yahoo.com> There were so many holes in that piece of code I last posted that I want to crawl under a rock. Here's a slight revision, although this wouldn't work if it had "use strict" in it, either: #TEST1 -- lexical trumps package {sub standard { my $x = red; print "$x\n"; } &standard; # should print red } print "$x\n"; # should print only newline #TEST2 package trumps lexical $x = pink; print "$x\n"; # should print pink sub marine { my $x = blue; print "$x\n"; # should print blue } &marine; # should print blue print "$x\n"; # should print pink --Sandy Santra From david at fetter.org Sat Feb 5 13:46:20 2005 From: david at fetter.org (David Fetter) Date: Sat Feb 5 13:46:35 2005 Subject: [oak perl] Good perl examples on the web In-Reply-To: <1107560033.7150.118.camel@ls104> References: <1107552827.7150.106.camel@ls104> <20050204214906.GB2132@fetter.org> <1107557134.7150.108.camel@ls104> <20050204225455.GD2132@fetter.org> <1107558762.7150.113.camel@ls104> <20050204232251.GE2132@fetter.org> <1107560033.7150.118.camel@ls104> Message-ID: <20050205214620.GF9539@fetter.org> On Fri, Feb 04, 2005 at 03:33:53PM -0800, Belden Lyman wrote: > On Fri, 2005-02-04 at 15:22, David Fetter wrote: > > If "etc." were an algorithmic, or even a heuristic process for me, > > I would already have described it. The sight of poor code can be > > like the sound of fingernails on a chalkboard or the smell of > > rotting meat. IOW, the reaction happens in well under a second > > through no (conscious) rational process. > > Aha. Gotcha. > > This would make for a fun Oakland.pm meeting (said the member who > never goes to Oakland.pm meetings): bring several pieces of code, > and... describe why they're execrable? everyone secretly vote on how > "good" they think it is? something? > > Hmm. That sounds good. Most people I know like to bag on others' code. And remember, you're not the same person you were years ago :) > > Sometimes after that, it's possible, although not necessarily > > helpful, to go backwards and construct some logical reason for the > > reaction. > > > > > > Cheers, > > > > > > Indeed, oakland.pm is overdue for a beer drink. Belden, really > > > should do something about that-^ > > > > Hey, Casa Donde has always been available > > for meetings. Beer is always available there. Jupiter in > > Berkeley is OK, but a little noisy. > > I'm not sure what's funnier: the Note, the Warning, or the fact that > it took me almost a minute to figure out that no, you don't run a > bar. Heh. > Hmm. > > Drink beer. Throw popcorn at projections of bad code. You have a projector? > My Monday evenings are free these next few weeks (until Venece's > semester ends and her night class is done). Name a day and I'll > probably be there. (Or I'll counteroffer.) Hrm. Well, things are a bit hectic 'til the 16th, then or after is fine. Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From george at metaart.org Mon Feb 7 17:25:24 2005 From: george at metaart.org (George Woolley) Date: Mon Feb 7 17:08:06 2005 Subject: [oak perl] February Oakland.pm Meeting: Tue. Feb. 8 Message-ID: <200502071725.24097.george@metaart.org> It looks like a bunch of people are coming. I'm looking forward to seeing you. George cut & paste from http://www.metaart.org/opug/ ................................ Next meeting * when: Tue. Feb. 8 at 7:30-9:30pm (on 2nd Tuesdays since Dec. 2002) * where: Connie's Cantina 3340 Grand Ave., Oakland CA * directions: [link to] directions and ascii map * theme: wiki * activities: o introductions o giveaways o short talks on the theme and discussion o short talks on other topics + on stupid Perl tricks by Josh Wait + on Python by Stephen Kolupaev o eat Mexican food o ... * who: open to anyone interested. * how much: no fee for our meetings. However, it would be kool if you got something to eat and/or drink. * RSVP: if you want to be sure to have a seat at the Oakland.pm table. From zed.lopez at gmail.com Mon Feb 7 17:21:30 2005 From: zed.lopez at gmail.com (Zed Lopez) Date: Mon Feb 7 17:21:39 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <20050205071344.F16C81776F@x6.develooper.com> References: <20050205071344.F16C81776F@x6.develooper.com> Message-ID: <83a996de0502071721484a8649@mail.gmail.com> > But now I'm grappling with the *basic* idea of scoping: > that you're cordoning off a part of your script with a scoped > value so that a variable with an identical name elsewhere > in the code is unaffected. > > This actually seems pointless, if I'm foolish enough to > believe that a script is always a linear affair, like driving > a car past scenery. It doesn't have much point for a very short script. It is immensely pointful for anything longer, though. For instance, if you couldn't scope your variables, you'd have to double-check by hand that you weren't re-using variable names among different subroutines. > But somewhere in the back of my mind--sorry to get existential > here--I recall seeing loops or "subs" set up at the beginning > of a long script that would "trigger" when a certain condition > suddenly got satisfied somewhere in the middle of the script. > In a way, doesn't that take programming out of the two-dimension > lity of a "train on a track going somewhere" to a universe > of simultaneity (random events can trigger and run simultaneously > ? And if IF and/or WHEN loops can be triggered anywhere > in a program, then I can very definitely see the point of > having lexical variables in order to lock down their values > within their scopes. You're thinking of event-driven programming here, for instance through signals. But it's as deterministic as any other programming, just more complicated. Lexically scoped variables are no more or less relevant in this case than for any other complicated program. > Coming back down to earth, and trying to understand the > advantages of lexical variables, how about this example > as a demonstration of some basic concepts involved: > > #TEST1 -- lexical trumps package > > sub standard { > my $x = red; > print "x\n"; # should print red > } > > print "x\n"; # should print only newline I assume you mean print "$x\n" in both cases. In the latter case, you'll get an error if you've used strict (as you should for any non-trivial program.) If you haven't, you're correct. > #TEST2 package trumps lexical > > $x = pink; > print "x\n"; # should print pink > > sub marine { > my $x = blue; > print "x\n"; # should print blue > } > > print "x\n"; # should print pink Same as above. Assuming you meant "$x\n", you're right, but it won't run under use strict. Zed From jseidel at edpci.com Mon Feb 7 18:14:59 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Mon Feb 7 18:15:09 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <83a996de0502071721484a8649@mail.gmail.com> References: <20050205071344.F16C81776F@x6.develooper.com> <83a996de0502071721484a8649@mail.gmail.com> Message-ID: <57500.63.192.200.250.1107828899.squirrel@63.192.200.250> >> But now I'm grappling with the *basic* idea of scoping: >> that you're cordoning off a part of your script with a scoped >> value so that a variable with an identical name elsewhere >> in the code is unaffected. This is absolutely the point -- you've got it. Now just generalize your thinking about programs to include *large* programs... programs that have many different subroutines to get the job done. What if you wanted a simple counter (e.g., $i) to count things during a loop. If you couldn't localize them, you'd have to use $i1 for the first subroutine, $i2 for the second subroutine, and so on. With even a moderate-sized system, this can get to be a real pain and the source of obtuse bugs. I know; a system that I programmed in many years ago had exactly that problem... >> >> This actually seems pointless, if I'm foolish enough to >> believe that a script is always a linear affair, like driving >> a car past scenery. Don't think of a *coding* script as a linear affair... think of the *execution* of the script as linear. If your code is executing in the main routine, then calls subroutine-1, which calls subroutine-2, then that's the "linearity" that is relevant... and which is what makes localized variables so valuable. Hope this helps...jon -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Connecting Business and Technology Jon Seidel, CMC +1-510-530-6314 EDP Consulting, Inc. www.edpci.com CMC (Certified Management Consultant) is a certification mark awarded by the Institute of Management Consultants USA and represents evidence of the highest standards of consulting and adherence to the ethical canons of the profession. Less than 1% of all consultants have achieved this level of performance. See www.imcusa.org/hireacmc.acgi. From jseidel at edpci.com Mon Feb 7 18:14:59 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Mon Feb 7 18:15:11 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <83a996de0502071721484a8649@mail.gmail.com> References: <20050205071344.F16C81776F@x6.develooper.com> <83a996de0502071721484a8649@mail.gmail.com> Message-ID: <57500.63.192.200.250.1107828899.squirrel@63.192.200.250> >> But now I'm grappling with the *basic* idea of scoping: >> that you're cordoning off a part of your script with a scoped >> value so that a variable with an identical name elsewhere >> in the code is unaffected. This is absolutely the point -- you've got it. Now just generalize your thinking about programs to include *large* programs... programs that have many different subroutines to get the job done. What if you wanted a simple counter (e.g., $i) to count things during a loop. If you couldn't localize them, you'd have to use $i1 for the first subroutine, $i2 for the second subroutine, and so on. With even a moderate-sized system, this can get to be a real pain and the source of obtuse bugs. I know; a system that I programmed in many years ago had exactly that problem... >> >> This actually seems pointless, if I'm foolish enough to >> believe that a script is always a linear affair, like driving >> a car past scenery. Don't think of a *coding* script as a linear affair... think of the *execution* of the script as linear. If your code is executing in the main routine, then calls subroutine-1, which calls subroutine-2, then that's the "linearity" that is relevant... and which is what makes localized variables so valuable. Hope this helps...jon -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Connecting Business and Technology Jon Seidel, CMC +1-510-530-6314 EDP Consulting, Inc. www.edpci.com CMC (Certified Management Consultant) is a certification mark awarded by the Institute of Management Consultants USA and represents evidence of the highest standards of consulting and adherence to the ethical canons of the profession. Less than 1% of all consultants have achieved this level of performance. See www.imcusa.org/hireacmc.acgi. From mark at bincomputing.com Mon Feb 7 19:53:00 2005 From: mark at bincomputing.com (Mark Bole) Date: Mon Feb 7 19:53:12 2005 Subject: [oak perl] Hello....introducing myself Message-ID: <4208379C.2090406@bincomputing.com> Hello Oakland Perlmongers... George Woolley suggested I introduce myself as a recent subscriber to the list.... well, I'm an IT professional, I've been working with Unix, Perl, and Oracle (in that order) for many years, and I'd like to network with other Perl users in my neighborhood (East Bay) -- so I thought I'd sign up. I've seen the daily digest for a few days now and you all don't look too scary... so hopefully I'll see some of you at the February meeting tomorrow evening... -- Mark Bole http://www.bincomputing.com 925-287-0366 From george at metaart.org Mon Feb 7 23:04:07 2005 From: george at metaart.org (George Woolley) Date: Mon Feb 7 22:46:50 2005 Subject: [oak perl] Hello....introducing myself In-Reply-To: <4208379C.2090406@bincomputing.com> References: <4208379C.2090406@bincomputing.com> Message-ID: <200502072304.07333.george@metaart.org> Mark, Hm, we "don't look too scary". I'll meditate on that. See you tomorrow at Connie's. It looks like there will be a bunch of us there. Anyway, welcome to Oakland.pm and thanks for introducing yourself on the list. -- George On Monday 07 February 2005 7:53 pm, Mark Bole wrote: > Hello Oakland Perlmongers... > > George Woolley suggested I introduce myself as a recent subscriber to > the list.... well, I'm an IT professional, I've been working with Unix, > Perl, and Oracle (in that order) for many years, and I'd like to > network with other Perl users in my neighborhood (East Bay) -- so I > thought I'd sign up. I've seen the daily digest for a few days now and > you all don't look too scary... so hopefully I'll see some of you at the > February meeting tomorrow evening... From santranyc at yahoo.com Tue Feb 8 10:02:06 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Tue Feb 8 10:00:51 2005 Subject: [oak perl] ActiveState 5.8.6 Message-ID: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> I'm trying to install ActiveState 5.8.6 Perl on a Win95 machine, but the installation stops and says "Windows Scripting Host" isn't present. Anyone have a link for downloading this? There are so many scripting download resources at the Microsoft site, I'm not sure which I need: Windows Script 5.6 Script Encoder Windows Script Component Wizard Windows Script Control --Sandy Santra From blyman at iii.com Tue Feb 8 10:12:56 2005 From: blyman at iii.com (Belden Lyman) Date: Tue Feb 8 10:12:24 2005 Subject: [oak perl] Hello....introducing myself In-Reply-To: <4208379C.2090406@bincomputing.com> References: <4208379C.2090406@bincomputing.com> Message-ID: <1107886375.17254.63.camel@ls104> On Mon, 2005-02-07 at 19:53, Mark Bole wrote: > Hello Oakland Perlmongers... > > George Woolley suggested I introduce myself as a recent subscriber to > the list.... well, I'm an IT professional, I've been working with Unix, > Perl, and Oracle (in that order) for many years, and I'd like to > network with other Perl users in my neighborhood (East Bay) -- so I > thought I'd sign up. I've seen the daily digest for a few days now and > you all don't look too scary... so hopefully I'll see some of you at the > February meeting tomorrow evening... Boo! From blyman at iii.com Tue Feb 8 10:37:07 2005 From: blyman at iii.com (Belden Lyman) Date: Tue Feb 8 10:36:48 2005 Subject: [oak perl] ActiveState 5.8.6 In-Reply-To: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> References: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> Message-ID: <1107887827.17254.112.camel@ls104> On Tue, 2005-02-08 at 10:02, Sandy Santra wrote: > I'm trying to install ActiveState 5.8.6 Perl on a Win95 machine, but the > installation stops and says "Windows Scripting Host" isn't present. > http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl There's 2 links to download perl; the AS package and the .MSI. I seem to recall that the AS package is a setup.exe whereas the .MSI is a setup.msi. I think the difference is in which installer gets used and whether you get an uninstall option. (Uninstall perl?! They're mad!) > Anyone have a link for downloading this? There are so many scripting > download resources at the Microsoft site, I'm not sure which I need: > The page also has a link to download the installer for Win9x. Look for the text "Windows Installer 2.0". Again on the ISTR bandwagon, I think I initially tried to get the .msi to install on a 95 box and couldn't install, so ended up using the AS instead. Belden From santranyc at yahoo.com Tue Feb 8 10:56:47 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Tue Feb 8 10:54:26 2005 Subject: [oak perl] ActiveState 5.8.6 In-Reply-To: <1107887827.17254.112.camel@ls104> References: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050208135152.025c6590@pop.mail.yahoo.com> Thanks, Belden, I forgot about that other install program. But I'm concerned I don't meet this requirement: PerlScript: ActiveX scripting host such as IE 4.0+, or Windows Scripting Host I don't have IE on the Win95 machine I'm installing it on. At 10:37 AM 2/8/05 -0800, you wrote: >On Tue, 2005-02-08 at 10:02, Sandy Santra wrote: > > I'm trying to install ActiveState 5.8.6 Perl on a Win95 machine, but the > > installation stops and says "Windows Scripting Host" isn't present. > > > >http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl > >There's 2 links to download perl; the AS package and the .MSI. --Sandy Santra From blyman at iii.com Tue Feb 8 11:06:56 2005 From: blyman at iii.com (Belden Lyman) Date: Tue Feb 8 11:06:28 2005 Subject: [oak perl] corrected lexical script In-Reply-To: <5.1.0.14.2.20050205051515.02aea090@pop.mail.yahoo.com> References: <5.1.0.14.2.20050205051515.02aea090@pop.mail.yahoo.com> Message-ID: <1107889616.17254.155.camel@ls104> On Sat, 2005-02-05 at 02:16, Sandy Santra wrote: > There were so many holes in that piece of code I last posted that I want to > crawl under a rock. Don't sweat it. We've all done the same thing- just typed code into an email and sent it. No biggie. Just don't code your programs that way and you'll still earn a living :) Belden From blyman at iii.com Tue Feb 8 11:21:27 2005 From: blyman at iii.com (Belden Lyman) Date: Tue Feb 8 11:20:55 2005 Subject: [oak perl] ActiveState 5.8.6 In-Reply-To: <5.1.0.14.2.20050208135152.025c6590@pop.mail.yahoo.com> References: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208135152.025c6590@pop.mail.yahoo.com> Message-ID: <1107890487.17254.171.camel@ls104> On Tue, 2005-02-08 at 10:56, Sandy Santra wrote: > Thanks, Belden, I forgot about that other install program. > > But I'm concerned I don't meet this requirement: > > PerlScript: ActiveX scripting host such as IE 4.0+, or Windows Scripting Host > > I don't have IE on the Win95 machine I'm installing it on. > Really? I thought that's why Microsoft had such a fun time with the Justice Department - because MS had bundled IE into their OS. You can check by doing start->run->explorer.exe . When your Windows explorer launches, just put http://www.google.com into the location bar and you're on your way. If this doesn't work and you've got your Windows install disks, then you can go the Control Panel, run Add/Remove programs, and install IE. You'll be prompted for the Windows disk, and it'll install. If you don't have the disks, then you'll need to get a copy of them. (I think I've got a set at home that you could use, just contact me off-list.) Belden > At 10:37 AM 2/8/05 -0800, you wrote: > >On Tue, 2005-02-08 at 10:02, Sandy Santra wrote: > > > I'm trying to install ActiveState 5.8.6 Perl on a Win95 machine, but the > > > installation stops and says "Windows Scripting Host" isn't present. > > > > > > >http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl > > > >There's 2 links to download perl; the AS package and the .MSI. > > > --Sandy Santra > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland From extasia at gmail.com Tue Feb 8 11:24:16 2005 From: extasia at gmail.com (David Alban) Date: Tue Feb 8 11:24:41 2005 Subject: [oak perl] corrected lexical script In-Reply-To: <1107889616.17254.155.camel@ls104> References: <5.1.0.14.2.20050205051515.02aea090@pop.mail.yahoo.com> <1107889616.17254.155.camel@ls104> Message-ID: <4c714a9c050208112451a989c8@mail.gmail.com> It's my preference to send something that I've run. (Note the difference between "that I've run" and "that runs". :-) On Tue, 08 Feb 2005 11:07:04 -0800 (PST), Belden Lyman wrote: > On Sat, 2005-02-05 at 02:16, Sandy Santra wrote: > > There were so many holes in that piece of code I last posted that I want to > > crawl under a rock. > > Don't sweat it. We've all done the same thing- just typed code into > an email and sent it. No biggie. > > Just don't code your programs that way and you'll still earn a > living :) -- Live in a world of your own, but always welcome visitors. From blyman at iii.com Tue Feb 8 11:44:20 2005 From: blyman at iii.com (Belden Lyman) Date: Tue Feb 8 11:43:58 2005 Subject: [oak perl] corrected lexical script In-Reply-To: <4c714a9c050208112451a989c8@mail.gmail.com> References: <5.1.0.14.2.20050205051515.02aea090@pop.mail.yahoo.com> <1107889616.17254.155.camel@ls104> <4c714a9c050208112451a989c8@mail.gmail.com> Message-ID: <1107891860.17254.175.camel@ls104> On Tue, 2005-02-08 at 11:24, David Alban wrote: > It's my preference to send something that I've run. > > (Note the difference between "that I've run" and "that runs". :-) I generally run code before sending, but I had to learn that the hard way. Measure twice and run once, or something like that. Belden From blyman at iii.com Tue Feb 8 11:47:39 2005 From: blyman at iii.com (Belden Lyman) Date: Tue Feb 8 11:47:07 2005 Subject: [oak perl] ActiveState 5.8.6 In-Reply-To: <1107890487.17254.171.camel@ls104> References: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208135152.025c6590@pop.mail.yahoo.com> <1107890487.17254.171.camel@ls104> Message-ID: <1107892058.17254.179.camel@ls104> I should have included "it's been about 4 years since I've used Win95 at all, so some of this may not be exactly correct" somewhere in my email. Caveat twice and explain once, or something like that. Belden, foo() x 2 && bar() x 1 or $something =~ /that/ ; On Tue, 2005-02-08 at 11:21, Belden Lyman wrote: > On Tue, 2005-02-08 at 10:56, Sandy Santra wrote: > > Thanks, Belden, I forgot about that other install program. > > > > But I'm concerned I don't meet this requirement: > > > > PerlScript: ActiveX scripting host such as IE 4.0+, or Windows Scripting Host > > > > I don't have IE on the Win95 machine I'm installing it on. > > > > Really? I thought that's why Microsoft had such a fun time with > the Justice Department - because MS had bundled IE into their > OS. > > You can check by doing start->run->explorer.exe . When your > Windows explorer launches, just put http://www.google.com > into the location bar and you're on your way. > > If this doesn't work and you've got your Windows install disks, > then you can go the Control Panel, run Add/Remove programs, and > install IE. You'll be prompted for the Windows disk, and it'll > install. > > If you don't have the disks, then you'll need to get a copy of > them. (I think I've got a set at home that you could use, just > contact me off-list.) > > Belden > > > At 10:37 AM 2/8/05 -0800, you wrote: > > >On Tue, 2005-02-08 at 10:02, Sandy Santra wrote: > > > > I'm trying to install ActiveState 5.8.6 Perl on a Win95 machine, but the > > > > installation stops and says "Windows Scripting Host" isn't present. > > > > > > > > > >http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl > > > > > >There's 2 links to download perl; the AS package and the .MSI. > > > > > > --Sandy Santra > > > > _______________________________________________ > > Oakland mailing list > > Oakland@pm.org > > http://mail.pm.org/mailman/listinfo/oakland > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland From alamozzz at yahoo.com Tue Feb 8 11:48:07 2005 From: alamozzz at yahoo.com (Adrien Lamothe) Date: Tue Feb 8 11:48:16 2005 Subject: [oak perl] New IBM/Sony/Toshiba microprocessor is good news for Perl Message-ID: <20050208194808.31743.qmail@web50207.mail.yahoo.com> IBM/Sony/Toshiba announced a new microprocessor yesterday, that promises to perform 10 times faster than current offerings. AMD, Intel and Sun Microsystems plan to release similar microprocessors in the near future. A URL with the story is: http://story.news.yahoo.com/news?tmpl=story&u=/ap/cell_processor What does this have to do with Perl? Well, as an interpreted language, Perl programs will always run slower than their compiled cousins. Interpreted languages always benefit from hardware speed increases. So, on this newer hardware, Perl may be considered for tasks that it previously wasn't. -- Adrien ===== Adrien Lamothe www.adriensweb.com __________________________________ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com From george at metaart.org Tue Feb 8 12:19:14 2005 From: george at metaart.org (George Woolley) Date: Tue Feb 8 12:01:55 2005 Subject: [oak perl] Fwd: OSCON Call For Proposals Closing Soon Message-ID: <200502081219.14049.george@metaart.org> Note: It's also a call for suggested topics. ---------- Forwarded Message ---------- Subject: OSCON Call For Proposals Closing Soon Date: Tuesday 08 February 2005 9:29 am From: "O'Reilly Conferences" To: sassafras@metaart.org The Call for Proposals will end soon for the 7th Annual O'Reilly Open Source Convention http://conferences.oreillynet.com/os2005/ OSCON is headed back to friendly, economical Portland, Oregon during the week of August 1-5, 2005. If you've ever wanted to join the OSCON speaker firmament, now's your chance to submit a proposal (or two) by February 13, 2005. Complete details are available on the OSCON web site, but we're particularly interested in exploring how software development is moving to another level, and how developers and businesses are adjusting to new business models and architectures. We're looking for sessions, tutorials, and workshops proposals that appeal to developers, systems and network administrators, and their managers in the following areas: - All aspects of building applications, services, and systems that use the new capabilities of the open source platform - Burning issues for Java, Mozilla, web apps, and beyond - The commoditization of software: who and/or what can show us the money? - Network-enabled collaboration - Software customizability, including software as a service - Law, licensing, politics, and how best to navigate other troubled waters Specific topics and tracks at OSCON 2005 include: Linux and other open source operating systems, Java, PHP, Python, Perl, Databases (including MySQL and PostgreSQL), Apache, XML, Applications, Ruby, and Security. Attendees have a wide range of experience, so be sure to target a particular level of experience: beginner, intermediate, advanced. Talks and tutorials should be technical; strictly no marketing presentations. Session presentations are 45 or 90 minutes long, and tutorials are either a half-day (3 hours) or a full day (6 hours). Feel free to spread the word about the Call for Proposals to your friends, family, colleagues, and compatriots. We want everyone to submit, from American women hacking artificial life into the Linux kernel to Belgian men building a better mousetrap from PHP and recycled military hardware. We mean everyone! Even if you don't want to participate as a speaker, send us your suggestions--topics you'd like to see covered, groups we should bring into the OSCON fold, extra-curricular activities we should organize--to oscon-idea@oreilly.com . This year, we're moving to the wide open spaces of the Oregon Convention Center. We've arranged for the nearby Doubletree Hotel to be our headquarters hotel--it's a short, free Max light rail ride (or a lovely walk) from the Convention Center. Registration opens in April 2005; hotel information will be available shortly. Deadline to submit a proposal is Midnight (PST), February 13. For all the conference details, go to: http://conferences.oreillynet.com/os2005/ Press coverage, blogs, photos, and news from the 2004 O'Reilly Open Source Convention can be found at: http://www.oreillynet.com/oscon2004/ Would your company like to make a big impression on the open source community? If so, consider exhibiting or becoming a sponsor. Contact Andrew Calvo at (707) 827-7176, or andrewc@oreilly.com for more info. See you Portland next summer, The O'Reilly OSCON Team ... From george at metaart.org Tue Feb 8 13:19:54 2005 From: george at metaart.org (George Woolley) Date: Tue Feb 8 13:02:33 2005 Subject: [oak perl] New IBM/Sony/Toshiba microprocessor is good news for Perl In-Reply-To: <20050208194808.31743.qmail@web50207.mail.yahoo.com> References: <20050208194808.31743.qmail@web50207.mail.yahoo.com> Message-ID: <200502081319.54887.george@metaart.org> Yesterday, I clicked on a link to this story on Adrien's site a bit more than an hour after the article came out. At that time I also read his blog entry on it which was already out. Adrien's site is at http://www.adriensweb.com/ His blog is at http://www.adriensweb.com/weblog.html George On Tuesday 08 February 2005 11:48 am, Adrien Lamothe wrote: > IBM/Sony/Toshiba announced a new microprocessor > yesterday, that promises to perform 10 times > faster than current offerings. AMD, Intel and > Sun Microsystems plan to release similar > microprocessors in the near future. > > A URL with the story is: > > http://story.news.yahoo.com/news?tmpl=story&u=/ap/cell_processor > > What does this have to do with Perl? Well, as an > interpreted language, Perl programs will always > run slower than their compiled cousins. Interpreted > languages always benefit from hardware speed > increases. So, on this newer hardware, Perl may > be considered for tasks that it previously wasn't. > > -- Adrien > ... > ===== > Adrien Lamothe > www.adriensweb.com ... From blyman at iii.com Tue Feb 8 13:37:19 2005 From: blyman at iii.com (Belden Lyman) Date: Tue Feb 8 13:36:51 2005 Subject: [oak perl] New IBM/Sony/Toshiba microprocessor is good news for Perl In-Reply-To: <20050208194808.31743.qmail@web50207.mail.yahoo.com> References: <20050208194808.31743.qmail@web50207.mail.yahoo.com> Message-ID: <1107898639.17254.219.camel@ls104> On Tue, 2005-02-08 at 11:48, Adrien Lamothe wrote: > What does this have to do with Perl? Well, as an > interpreted language, Perl programs will always > run slower than their compiled cousins. Interpreted > languages always benefit from hardware speed > increases. So, on this newer hardware, Perl may > be considered for tasks that it previously wasn't. Why do you say "interpreted languages always benefit from hardware speed increases"? Isn't an increase in hardware speed an across-the-board gain for all software using that hardware? I mean, sure, perl programs will run faster, but they won't run any faster in comparison to other programs. Personally, I hope that the increase in CPU speed allows for better 3-d games and cooler special effects in films. And perhaps better software testing. Did anyone see http://tinyurl.com/7yr6s in Popular Science last month, which showed how inkjet printers are doing some very wierd things? (Like printing a cat heart: no kidding.) Next url also visits same site in case you don't like tinyurl. http://www.hugeurl.com/?OTdjN2M0NzQ0YjVlNjUzMzU0YWUzMjAwMDNl MGFjMzgmOSZWbTB3ZUdReFNYaGlSbVJZVjBkNFZWWXdaRzlYUmxsM1drWk9W VTFXY0hwWGEyTTFWakpLU0dWR1dsWmlXRkYzVmpCYVMyTXlTa1ZVYkhCWFZt eHdVVlp0TVhwbFJsbDVWR3RrV0dKR2NIQldNR1J2WlZaYWNsVnJaRnBXTURF MFYydG9SMVZ0U2tsUmJUbFZWbTFvUkZscVJtdFhSMUpJVW14d1YwMUVWWGRX YTJRd1ZqRlZlVk5yYUdoU2VteFdWbTE0WVUweFdsZFhiWFJYVFZaYWVWcEZX bXRVYkZwMVVXeHNWMkZyYTNoVmFrWmhWMFpPY21KR1NtbFdSM2hvVm1wQ2Ix RXhaRWRXYms1WVlsaFNjVlJXYUVOU2JGcFlUVmhrYUZac2NIcFpNRnAzVmpG WmVtRklXbUZTUlZwaFdsWmFUMk50U2tkVGJXaHNZbGhvYjFadE1ERmtNVXAw Vm01T2FsSldXbFJaYTFwM1l6RmFjVkp0UmxSU2JIQkpXbFZhVDFaWFNrZGpS bXhoVTBoQ1NGWnFTa1psVmxaWldrWndhR0V4Y0ZsV1YzQkhaREZLZEZKclpG aGlWM2h2VkZab1ExZEdXblJOV0dSVlRWWktNRlp0ZEd0aGJFcFhWMnhTV2xk SVFucFpNVnBUVmpGa2RGSnRlRmRpYTBwSVZtcEtlazVXV2xoVGEyUnBVa1p3 V0ZadGVFdFRSbHB4VW10MFUySkhVakZXTW5oclZqRktXVkZyYkZoWFNFSklW bFJLVDJNeVRrWmFSMmhUWWxkb1ZWWkdXbGRrTVd4WFYxaG9ZVkpGU205VVYz UnpUa1phV0dSSGRHaGlSWEF3V1ZWb1MxWnJNVWhWYkZKWFRVWndhRnBGWkU5 T2JFcDBaVVprYVZacmJ6RldiWEJLVFZkRmVGcEZaRlJpYTNCeFZXMHhORlpz VWxkWGEzUldVbXhzTTFZeU1VZGhhekZ5VGxWd1ZrMXVhSEpXVkVaTFYxWkdj MUZzYUdsU2JIQjVWbXRTUjFOdFZrZFhibFpWWWxWYVZGbHNaRzlXVmxwSFZX dDBhVTFXY0hwV01XaHZWMGRLV1ZWck9WWmlXRko2Vkd4YVlWSXlSa2hQVm1S cFZsaENTbGRXVm05VE1WcDBVMnRrVkdKSGFHRmFWM1JoWVVac05sSnNaR3Bp U0VKSVZrY3hjMVV3TUhsaFIyaFhUVlpLUkZacVFYaFNNV1J6VjJzMVdGSlVW bHBYVjNScllqRmtSMkpJVG1oU1ZUVlpWVzE0ZDAxR2NGWmFSRUpYVW14d2VW WXlOWE5YUjBWNVZXdG9WMVpGV2t4V2JYaHJWbFpHYzJGR1pGTldia0oyVm14 a2QxSXlSWGhhUldSV1ltdHdXVmxyVmt0WFJsSllUVmM1YTJKSFVucFhhMUpE VjJ4YVZWWnVjRmROYWxaTVZqQmtTMWRXVm5KUFZscHBWMGRvVFZaR1ZtRlpW bGw1VW10b2ExSnNXbkJWYlRWRFYxWmFWVk5xVWxKTlZtdzFWVEkxVjFWdFNu VlJiVVpWVm5wV2RsWXdXbmRTTVhCR1QxWk9hVk5GU2twWGJGWnJVakpLU0ZK dVNsTldSVlU1 Just copy-paste onto one line of your browser. Belden, srand()'ing Oakland.pm since the very beginning! From alamozzz at yahoo.com Tue Feb 8 14:23:59 2005 From: alamozzz at yahoo.com (Adrien Lamothe) Date: Tue Feb 8 14:24:09 2005 Subject: [oak perl] New IBM/Sony/Toshiba microprocessor is good news for Perl In-Reply-To: <1107898639.17254.219.camel@ls104> Message-ID: <20050208222359.50302.qmail@web50206.mail.yahoo.com> Yes, a performance increase benefits all software. As I said, interpreted languages will always run slower than their compiled cousins. However, there is a "threshold" principle in effect that determines whether a particular programming language or environment should be considered for a particular application. If using an interpreted language will result in an app that is too slow, then the language should not be used. When an increase in hardware performance enables the same interpreted language to cross the threshold and perform acceptably, then you can evaluate the interpreted language against compiled languages using criteria such as ease of use, useful programming constructs (such as powerful regular expression capability,) etc. Even though the compiled languages will still perform faster, the interpreted language is now "good enough" (and probably better than just "good enough"), which then gives the designer latitude to consider other factors. There is no doubt that the coming large performance increases will result in better 3-D games and media (Toshiba plans to use the new processor in televisions.) This will at some point create a new wave in consumer electronics spending. People are always looking for better entertainment and "eye candy." Languages like Perl may even find their way into the new high-performance entertainment appliances (Sony plans to use the new processor in Playstation-3.) These appliances are essentially general purpose computers with networking capability. Perl could be used for administrative tasks on these machines; probably not accessible to the users, but useful to the developers. -- Adrien --- Belden Lyman wrote: > On Tue, 2005-02-08 at 11:48, Adrien Lamothe wrote: > > What does this have to do with Perl? Well, as an > > interpreted language, Perl programs will always > > run slower than their compiled cousins. > Interpreted > > languages always benefit from hardware speed > > increases. So, on this newer hardware, Perl may > > be considered for tasks that it previously wasn't. > > Why do you say "interpreted languages always benefit > from > hardware speed increases"? Isn't an increase in > hardware > speed an across-the-board gain for all software > using that > hardware? > > I mean, sure, perl programs will run faster, but > they won't > run any faster in comparison to other programs. > > Personally, I hope that the increase in CPU speed > allows > for better 3-d games and cooler special effects in > films. > And perhaps better software testing. > > Did anyone see http://tinyurl.com/7yr6s in Popular > Science > last month, which showed how inkjet printers are > doing some > very wierd things? (Like printing a cat heart: no > kidding.) > > Next url also visits same site in case you don't > like tinyurl. > > http://www.hugeurl.com/?OTdjN2M0NzQ0YjVlNjUzMzU0YWUzMjAwMDNl > MGFjMzgmOSZWbTB3ZUdReFNYaGlSbVJZVjBkNFZWWXdaRzlYUmxsM1drWk9W > VTFXY0hwWGEyTTFWakpLU0dWR1dsWmlXRkYzVmpCYVMyTXlTa1ZVYkhCWFZt > eHdVVlp0TVhwbFJsbDVWR3RrV0dKR2NIQldNR1J2WlZaYWNsVnJaRnBXTURF > MFYydG9SMVZ0U2tsUmJUbFZWbTFvUkZscVJtdFhSMUpJVW14d1YwMUVWWGRX > YTJRd1ZqRlZlVk5yYUdoU2VteFdWbTE0WVUweFdsZFhiWFJYVFZaYWVWcEZX > bXRVYkZwMVVXeHNWMkZyYTNoVmFrWmhWMFpPY21KR1NtbFdSM2hvVm1wQ2Ix > RXhaRWRXYms1WVlsaFNjVlJXYUVOU2JGcFlUVmhrYUZac2NIcFpNRnAzVmpG > WmVtRklXbUZTUlZwaFdsWmFUMk50U2tkVGJXaHNZbGhvYjFadE1ERmtNVXAw > Vm01T2FsSldXbFJaYTFwM1l6RmFjVkp0UmxSU2JIQkpXbFZhVDFaWFNrZGpS > bXhoVTBoQ1NGWnFTa1psVmxaWldrWndhR0V4Y0ZsV1YzQkhaREZLZEZKclpG > aGlWM2h2VkZab1ExZEdXblJOV0dSVlRWWktNRlp0ZEd0aGJFcFhWMnhTV2xk > SVFucFpNVnBUVmpGa2RGSnRlRmRpYTBwSVZtcEtlazVXV2xoVGEyUnBVa1p3 > V0ZadGVFdFRSbHB4VW10MFUySkhVakZXTW5oclZqRktXVkZyYkZoWFNFSklW > bFJLVDJNeVRrWmFSMmhUWWxkb1ZWWkdXbGRrTVd4WFYxaG9ZVkpGU205VVYz > UnpUa1phV0dSSGRHaGlSWEF3V1ZWb1MxWnJNVWhWYkZKWFRVWndhRnBGWkU5 > T2JFcDBaVVprYVZacmJ6RldiWEJLVFZkRmVGcEZaRlJpYTNCeFZXMHhORlpz > VWxkWGEzUldVbXhzTTFZeU1VZGhhekZ5VGxWd1ZrMXVhSEpXVkVaTFYxWkdj > MUZzYUdsU2JIQjVWbXRTUjFOdFZrZFhibFpWWWxWYVZGbHNaRzlXVmxwSFZX > dDBhVTFXY0hwV01XaHZWMGRLV1ZWck9WWmlXRko2Vkd4YVlWSXlSa2hQVm1S > cFZsaENTbGRXVm05VE1WcDBVMnRrVkdKSGFHRmFWM1JoWVVac05sSnNaR3Bp > U0VKSVZrY3hjMVV3TUhsaFIyaFhUVlpLUkZacVFYaFNNV1J6VjJzMVdGSlVW > bHBYVjNScllqRmtSMkpJVG1oU1ZUVlpWVzE0ZDAxR2NGWmFSRUpYVW14d2VW > WXlOWE5YUjBWNVZXdG9WMVpGV2t4V2JYaHJWbFpHYzJGR1pGTldia0oyVm14 > a2QxSXlSWGhhUldSV1ltdHdXVmxyVmt0WFJsSllUVmM1YTJKSFVucFhhMUpE > VjJ4YVZWWnVjRmROYWxaTVZqQmtTMWRXVm5KUFZscHBWMGRvVFZaR1ZtRlpW > bGw1VW10b2ExSnNXbkJWYlRWRFYxWmFWVk5xVWxKTlZtdzFWVEkxVjFWdFNu > VlJiVVpWVm5wV2RsWXdXbmRTTVhCR1QxWk9hVk5GU2twWGJGWnJVakpLU0ZK > dVNsTldSVlU1 > > Just copy-paste onto one line of your browser. > > Belden, srand()'ing Oakland.pm since the very > beginning! > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > ===== Adrien Lamothe www.adriensweb.com __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com From jtriber at gmail.com Tue Feb 8 14:28:36 2005 From: jtriber at gmail.com (Julian Triber) Date: Tue Feb 8 14:28:43 2005 Subject: [oak perl] ActiveState 5.8.6 In-Reply-To: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> References: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> Message-ID: try this... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwsh/html/msdn_wsh_wp.asp We use it in work often, and it is problematic.... On Tue, 08 Feb 2005 13:02:06 -0500, Sandy Santra wrote: > I'm trying to install ActiveState 5.8.6 Perl on a Win95 machine, but the > installation stops and says "Windows Scripting Host" isn't present. > > Anyone have a link for downloading this? There are so many scripting > download resources at the Microsoft site, I'm not sure which I need: > > Windows Script 5.6 > Script Encoder > Windows Script Component Wizard > Windows Script Control > > --Sandy Santra > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > From blyman at iii.com Tue Feb 8 15:01:17 2005 From: blyman at iii.com (Belden Lyman) Date: Tue Feb 8 15:01:33 2005 Subject: [oak perl] New IBM/Sony/Toshiba microprocessor is good news for Perl In-Reply-To: <20050208222359.50302.qmail@web50206.mail.yahoo.com> References: <20050208222359.50302.qmail@web50206.mail.yahoo.com> Message-ID: <1107903677.17254.261.camel@ls104> Sure, and I understand all that. I'm not so confident as you, that's all. I think people's expectations of speed will also increase tenfold. The things that seem slow on my P3 will seem slow on my Cell, and the things that seem fast now will seem fast then. Belden On Tue, 2005-02-08 at 14:23, Adrien Lamothe wrote: > Yes, a performance increase benefits all software. > As I said, interpreted languages will always run > slower than their compiled cousins. However, there > is a "threshold" principle in effect that determines > whether a particular programming language or > environment should be considered for a particular > application. If using an interpreted language will > result in an app that is too slow, then the language > should not be used. When an increase in hardware > performance enables the same interpreted language > to cross the threshold and perform acceptably, then > you can evaluate the interpreted language against > compiled languages using criteria such as ease > of use, useful programming constructs (such as > powerful regular expression capability,) etc. > Even though the compiled languages will still perform > faster, the interpreted language is now "good enough" > (and probably better than just "good enough"), > which then gives the designer latitude to consider > other factors. > > There is no doubt that the coming large performance > increases will result in better 3-D games and > media (Toshiba plans to use the new processor in > televisions.) This will at some point create a > new wave in consumer electronics spending. > People are always looking for better entertainment > and "eye candy." Languages like Perl may even > find their way into the new high-performance > entertainment appliances (Sony plans to use the > new processor in Playstation-3.) These appliances > are essentially general purpose computers with > networking capability. Perl could be used for > administrative tasks on these machines; probably > not accessible to the users, but useful to the > developers. > > -- Adrien > > > --- Belden Lyman wrote: > > > On Tue, 2005-02-08 at 11:48, Adrien Lamothe wrote: > > > What does this have to do with Perl? Well, as an > > > interpreted language, Perl programs will always > > > run slower than their compiled cousins. > > Interpreted > > > languages always benefit from hardware speed > > > increases. So, on this newer hardware, Perl may > > > be considered for tasks that it previously wasn't. > > > > Why do you say "interpreted languages always benefit > > from > > hardware speed increases"? Isn't an increase in > > hardware > > speed an across-the-board gain for all software > > using that > > hardware? > > > > I mean, sure, perl programs will run faster, but > > they won't > > run any faster in comparison to other programs. > > > > Personally, I hope that the increase in CPU speed > > allows > > for better 3-d games and cooler special effects in > > films. > > And perhaps better software testing. > > > > Did anyone see http://tinyurl.com/7yr6s in Popular > > Science > > last month, which showed how inkjet printers are > > doing some > > very wierd things? (Like printing a cat heart: no > > kidding.) > > > > Next url also visits same site in case you don't > > like tinyurl. > > > > > http://www.hugeurl.com/?OTdjN2M0NzQ0YjVlNjUzMzU0YWUzMjAwMDNl > > > MGFjMzgmOSZWbTB3ZUdReFNYaGlSbVJZVjBkNFZWWXdaRzlYUmxsM1drWk9W > > > VTFXY0hwWGEyTTFWakpLU0dWR1dsWmlXRkYzVmpCYVMyTXlTa1ZVYkhCWFZt > > > eHdVVlp0TVhwbFJsbDVWR3RrV0dKR2NIQldNR1J2WlZaYWNsVnJaRnBXTURF > > > MFYydG9SMVZ0U2tsUmJUbFZWbTFvUkZscVJtdFhSMUpJVW14d1YwMUVWWGRX > > > YTJRd1ZqRlZlVk5yYUdoU2VteFdWbTE0WVUweFdsZFhiWFJYVFZaYWVWcEZX > > > bXRVYkZwMVVXeHNWMkZyYTNoVmFrWmhWMFpPY21KR1NtbFdSM2hvVm1wQ2Ix > > > RXhaRWRXYms1WVlsaFNjVlJXYUVOU2JGcFlUVmhrYUZac2NIcFpNRnAzVmpG > > > WmVtRklXbUZTUlZwaFdsWmFUMk50U2tkVGJXaHNZbGhvYjFadE1ERmtNVXAw > > > Vm01T2FsSldXbFJaYTFwM1l6RmFjVkp0UmxSU2JIQkpXbFZhVDFaWFNrZGpS > > > bXhoVTBoQ1NGWnFTa1psVmxaWldrWndhR0V4Y0ZsV1YzQkhaREZLZEZKclpG > > > aGlWM2h2VkZab1ExZEdXblJOV0dSVlRWWktNRlp0ZEd0aGJFcFhWMnhTV2xk > > > SVFucFpNVnBUVmpGa2RGSnRlRmRpYTBwSVZtcEtlazVXV2xoVGEyUnBVa1p3 > > > V0ZadGVFdFRSbHB4VW10MFUySkhVakZXTW5oclZqRktXVkZyYkZoWFNFSklW > > > bFJLVDJNeVRrWmFSMmhUWWxkb1ZWWkdXbGRrTVd4WFYxaG9ZVkpGU205VVYz > > > UnpUa1phV0dSSGRHaGlSWEF3V1ZWb1MxWnJNVWhWYkZKWFRVWndhRnBGWkU5 > > > T2JFcDBaVVprYVZacmJ6RldiWEJLVFZkRmVGcEZaRlJpYTNCeFZXMHhORlpz > > > VWxkWGEzUldVbXhzTTFZeU1VZGhhekZ5VGxWd1ZrMXVhSEpXVkVaTFYxWkdj > > > MUZzYUdsU2JIQjVWbXRTUjFOdFZrZFhibFpWWWxWYVZGbHNaRzlXVmxwSFZX > > > dDBhVTFXY0hwV01XaHZWMGRLV1ZWck9WWmlXRko2Vkd4YVlWSXlSa2hQVm1S > > > cFZsaENTbGRXVm05VE1WcDBVMnRrVkdKSGFHRmFWM1JoWVVac05sSnNaR3Bp > > > U0VKSVZrY3hjMVV3TUhsaFIyaFhUVlpLUkZacVFYaFNNV1J6VjJzMVdGSlVW > > > bHBYVjNScllqRmtSMkpJVG1oU1ZUVlpWVzE0ZDAxR2NGWmFSRUpYVW14d2VW > > > WXlOWE5YUjBWNVZXdG9WMVpGV2t4V2JYaHJWbFpHYzJGR1pGTldia0oyVm14 > > > a2QxSXlSWGhhUldSV1ltdHdXVmxyVmt0WFJsSllUVmM1YTJKSFVucFhhMUpE > > > VjJ4YVZWWnVjRmROYWxaTVZqQmtTMWRXVm5KUFZscHBWMGRvVFZaR1ZtRlpW > > > bGw1VW10b2ExSnNXbkJWYlRWRFYxWmFWVk5xVWxKTlZtdzFWVEkxVjFWdFNu > > > VlJiVVpWVm5wV2RsWXdXbmRTTVhCR1QxWk9hVk5GU2twWGJGWnJVakpLU0ZK > > dVNsTldSVlU1 > > > > Just copy-paste onto one line of your browser. > > > > Belden, srand()'ing Oakland.pm since the very > > beginning! > > > > _______________________________________________ > > Oakland mailing list > > Oakland@pm.org > > http://mail.pm.org/mailman/listinfo/oakland > > > > > ===== > Adrien Lamothe > www.adriensweb.com > > > > __________________________________ > Do you Yahoo!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland From alamozzz at yahoo.com Tue Feb 8 15:51:31 2005 From: alamozzz at yahoo.com (Adrien Lamothe) Date: Tue Feb 8 15:51:42 2005 Subject: [oak perl] New IBM/Sony/Toshiba microprocessor is good news for Perl In-Reply-To: <1107903677.17254.261.camel@ls104> Message-ID: <20050208235131.24198.qmail@web50202.mail.yahoo.com> Actually, it is more likely that the things that seem fast now will seem fast then and the things that seem slow now will seem fast then also, when comparing programs that are processor-bound. If a program is slow because it is I/O-bound (heavy reliance on disk files or other external data,) then it doesn't matter what language it is written in, it will perform slowly (although I/O bound programs that also crunch a lot of data will perform somewhat faster with a compiled language.) There are data storage breakthroughs on the horizon; when those occur then everything will run fast. So, the point is that when designing software it is important to develop an execution profile. You can then evaluate hardware, operating systems and languages to arrive at some expectation of performance. Faster hardware gives you a greater range of language (C, Perl, etc.) and/or virtual machine (Java, SmallTalk, etc.) options from which to choose; this allows you to choose an environment with constructs better suited to your application. A prime example of this is the web application server (such as Websphere, Weblogic, ATG Dynamo.) You can certainly develop a faster web site using Apache with mod_perl or some other language along with one of several databases, but achieving the functionality available with the web app servers will require a TON of work. Businesses chose to use the web app servers because the inherent functionality saves them from having to "reinvent the wheel," even though they take a performance hit. They speed up the slow performing app by using hardware clusters with huge amounts of RAM. Thus, they throw hardware at the problem. There are also cases where customers will purchase and use a software package they find too slow for their liking, because it is the only package sophisticated enough to meet the demands of the application space. I was involved in development of an integrated network management system that fell into this category. We used the fastest hardware available that supported our required software stack, short of Crays and 3090 mainframes, distributed the software across several computers, and the system was still slow. But, it got the job done and offered features not found in competing products. By the way, I just remembered that Sony was looking for Playstation developers a few years ago, and they wanted people with either Perl or Python. So it looks like Sony may already be using Perl (or Python) in the Playstation. -- Adrien --- Belden Lyman wrote: > Sure, and I understand all that. I'm not so > confident as you, > that's all. > > I think people's expectations of speed will also > increase tenfold. > The things that seem slow on my P3 will seem slow on > my Cell, and > the things that seem fast now will seem fast then. > > Belden > > On Tue, 2005-02-08 at 14:23, Adrien Lamothe wrote: > > Yes, a performance increase benefits all software. > > As I said, interpreted languages will always run > > slower than their compiled cousins. However, there > > is a "threshold" principle in effect that > determines > > whether a particular programming language or > > environment should be considered for a particular > > application. If using an interpreted language will > > result in an app that is too slow, then the > language > > should not be used. When an increase in hardware > > performance enables the same interpreted language > > to cross the threshold and perform acceptably, > then > > you can evaluate the interpreted language against > > compiled languages using criteria such as ease > > of use, useful programming constructs (such as > > powerful regular expression capability,) etc. > > Even though the compiled languages will still > perform > > faster, the interpreted language is now "good > enough" > > (and probably better than just "good enough"), > > which then gives the designer latitude to consider > > other factors. > > > > There is no doubt that the coming large > performance > > increases will result in better 3-D games and > > media (Toshiba plans to use the new processor in > > televisions.) This will at some point create a > > new wave in consumer electronics spending. > > People are always looking for better entertainment > > > and "eye candy." Languages like Perl may even > > find their way into the new high-performance > > entertainment appliances (Sony plans to use the > > new processor in Playstation-3.) These appliances > > are essentially general purpose computers with > > networking capability. Perl could be used for > > administrative tasks on these machines; probably > > not accessible to the users, but useful to the > > developers. > > > > -- Adrien > > > > > > --- Belden Lyman wrote: > > > > > On Tue, 2005-02-08 at 11:48, Adrien Lamothe > wrote: > > > > What does this have to do with Perl? Well, as > an > > > > interpreted language, Perl programs will > always > > > > run slower than their compiled cousins. > > > Interpreted > > > > languages always benefit from hardware speed > > > > increases. So, on this newer hardware, Perl > may > > > > be considered for tasks that it previously > wasn't. > > > > > > Why do you say "interpreted languages always > benefit > > > from > > > hardware speed increases"? Isn't an increase in > > > hardware > > > speed an across-the-board gain for all software > > > using that > > > hardware? > > > > > > I mean, sure, perl programs will run faster, but > > > they won't > > > run any faster in comparison to other programs. > > > > > > Personally, I hope that the increase in CPU > speed > > > allows > > > for better 3-d games and cooler special effects > in > > > films. > > > And perhaps better software testing. > > > > > > Did anyone see http://tinyurl.com/7yr6s in > Popular > > > Science > > > last month, which showed how inkjet printers are > > > doing some > > > very wierd things? (Like printing a cat heart: > no > > > kidding.) > > > > > > Next url also visits same site in case you don't > > > like tinyurl. > > > > > > > > > http://www.hugeurl.com/?OTdjN2M0NzQ0YjVlNjUzMzU0YWUzMjAwMDNl > > > > > > MGFjMzgmOSZWbTB3ZUdReFNYaGlSbVJZVjBkNFZWWXdaRzlYUmxsM1drWk9W > > > > > > VTFXY0hwWGEyTTFWakpLU0dWR1dsWmlXRkYzVmpCYVMyTXlTa1ZVYkhCWFZt > > > > > > eHdVVlp0TVhwbFJsbDVWR3RrV0dKR2NIQldNR1J2WlZaYWNsVnJaRnBXTURF > > > > > > MFYydG9SMVZ0U2tsUmJUbFZWbTFvUkZscVJtdFhSMUpJVW14d1YwMUVWWGRX > > > > > > YTJRd1ZqRlZlVk5yYUdoU2VteFdWbTE0WVUweFdsZFhiWFJYVFZaYWVWcEZX > > > > > > bXRVYkZwMVVXeHNWMkZyYTNoVmFrWmhWMFpPY21KR1NtbFdSM2hvVm1wQ2Ix > > > > > > RXhaRWRXYms1WVlsaFNjVlJXYUVOU2JGcFlUVmhrYUZac2NIcFpNRnAzVmpG > > > > > > WmVtRklXbUZTUlZwaFdsWmFUMk50U2tkVGJXaHNZbGhvYjFadE1ERmtNVXAw > > > > > > Vm01T2FsSldXbFJaYTFwM1l6RmFjVkp0UmxSU2JIQkpXbFZhVDFaWFNrZGpS > > > > > > bXhoVTBoQ1NGWnFTa1psVmxaWldrWndhR0V4Y0ZsV1YzQkhaREZLZEZKclpG > > > > > > aGlWM2h2VkZab1ExZEdXblJOV0dSVlRWWktNRlp0ZEd0aGJFcFhWMnhTV2xk > > > > > > SVFucFpNVnBUVmpGa2RGSnRlRmRpYTBwSVZtcEtlazVXV2xoVGEyUnBVa1p3 > > > > > > V0ZadGVFdFRSbHB4VW10MFUySkhVakZXTW5oclZqRktXVkZyYkZoWFNFSklW > > > > > > bFJLVDJNeVRrWmFSMmhUWWxkb1ZWWkdXbGRrTVd4WFYxaG9ZVkpGU205VVYz > > > > > > UnpUa1phV0dSSGRHaGlSWEF3V1ZWb1MxWnJNVWhWYkZKWFRVWndhRnBGWkU5 > > > > > > T2JFcDBaVVprYVZacmJ6RldiWEJLVFZkRmVGcEZaRlJpYTNCeFZXMHhORlpz > > > > > > VWxkWGEzUldVbXhzTTFZeU1VZGhhekZ5VGxWd1ZrMXVhSEpXVkVaTFYxWkdj > > > > > > MUZzYUdsU2JIQjVWbXRTUjFOdFZrZFhibFpWWWxWYVZGbHNaRzlXVmxwSFZX > > > > > > dDBhVTFXY0hwV01XaHZWMGRLV1ZWck9WWmlXRko2Vkd4YVlWSXlSa2hQVm1S > > > > > > cFZsaENTbGRXVm05VE1WcDBVMnRrVkdKSGFHRmFWM1JoWVVac05sSnNaR3Bp > > > > > > U0VKSVZrY3hjMVV3TUhsaFIyaFhUVlpLUkZacVFYaFNNV1J6VjJzMVdGSlVW > > > > > > bHBYVjNScllqRmtSMkpJVG1oU1ZUVlpWVzE0ZDAxR2NGWmFSRUpYVW14d2VW > > > > > > WXlOWE5YUjBWNVZXdG9WMVpGV2t4V2JYaHJWbFpHYzJGR1pGTldia0oyVm14 > > > > > > a2QxSXlSWGhhUldSV1ltdHdXVmxyVmt0WFJsSllUVmM1YTJKSFVucFhhMUpE > > > > > > VjJ4YVZWWnVjRmROYWxaTVZqQmtTMWRXVm5KUFZscHBWMGRvVFZaR1ZtRlpW > > > > > > bGw1VW10b2ExSnNXbkJWYlRWRFYxWmFWVk5xVWxKTlZtdzFWVEkxVjFWdFNu > > > > > > VlJiVVpWVm5wV2RsWXdXbmRTTVhCR1QxWk9hVk5GU2twWGJGWnJVakpLU0ZK > > > dVNsTldSVlU1 > > > > > > Just copy-paste onto one line of your browser. > > > > > > Belden, srand()'ing Oakland.pm since the very > > > beginning! > > > > > > _______________________________________________ > === message truncated === ===== Adrien Lamothe www.adriensweb.com __________________________________ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 From mark at bincomputing.com Wed Feb 9 11:00:16 2005 From: mark at bincomputing.com (Mark Bole) Date: Wed Feb 9 11:00:51 2005 Subject: [oak perl] ActiveState 5.8.6 In-Reply-To: <5.1.0.14.2.20050208135152.025c6590@pop.mail.yahoo.com> References: <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208135152.025c6590@pop.mail.yahoo.com> Message-ID: <420A5DC0.5010604@bincomputing.com> Sandy Santra wrote: > Thanks, Belden, I forgot about that other install program. > > But I'm concerned I don't meet this requirement: > > PerlScript: ActiveX scripting host such as IE 4.0+, or Windows > Scripting Host > > I don't have IE on the Win95 machine I'm installing it on. > > At 10:37 AM 2/8/05 -0800, you wrote: > >> On Tue, 2005-02-08 at 10:02, Sandy Santra wrote: >> > I'm trying to install ActiveState 5.8.6 Perl on a Win95 machine, >> but the >> > installation stops and says "Windows Scripting Host" isn't present. >> > >> [...] > You might be better off using a Perl that is contemporaneous with Win95. I have a zip install file of the following version (quoted below), if you are interested I can figure out a way to get it to you -- it's a little over 1 MB in size. The outfit "Hip Communications" which did this port for Microsoft appears to be long gone... http://www.harbour.sfu.ca/~hayward/mpubpaper/part2/intro.html The distribution includes a 32-bit shell wrapper specifically to circumvent the problems with 16-bit COMMAND.COM under Win95. Somewhere in a backup directory I think I still even have a pure DOS version of Perl 4 from the early 90's, I think it was called "BigPerl" or something like that. > This is perl, version 5.001 > Unofficial patchlevel 1m. > Copyright 1987-1994, Larry Wall > Win32 port Copyright (c) 1995 Microsoft Corporation. All rights reserved. > Developed by hip communications inc., http://info.hip.com/info/ > Perl for Win32 Build 110 > Built Aug 13 1996@08:18:50 -- Mark Bole http://www.bincomputing.com From mark at bincomputing.com Wed Feb 9 11:21:02 2005 From: mark at bincomputing.com (Mark Bole) Date: Wed Feb 9 11:21:17 2005 Subject: [oak perl] most positive Wiki experience (software development) Message-ID: <420A629E.6010602@bincomputing.com> First I would like to thank the Oakland.pm for a very interesting evening yesterday at Connie's. I'm glad I came. Second, I am forwarding a link to a Wiki that in my limited experience is very good, but more importantly because it is on-topic for this group (programming, software development, etc). Maybe you've already seen it, maybe not. It appears to have extensive coverage of many of the good and bad things about Wiki's that were mentioned yesterday. http://c2.com/cgi/wiki?WelcomeVisitors One page in particular impressed me because it summarized almost everything I've learned in fifteen years of system administration experience, I wish I had written it myself. http://c2.com/cgi/wiki?SystemsAdministrationPractices -- Mark Bole http://www.bincomputing.com From santranyc at yahoo.com Wed Feb 9 13:04:39 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Wed Feb 9 13:02:16 2005 Subject: [oak perl] ActiveState 5.8.6 In-Reply-To: <420A5DC0.5010604@bincomputing.com> References: <5.1.0.14.2.20050208135152.025c6590@pop.mail.yahoo.com> <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208125800.025900f0@pop.mail.yahoo.com> <5.1.0.14.2.20050208135152.025c6590@pop.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050209155613.025a7a40@pop.mail.yahoo.com> Thanks, Mark, for the offer. Sounds great! I think I'll try Indigo Perl first, though. Maybe it will install. I may not have a need for the laptop after all...my schedule may be changing soon, and I'll be able to study at home. --Sandy Santra From santranyc at yahoo.com Wed Feb 9 13:10:21 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Wed Feb 9 13:07:57 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <57500.63.192.200.250.1107828899.squirrel@63.192.200.250> References: <83a996de0502071721484a8649@mail.gmail.com> <20050205071344.F16C81776F@x6.develooper.com> <83a996de0502071721484a8649@mail.gmail.com> Message-ID: <5.1.0.14.2.20050209160933.046fd530@pop.mail.yahoo.com> Yes, this helps. Thanks, Jon. At 06:14 PM 2/7/05 -0800, you wrote: >This is absolutely the point -- you've got it. Now just generalize your >thinking about programs to include *large* programs... programs that have >many different subroutines to get the job done. What if you wanted a >simple counter (e.g., $i) to count things during a loop. If you couldn't >localize them, you'd have to use $i1 for the first subroutine, $i2 for the >second subroutine, and so on. With even a moderate-sized system, this can >get to be a real pain and the source of obtuse bugs. I know; a system that >I programmed in many years ago had exactly that problem... > >Don't think of a *coding* script as a linear affair... think of the >*execution* of the script as linear. If your code is executing in the main >routine, then calls subroutine-1, which calls subroutine-2, then that's >the "linearity" that is relevant... and which is what makes localized >variables so valuable. I need to learn how to change my (perceptual) thinking. This is all good. --Sandy Santra From santranyc at yahoo.com Wed Feb 9 13:13:48 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Wed Feb 9 13:11:45 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <83a996de0502071721484a8649@mail.gmail.com> References: <20050205071344.F16C81776F@x6.develooper.com> <20050205071344.F16C81776F@x6.develooper.com> Message-ID: <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> Thanks for the input on this stuff, Zed. At 05:21 PM 2/7/05 -0800, you wrote: > > But now I'm grappling with the *basic* idea of scoping: > > that you're cordoning off a part of your script with a scoped > > value so that a variable with an identical name elsewhere > > in the code is unaffected. > >It doesn't have much point for a very short script. It is immensely >pointful for anything longer, though. Right. Exactly! That's what I've been thinking. But now I'm "graduating" to larger scripts, so I need to start using "my". >You're thinking of event-driven programming here, for instance through >signals. But it's as deterministic as any other programming, just more >complicated. Lexically scoped variables are no more or less relevant >in this case than for any other complicated program. More complicated, yes. But I need to be able to enlarge my thinking so I can grasp more complicated programming models. I can't believe I'm still having a hard time "getting" object-oriented programming. So many people are programming Java! It's all about learning better. --Sandy Santra From blyman at iii.com Wed Feb 9 13:47:44 2005 From: blyman at iii.com (Belden Lyman) Date: Wed Feb 9 13:47:12 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> References: <20050205071344.F16C81776F@x6.develooper.com> <20050205071344.F16C81776F@x6.develooper.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> Message-ID: <1107985664.17254.324.camel@ls104> On Wed, 2005-02-09 at 13:13, Sandy Santra wrote: > More complicated, yes. But I need to be able to enlarge my thinking so I > can grasp more complicated programming models. I can't believe I'm still > having a hard time "getting" object-oriented programming. So many people > are programming Java! Be fair to yourself. If you haven't come from a CS background and are trying to teach yourself about objects, you'll need some time. I'm speaking from experience. In my experience, objects aren't a hard subject to understand; there's a mental trick that you need to learn. Part of getting the trick is to read the right things. perlobj, perltoot, and perltooc were the only things I knew about when trying to understand objects. They all went over my head, and each time I set out on the "I'm gonna learn objects today" trip, I quit reading them because they're so dense. Pity, since the very end of perltoot says: perlboot is a kinder, gentler introduction to object-oriented programming. perlboot made things click for me. Give it a try. Work through the examples. Play with your own changes. You should also learn about references, particularly what this stuff does: my %hash = ( foo => 1, bar => 2 ); my $href = \%hash; print $href->{foo}, "\n" ; When you get to be writing your own perl objects, you'll be using the arrow operator (->) a lot. Belden From lcurrie at calacademy.org Wed Feb 9 16:32:40 2005 From: lcurrie at calacademy.org (Currie, Larry) Date: Wed Feb 9 16:33:00 2005 Subject: [oak perl] most positive Wiki experience (software development) Message-ID: <5027040EA94EBB45AA7FE51E2E84DCF1033DEC@yoshi.calacademy.org> Another example of a wiki that people may want to take a look at is this one for the Koha open-source library system: http://www.saas.nsw.edu.au/koha_wiki/index.php (look near the bottom of the page) Larry Currie -----Original Message----- From: oakland-bounces@pm.org [mailto:oakland-bounces@pm.org] On Behalf Of Mark Bole Sent: Wednesday, February 09, 2005 11:21 AM To: Oakland Perl Mongers Subject: [oak perl] most positive Wiki experience (software development) First I would like to thank the Oakland.pm for a very interesting evening yesterday at Connie's. I'm glad I came. Second, I am forwarding a link to a Wiki that in my limited experience is very good, but more importantly because it is on-topic for this group (programming, software development, etc). Maybe you've already seen it, maybe not. It appears to have extensive coverage of many of the good and bad things about Wiki's that were mentioned yesterday. http://c2.com/cgi/wiki?WelcomeVisitors One page in particular impressed me because it summarized almost everything I've learned in fifteen years of system administration experience, I wish I had written it myself. http://c2.com/cgi/wiki?SystemsAdministrationPractices -- Mark Bole http://www.bincomputing.com _______________________________________________ Oakland mailing list Oakland@pm.org http://mail.pm.org/mailman/listinfo/oakland From mtheo at amural.com Thu Feb 10 00:25:12 2005 From: mtheo at amural.com (Mark Theodoropoulos) Date: Thu Feb 10 00:25:24 2005 Subject: [oak perl] Corrected reference + Maypole question Message-ID: <6.2.0.14.0.20050209235806.035df3e0@localhost> Those at the meeting who were puzzled by my reference to the "screencasting" article mentioned "in George's latest posting" to the list were quite correct: it wasn't in a posting to oakland.pm, by George or anyone else, but rather in the latest O'Reilly Network Newsletter. The eight-minute "movie" is quite a delight, especially since it inadvertently proves a point or two in my rant. ;) Here's the blurb & link: ------------------------------------------------------------------- Heavy Metal Umlaut: The Making of the Movie Jon Udell explains the process of making a documentary screencast, taking a look at the various screencast genres and examining the potential significance of this medium. http://www.oreillynet.com/pub/a/network/2005/02/07/primetime.html ------------------------------------------------------------------- Unrelated, has anyone played with Maypole? Has anyone actually used it for any kind of production system and lived to tell the tale? Finally, *completely* unrelated, and only of interest to a small subset of those who suffered a certain notorious almost-lightning talk last year, my wife & I were in LA over the weekend, and spent Saturday afternoon visiting with Larry & Annie Schoenberg, son and daughter-in-law of Arnold. I can now confirm from personal experience my contention that Arnie's children show no signs of having been raised by a madman. I can also report that there is something distinctly surreal about zipping down to a Pacific Palisades burger joint in a Prius piloted by a mischiefmaking former HS math teacher whose Dad was (a) the most influential composer of the last century and (b) born in 1874. Enjoyed the presentations, conversation, and new faces. MT -- producer / classics without walls the anti-warhorse zone / www.amural.com kusf 90.3fm / san francisco From santranyc at yahoo.com Thu Feb 10 05:16:16 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Thu Feb 10 05:14:17 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <1107985664.17254.324.camel@ls104> References: <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <20050205071344.F16C81776F@x6.develooper.com> <20050205071344.F16C81776F@x6.develooper.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050210081459.041f2540@pop.mail.yahoo.com> Thanks for the rap on objects, Belden. Where/what is perlboot? Website? Man page? How can I access it? --Sandy Santra From jseidel at edpci.com Thu Feb 10 07:03:30 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Thu Feb 10 07:03:49 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <5.1.0.14.2.20050210081459.041f2540@pop.mail.yahoo.com> References: <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <20050205071344.F16C81776F@x6.develooper.com> <20050205071344.F16C81776F@x6.develooper.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <5.1.0.14.2.20050210081459.041f2540@pop.mail.yahoo.com> Message-ID: <63262.63.192.200.250.1108047810.squirrel@63.192.200.250> Sandy... Try 'perldoc' -- it should have been installed with your perl system; it's my favorite approach to getting information about perl stuff. Try: perldoc perldoc for information about perldoc itself, and: perldoc perlboot for the specific information you're looking for. I particularly like the "perldoc -f " option, which gives you documentation about specific functions... keeps me from having to dig out my perl book when I forget the details. ...jon > Thanks for the rap on objects, Belden. > > Where/what is perlboot? Website? Man page? How can I access it? > > > --Sandy Santra > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Connecting Business and Technology Jon Seidel, CMC +1-510-530-6314 EDP Consulting, Inc. www.edpci.com CMC (Certified Management Consultant) is a certification mark awarded by the Institute of Management Consultants USA and represents evidence of the highest standards of consulting and adherence to the ethical canons of the profession. Less than 1% of all consultants have achieved this level of performance. See www.imcusa.org/hireacmc.acgi. From blyman at iii.com Thu Feb 10 07:18:30 2005 From: blyman at iii.com (Belden Lyman) Date: Thu Feb 10 07:18:16 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <5.1.0.14.2.20050210081459.041f2540@pop.mail.yahoo.com> References: <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <20050205071344.F16C81776F@x6.develooper.com> <20050205071344.F16C81776F@x6.develooper.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <5.1.0.14.2.20050210081459.041f2540@pop.mail.yahoo.com> Message-ID: <1108048710.31881.6.camel@ls104> On Thu, 2005-02-10 at 05:16, Sandy Santra wrote: > Thanks for the rap on objects, Belden. > > Where/what is perlboot? Website? Man page? How can I access it? Sorry - as Jon clarified, these are available using 'perldoc' to find and read the documents. If you like web-based documentation, then http://www.perldoc.com has good mark up. You can also visit search.cpan.org for perldocs: http://search.cpan.org/perldoc?perlboot hth and sorry for being vague :) Belden From mruggiero at formfactor.com Thu Feb 10 09:20:25 2005 From: mruggiero at formfactor.com (Michael Ruggiero) Date: Thu Feb 10 09:20:34 2005 Subject: [oak perl] Mastering Algorithms with Perl Message-ID: <81E9E591B71B614888AB1E1D923DA385032C698E@EMAIL.formfactor.com> Has anyone read/used "Mastering Algorithms with Perl"? http://www.oreilly.com/catalog/maperl/ I don't come from an engineering background, and I'm interested in getting some more CS chops via my love for Perl. - Michael From david at fetter.org Thu Feb 10 09:30:19 2005 From: david at fetter.org (David Fetter) Date: Thu Feb 10 09:30:35 2005 Subject: [oak perl] Mastering Algorithms with Perl In-Reply-To: <81E9E591B71B614888AB1E1D923DA385032C698E@EMAIL.formfactor.com> References: <81E9E591B71B614888AB1E1D923DA385032C698E@EMAIL.formfactor.com> Message-ID: <20050210173019.GD22824@fetter.org> On Thu, Feb 10, 2005 at 09:20:25AM -0800, Michael Ruggiero wrote: > Has anyone read/used "Mastering Algorithms with Perl"? > > http://www.oreilly.com/catalog/maperl/ > > I don't come from an engineering background, and I'm interested in > getting some more CS chops via my love for Perl. I have a copy right here. It's not bad, but studying algorithms on their own is a very rarefied intellectual persuit. Until, of course, you discover that the one you're using for the task at hand is O(n!) and you need one that's O(n) ;) Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From kester at gmail.com Thu Feb 10 10:12:14 2005 From: kester at gmail.com (Kester Allen) Date: Thu Feb 10 10:12:23 2005 Subject: [oak perl] Mastering Algorithms with Perl In-Reply-To: <81E9E591B71B614888AB1E1D923DA385032C698E@EMAIL.formfactor.com> References: <81E9E591B71B614888AB1E1D923DA385032C698E@EMAIL.formfactor.com> Message-ID: <55adb319050210101213e63aaa@mail.gmail.com> Good book. I found it to be pretty useful for showing how to implement different algorithms in Perl. Similarly to what David said, it didn't get me a very deep understanding of the algorithms involved-- I'd classify it as a good companion to the Perl Cookbook, and a decent introduction to algorithms. On Thu, 10 Feb 2005 09:20:25 -0800, Michael Ruggiero wrote: > Has anyone read/used "Mastering Algorithms with Perl"? > > http://www.oreilly.com/catalog/maperl/ > > I don't come from an engineering background, and I'm interested in getting some more CS chops via my love for Perl. > > - Michael > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > From david at fetter.org Thu Feb 10 10:33:43 2005 From: david at fetter.org (David Fetter) Date: Thu Feb 10 10:33:52 2005 Subject: [oak perl] Mastering Algorithms with Perl In-Reply-To: <55adb319050210101213e63aaa@mail.gmail.com> References: <81E9E591B71B614888AB1E1D923DA385032C698E@EMAIL.formfactor.com> <55adb319050210101213e63aaa@mail.gmail.com> Message-ID: <20050210183343.GF22824@fetter.org> On Thu, Feb 10, 2005 at 10:12:14AM -0800, Kester Allen wrote: > Good book. I found it to be pretty useful for showing how to > implement different algorithms in Perl. Similarly to what David > said, it didn't get me a very deep understanding of the algorithms > involved--I'd classify it as a good companion to the Perl Cookbook, > and a decent introduction to algorithms. Not to say that a "deep understanding" is always--or even often--required. For a "deep understanding" (and a grand waste of your valuable time) you can get Knuth's 3-volume set, "The Art of Computer Programming," although you would probably be better off with "Introduction to Algorithms" by Cormen, Rivest & Leiserson. The latter is also cheaper (~$80 new). HTH :) Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From zed.lopez at gmail.com Thu Feb 10 14:14:19 2005 From: zed.lopez at gmail.com (Zed Lopez) Date: Thu Feb 10 14:15:32 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> References: <20050205071344.F16C81776F@x6.develooper.com> <83a996de0502071721484a8649@mail.gmail.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> Message-ID: <83a996de050210141449ebf719@mail.gmail.com> > More complicated, yes. But I need to be able to enlarge my thinking so I > can grasp more complicated programming models. I can't believe I'm still > having a hard time "getting" object-oriented programming. So many people > are programming Java! It is a leap to "get" OOP... it's a fundamentally different way of looking at programming, as being a matter of passing messages among objects instead of passing data among procedures. "A Little Ruby, a Lot of Objects" at http://www.visibleworkings.com/little-ruby/ is a pretty good introduction to thinking in these terms (it's Ruby-based, but it's more about OOP with Ruby for examples than about Ruby.) A lot of Perl guides to OOP suffer from an emphasis on _how_ one implements OOP in Perl without much content on how to think in terms of OOP or why it's valuable. And something that's easy to miss in guides on implementing OOP in a given language is that OOP is a part of a larger methodology of problem analysis, specification and design, not just an implementation technique. (I missed this for a long time.) Finally, Perl's OOP implementation is kind of clunky -- the programmer has to think about a lot of low-level details to do things right than s/he would in other languages. This doesn't exactly help the OOP beginner to get it. (And while there are lots of people programming Java, I'd be willing to bet that a large number don't really get OOP, and are thinking procedurally and writing bad Java.) From jseidel at edpci.com Thu Feb 10 20:02:48 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Thu Feb 10 20:03:04 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <83a996de050210141449ebf719@mail.gmail.com> References: <20050205071344.F16C81776F@x6.develooper.com> <83a996de0502071721484a8649@mail.gmail.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <83a996de050210141449ebf719@mail.gmail.com> Message-ID: <64593.63.192.200.250.1108094568.squirrel@63.192.200.250> Sandy... A book that I found very useful when learning about OOP is "Object-Oriented Programming" by Damian Conway. The introductory chapters are very good, IMO, and then he goes into some very specific, detailed implementations of OO, starting small and then moving up. http://www.amazon.com/exec/obidos/ASIN/1884777791/104-6663660-8107124 However, he uses some very complicated (to me, anyway) constructs in the later chapters that I really had to pore over... his indirection, for one thing. Also, he uses at least one experimental feature that is no longer in the language (a Perl 5 thing about "hashed arrays"... I can't recall the precise name), so that's an issue. But I think it's an excellent text that can get you as deep as you want. It just may have more than you want at this point. ...jon > It is a leap to "get" OOP... it's a fundamentally different way of > looking at programming, as being a matter of passing messages among > objects instead of passing data among procedures. > > "A Little Ruby, a Lot of Objects" at > > http://www.visibleworkings.com/little-ruby/ > > is a pretty good introduction to thinking in these terms (it's > Ruby-based, but it's more about OOP with Ruby for examples than about > Ruby.) > From david at fetter.org Thu Feb 10 20:25:15 2005 From: david at fetter.org (David Fetter) Date: Thu Feb 10 20:25:36 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <64593.63.192.200.250.1108094568.squirrel@63.192.200.250> References: <20050205071344.F16C81776F@x6.develooper.com> <83a996de0502071721484a8649@mail.gmail.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <83a996de050210141449ebf719@mail.gmail.com> <64593.63.192.200.250.1108094568.squirrel@63.192.200.250> Message-ID: <20050211042515.GE6218@fetter.org> On Thu, Feb 10, 2005 at 08:02:48PM -0800, Jon Seidel, CMC wrote: > Sandy... > > A book that I found very useful when learning about OOP is > "Object-Oriented Programming" by Damian Conway. The introductory > chapters are very good, IMO, and then he goes into some very > specific, detailed implementations of OO, starting small and then > moving up. > > http://www.amazon.com/exec/obidos/ASIN/1884777791/104-6663660-8107124 > > However, he uses some very complicated (to me, anyway) constructs in > the later chapters that I really had to pore over... his > indirection, for one thing. To me, a lot of what's in the later chapters (and some of the earlier ones) bespeaks a fundamental misunderstanding of relational database management systems. They are *not* dumb data stores, and if you treat them as though they are, you get yourself in boiling hot water. > Also, he uses at least one experimental feature that is no longer in > the language (a Perl 5 thing about "hashed arrays"... I can't recall > the precise name), so that's an issue. "Pseudo-hashes," if I recall correctly. > But I think it's an excellent text that can get you as deep as you > want. It just may have more than you want at this point. I'd say get a good look at the parts where he doesn't touch things in persistent stores, 'cause brilliant as Damian is--he's been excluded from some Perl programming contests because he was sweeping them every time--he doesn't appear to get how they work. Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From santranyc at yahoo.com Thu Feb 10 22:21:42 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Thu Feb 10 22:19:37 2005 Subject: [oak perl] Perlboot; "Woops! Wrong animal!" Message-ID: Belden Lyman wrote: >If you haven't come from a CS background and are trying to teach yourself >about objects, you'll need some time. I'm speaking from experience. Wise words, indeed. This has been my experience... I had to back out of learning Java and return to Perl because I couldn't wrap my mind around objects (yet). > perlboot is a kinder, gentler introduction to object-oriente > programming. >perlboot made things click for me. Give it a try. Work through >the examples. Play with your own changes. "Play with your own examples"--indeed, I was just realizing today how much fun coding is for me. It really is play. Thanks for the perlboot tip. I'm reading perlboot this evening. I have not studied references and packages yet, so much of this is over my head. But the beginning is very instructive. And as far as I can tell, the Llama book doesn't address these parts of Perl. (You may have thought my skill level was more advanced, since I had thought I was reading the Camel book--until just now, when I stared at the cover and thought, "Wait--there's no hump!") The comfortable, humpless animal is for beginners, natch. Then graduates have to wrestle a hump..but get a faster, sturdier beast in exchange. So thanks for the perlboot tip. It made me dig into my IndigoPerl directory and find all sorts of reference materials. --Sandy From jseidel at edpci.com Fri Feb 11 06:14:08 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Fri Feb 11 06:14:18 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <20050211042515.GE6218@fetter.org> References: <20050205071344.F16C81776F@x6.develooper.com> <83a996de0502071721484a8649@mail.gmail.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <83a996de050210141449ebf719@mail.gmail.com> <64593.63.192.200.250.1108094568.squirrel@63.192.200.250> <20050211042515.GE6218@fetter.org> Message-ID: <65382.63.192.200.250.1108131248.squirrel@63.192.200.250> David... > To me, a lot of what's in the later chapters (and some of the earlier > ones) bespeaks a fundamental misunderstanding of relational database > management systems. They are *not* dumb data stores, and if you treat > them as though they are, you get yourself in boiling hot water. I missed that issue... thanks for pointing it out! ...jon From dbkliv at gmail.com Fri Feb 11 08:41:59 2005 From: dbkliv at gmail.com (dbkliv) Date: Fri Feb 11 08:42:15 2005 Subject: [oak perl] Lexical vs. Package variables In-Reply-To: <83a996de050210141449ebf719@mail.gmail.com> References: <20050205071344.F16C81776F@x6.develooper.com> <83a996de0502071721484a8649@mail.gmail.com> <5.1.0.14.2.20050209161131.0258f170@pop.mail.yahoo.com> <83a996de050210141449ebf719@mail.gmail.com> Message-ID: On Thu, 10 Feb 2005 14:14:19 -0800, Zed Lopez wrote: I was hoping Zed would chime in on this. > > It is a leap to "get" OOP... it's a fundamentally different way of > looking at programming, as being a matter of passing messages among > objects instead of passing data among procedures. That's a great explanation. > > "A Little Ruby, a Lot of Objects" at > > http://www.visibleworkings.com/little-ruby/ > > is a pretty good introduction to thinking in these terms (it's > Ruby-based, but it's more about OOP with Ruby for examples than about > Ruby.) > Also, Ruby isn't a scary leap for Perl programmers. > A lot of Perl guides to OOP suffer from an emphasis on _how_ one > implements OOP in Perl without much content on how to think in terms > of OOP or why it's valuable. Yes, excellent point. Tying threads together: istr the first 2 chapters of Conway's book gave a forest perspective before leaping into the trees. The "slice" example from the Golfer, Chef, and Ninja classes was particularly illuminating for me, as was the truck example for inheritance. > > And something that's easy to miss in guides on implementing OOP in a > given language is that OOP is a part of a larger methodology of > problem analysis, specification and design, not just an implementation > technique. (I missed this for a long time.) > > Finally, Perl's OOP implementation is kind of clunky -- the programmer > has to think about a lot of low-level details to do things right than > s/he would in other languages. This doesn't exactly help the OOP > beginner to get it. Yeah. The clunkiness that Zed's referring to here is that in Perl, the programmer has to "find" the object that's being used. The nice thing about learning OOP using Perl is that you really do have to do a lot of things yourself. When you move to other languages, and you don't have to do those things - well, you understand what has already happened for you. > > (And while there are lots of people programming Java, I'd be willing > to bet that a large number don't really get OOP, and are thinking > procedurally and writing bad Java.) Agreed. Zed++ Belden From mark at bincomputing.com Sun Feb 13 17:54:18 2005 From: mark at bincomputing.com (Mark Bole) Date: Sun Feb 13 17:54:29 2005 Subject: [oak perl] template toolkit recommendations? Message-ID: <421004CA.7050303@bincomputing.com> Anyone with experience to share using the Template Toolkit module for something other than HTML pages? http://www.perl.com/pub/a/2001/01/tt2.html http://cpan.uwinnipeg.ca/dist/Template-Toolkit I ask because I have custody of a hoary script for generating configuration files for software installations under Unix/Linux -- which matches my definition of a template-ish activity -- but I can't find clearly equivalent functionality when searching CPAN. So, I want to make sure I'm not overlooking something that is already available. Examples would be Oracle init scripts, iPlanet or Apache config scripts, Weblogic/Tomcat config scripts, and so on...any kind of text config file (including XML files) that is a variation on "name = value", and which needs to by copied out consistently to a number of servers with (typically) a handful of values which are unique to each target server, and all the other values are the same on each target server (a.k.a. site-wide defaults), based on the template. I can give an example if it would help.... -- Mark Bole http://www.bincomputing.com From bob.goolsby at gmail.com Mon Feb 14 10:54:16 2005 From: bob.goolsby at gmail.com (Bob goolsby) Date: Mon Feb 14 10:54:28 2005 Subject: [oak perl] template toolkit recommendations? In-Reply-To: <421004CA.7050303@bincomputing.com> References: <421004CA.7050303@bincomputing.com> Message-ID: <1a208dd05021410546ccaa018@mail.gmail.com> Take a look at the modules in the Config:: space. As I recall, Config::Tiny is designed to handle key=value init files. That might be a bit easier than trying co coerce TT into doing what you want. That said, the Badger book is a most useful resource on things Template-ish. Bob G On Sun, 13 Feb 2005 17:54:18 -0800, Mark Bole wrote: > Anyone with experience to share using the Template Toolkit module for > something other than HTML pages? > > http://www.perl.com/pub/a/2001/01/tt2.html > http://cpan.uwinnipeg.ca/dist/Template-Toolkit > > I ask because I have custody of a hoary script for generating > configuration files for software installations under Unix/Linux -- which > matches my definition of a template-ish activity -- but I can't find > clearly equivalent functionality when searching CPAN. So, I want to make > sure I'm not overlooking something that is already available. > > Examples would be Oracle init scripts, iPlanet or Apache config scripts, > Weblogic/Tomcat config scripts, and so on...any kind of text config file > (including XML files) that is a variation on "name = value", and which > needs to by copied out consistently to a number of servers with > (typically) a handful of values which are unique to each target server, > and all the other values are the same on each target server (a.k.a. > site-wide defaults), based on the template. > > I can give an example if it would help.... > > -- > Mark Bole > http://www.bincomputing.com > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > From p at patrick.net Mon Feb 14 14:10:24 2005 From: p at patrick.net (Patrick Killelea) Date: Mon Feb 14 14:13:07 2005 Subject: [oak perl] HTML::Embperl vs HTML::Mason In-Reply-To: <200502011221.58705.george@metaart.org> References: <200502011221.58705.george@metaart.org> Message-ID: <421121D0.4010008@patrick.net> Hello Perlmongers, I'm about to start work on a new website and I need all the usual stuff: form handling session tracking page templates From a bit of research, I see I can do this with either HTML::Embperl, which does sessions, or with Apache::Session + HTML::Mason (Mason doesn't do sessions itself). I did a quick Google search on each and see these hits: 24500 HTML::Embperl 52400 HTML::Mason Maybe Mason is much more popular, but I really need the session tracking for logins. Which do you think is better? Or is there some other perl+Apache option for all this? If you don't want to mail the list, you can just mail me personally at p@patrick.net. Thanks for any advice. Patrick From david at fetter.org Mon Feb 14 16:07:57 2005 From: david at fetter.org (David Fetter) Date: Mon Feb 14 16:08:07 2005 Subject: [oak perl] HTML::Embperl vs HTML::Mason In-Reply-To: <421121D0.4010008@patrick.net> References: <200502011221.58705.george@metaart.org> <421121D0.4010008@patrick.net> Message-ID: <20050215000757.GM4129@fetter.org> On Mon, Feb 14, 2005 at 02:10:24PM -0800, Patrick Killelea wrote: > Hello Perlmongers, > I'm about to start work on a new website and I need all the usual stuff: > > form handling > session tracking > page templates > > From a bit of research, I see I can do this with either HTML::Embperl, > which does sessions, or with Apache::Session + HTML::Mason (Mason > doesn't do sessions itself). > > I did a quick Google search on each and see these hits: > > 24500 HTML::Embperl > 52400 HTML::Mason > > Maybe Mason is much more popular, but I really need the session tracking > for logins. Which do you think is better? Or is there some other > perl+Apache option for all this? Just MNSHO here, but it seems to me that HTML::Mason actively discourages people from keeping their presentation logic separate from their business logic. To me, this is a Bad Thing(TM). In re: session tracking, I suppose it depends on just what kind of session tracking you'd like to do. A thing called memcached can help scale session tracking to something gigantic. http://www.danga.com/memcached/ You might consider Template::Toolkit, too. http://template-toolkit.org/ Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From jseidel at edpci.com Mon Feb 14 19:02:28 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Mon Feb 14 19:02:37 2005 Subject: [oak perl] HTML::Embperl vs HTML::Mason In-Reply-To: <421121D0.4010008@patrick.net> References: <200502011221.58705.george@metaart.org> <421121D0.4010008@patrick.net> Message-ID: <56956.63.192.200.250.1108436548.squirrel@63.192.200.250> You might also look at CGI::Application. There is quite a bit of activity & new development and an active mailing list at cgiapp@lists.erlbaum.net. I've used it for some simple stuff and like it very much. It's combined with HTML::Template, and can use CGI::Session and also has Session builtin (CGI::Application::Session, I believe). It's on CPAN. ...jon > Hello Perlmongers, > I'm about to start work on a new website and I need all the usual stuff: > > form handling > session tracking > page templates > > From a bit of research, I see I can do this with either HTML::Embperl, > which does sessions, or with Apache::Session + HTML::Mason (Mason > doesn't do sessions itself). > > I did a quick Google search on each and see these hits: > > 24500 HTML::Embperl > 52400 HTML::Mason > > Maybe Mason is much more popular, but I really need the session tracking > for logins. Which do you think is better? Or is there some other > perl+Apache option for all this? > > If you don't want to mail the list, you can just mail me personally at > p@patrick.net. > > Thanks for any advice. > > Patrick > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Connecting Business and Technology Jon Seidel, CMC +1-510-530-6314 EDP Consulting, Inc. www.edpci.com CMC (Certified Management Consultant) is a certification mark awarded by the Institute of Management Consultants USA and represents evidence of the highest standards of consulting and adherence to the ethical canons of the profession. Less than 1% of all consultants have achieved this level of performance. See www.imcusa.org/hireacmc.acgi. From jseidel at edpci.com Mon Feb 14 19:02:28 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Mon Feb 14 19:02:42 2005 Subject: [oak perl] HTML::Embperl vs HTML::Mason In-Reply-To: <421121D0.4010008@patrick.net> References: <200502011221.58705.george@metaart.org> <421121D0.4010008@patrick.net> Message-ID: <56956.63.192.200.250.1108436548.squirrel@63.192.200.250> You might also look at CGI::Application. There is quite a bit of activity & new development and an active mailing list at cgiapp@lists.erlbaum.net. I've used it for some simple stuff and like it very much. It's combined with HTML::Template, and can use CGI::Session and also has Session builtin (CGI::Application::Session, I believe). It's on CPAN. ...jon > Hello Perlmongers, > I'm about to start work on a new website and I need all the usual stuff: > > form handling > session tracking > page templates > > From a bit of research, I see I can do this with either HTML::Embperl, > which does sessions, or with Apache::Session + HTML::Mason (Mason > doesn't do sessions itself). > > I did a quick Google search on each and see these hits: > > 24500 HTML::Embperl > 52400 HTML::Mason > > Maybe Mason is much more popular, but I really need the session tracking > for logins. Which do you think is better? Or is there some other > perl+Apache option for all this? > > If you don't want to mail the list, you can just mail me personally at > p@patrick.net. > > Thanks for any advice. > > Patrick > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Connecting Business and Technology Jon Seidel, CMC +1-510-530-6314 EDP Consulting, Inc. www.edpci.com CMC (Certified Management Consultant) is a certification mark awarded by the Institute of Management Consultants USA and represents evidence of the highest standards of consulting and adherence to the ethical canons of the profession. Less than 1% of all consultants have achieved this level of performance. See www.imcusa.org/hireacmc.acgi. From george at metaart.org Tue Feb 15 12:16:16 2005 From: george at metaart.org (George Woolley) Date: Tue Feb 15 11:58:31 2005 Subject: [oak perl] Reminder: The Oakland.pm site has moved. Message-ID: <200502151216.16296.george@metaart.org> The site is now at http://www.metaart.org/opug/ -- George P.S. I send this reminder because I've received two different queries recently that presuposed the site had not moved. It seems likely that there are others who didn't get the word. (See the January 2 post with the subject "Oakland.pm website has moved".) From oaklandpm at eli.users.panix.com Tue Feb 15 12:57:22 2005 From: oaklandpm at eli.users.panix.com (Benjamin Elijah Griffin) Date: Tue Feb 15 12:58:08 2005 Subject: [oak perl] resend with funny reason In-Reply-To: <20050208194808.31743.qmail@web50207.mail.yahoo.com> Message-ID: Last week I tried to post the following. Today I should be able to.[4] Adrien Lamothe wrote: > What does this have to do with Perl? Well, as an interpreted language, > Perl programs will always run slower than their compiled cousins. > Interpreted languages always benefit from hardware speed increases. So, > on this newer hardware, Perl may be considered for tasks that it > previously wasn't. I've written a couple of scripts using my Image::PBMLib[0] module and I always find them damn slow. I wrote some steganography tools[0] using that to verify an example steganographic image[1]. Then I modified pamarith.c from NetPBM[2] to have logic operators. The C version is easily a hundred times faster. The last few pbm tools I've written I've done by modifying an existing C utility without the perl prototype first.[3] Of course, my Image::PBMLib API doesn't lend itself to speedy code. Elijah ------ [0] http://www.cpan.org/modules/by-authors/id/E/EL/ELIJAH/ [1] http://en.wikipedia.org/wiki/Steganography [2] http://netpbm.sourceforge.net/ My patches have been submitted and acknowledged, but not yet incorporated into a release. [3] http://www.panix.com/~eli/jpeg/cmyk.html Not yet submitted to NetPBM. Those created for this: http://www.panix.com/~eli/jpeg/ [4] Quote staff at panix: : > I just found this in my mail: : > : > > Content-Description: Delivery report : > > Content-Type: message/delivery-status : > > : > > Reporting-MTA: dns; l2mail1.panix.com : > > X-Postfix-Queue-ID: 6BDC3127F6 : > > X-Postfix-Sender: rfc822; eli@panix.com : > > Arrival-Date: Tue, 8 Feb 2005 15:30:26 -0500 (EST) : > > : > > Final-Recipient: rfc822; oakland@pm.org : > > Action: failed : > > Status: 4.0.0 : > > Diagnostic-Code: X-Postfix; connect to mailhost.panix.com[166.84.1.74]: : > > Connection refused : > : > : > It looks like my message didn't go out because l2mail1.panix.com : > couldn't make a connection to mailhost.panix.com. That seems : > very odd. : : Weird; glad you pointed this out. A zillion years ago we were : authoritative for pm.org. Somehow, there were remnants of that : data hanging around. The result was that we thought we were : doing secondary MX for them. : : For whatever reason, we couldn't get to pm.org when you sent : your mail, so it went to our relay server (l2mail1), which tried : a bit later. When l2mail1 found that it couldn't reach pm.org : it tried to get to our mailhost (remember, it thought we were : doing secondary MX). Now, we don't allow l2mail1 to hand mail to : our other mail servers because that could create a mail loop. : : Hence the message you received. : : We've cleared pm.org out of our zone files, which should prevent : this from happening again. From dbkliv at gmail.com Tue Feb 15 13:11:49 2005 From: dbkliv at gmail.com (dbkliv) Date: Tue Feb 15 13:11:58 2005 Subject: [oak perl] Reminder: The Oakland.pm site has moved. In-Reply-To: <200502151216.16296.george@metaart.org> References: <200502151216.16296.george@metaart.org> Message-ID: Can you quickly summarise the contents of the Jan 2 post? I'm a bit surprised that oakland.pm.org doesn't just redirect to the new website. Any reason for that? On Tue, 15 Feb 2005 12:16:16 -0800, George Woolley wrote: > The site is now at > http://www.metaart.org/opug/ > -- George > > P.S. I send this reminder because > I've received two different queries recently > that presuposed the site had not moved. > It seems likely that there are others > who didn't get the word. > (See the January 2 post with the subject > "Oakland.pm website has moved".) > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > From george at metaart.org Tue Feb 15 17:08:55 2005 From: george at metaart.org (George Woolley) Date: Tue Feb 15 16:51:14 2005 Subject: [oak perl] Reminder: The Oakland.pm site has moved. In-Reply-To: References: <200502151216.16296.george@metaart.org> Message-ID: <200502151708.55358.george@metaart.org> Belden, On Tuesday 15 February 2005 1:11 pm, dbkliv wrote: > Can you quickly summarise the contents of the Jan 2 post? Sure. The subject "Oakland.pm website has moved" was the main point. In addition the post indicated, among other things: * that Perl Mongers was going to move us to a different server. * that the capabilities offered on the new site would be less than on the old. * that the accessibility (for maintenance) would be more restricted. * that the site had not been accessible for maintenance since shortly after the last (December) meeting. The post is, of course, available in the archive should you (or anyone else) wish to read it. > > I'm a bit surprised that oakland.pm.org doesn't just redirect to > the new website. Any reason for that? Several, as best I can recall. One, rightly or wrongly, was that I had some concern about the effect on indexing by search engines. I considered at least three options back then, one of them being redirection using META. Is the solution I chose causing you (or anyone else) significant grief? If so, let me know and I'll think through this again. At the time, I thought the main thing was to get the site moved so I could maintain it. Skoal, George ================= > On Tue, 15 Feb 2005 12:16:16 -0800, George Woolley wrote: > > The site is now at > > http://www.metaart.org/opug/ > > -- George > > > > P.S. I send this reminder because > > I've received two different queries recently > > that presuposed the site had not moved. > > It seems likely that there are others > > who didn't get the word. > > (See the January 2 post with the subject > > "Oakland.pm website has moved".) From santranyc at yahoo.com Tue Feb 15 23:19:12 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Tue Feb 15 23:17:53 2005 Subject: [oak perl] file renaming script Message-ID: <5.1.0.14.2.20050216021007.025fe6f0@pop.mail.yahoo.com> I've used this script to rename directories on a Win98 machine. (Apologies in advance for not scoping my variables.) Is there a line of code or switch or something I can add that would make it *also* operate on every file within each directory it's processing? Thanks. ## find [text string] and delete it from all file and directory names in a directory chdir "c:/[directoryname]" or die "cannot chdir to that directory: $!"; foreach $file (glob "*") { $newfile = $file; $newfile =~ s/%2f/_/; if (-e $newfile) { ## warn "can't rename $file to $newfile: $newfile exists\n"; } elsif (rename $file, $newfile) { ## success, do nothing } else { warn "rename $file to $newfile failed: $!\n"; } } --Sandy Santra From mp at rawbw.com Wed Feb 16 07:13:52 2005 From: mp at rawbw.com (Michael Paoli) Date: Wed Feb 16 07:14:06 2005 Subject: [oak perl] file renaming script In-Reply-To: <5.1.0.14.2.20050216021007.025fe6f0@pop.mail.yahoo.com> References: <5.1.0.14.2.20050216021007.025fe6f0@pop.mail.yahoo.com> Message-ID: <1108566832.42136330877d2@webmail.rawbw.com> In a word: recursion E.g. you could create a subroutine which handles renaming items within a directory, where the directory is passed to the subroutine, and where the subroutine, upon encountering a directory within the directory passed to it, calls itself (recursion), passing that (sub-)directory information. This will also exercise your scoping skills a bit. :-) Quoting Sandy Santra : > I've used this script to rename directories on a Win98 machine. (Apologies > > in advance for not scoping my variables.) Is there a line of code or > switch or something I can add that would make it *also* operate on every > file within each directory it's processing? Thanks. > > ## find [text string] and delete it from all file and directory names in a > directory > > chdir "c:/[directoryname]" or die "cannot chdir to that directory: $!"; > foreach $file (glob "*") { > $newfile = $file; > $newfile =~ s/%2f/_/; > if (-e $newfile) { > ## warn "can't rename $file to $newfile: $newfile > exists\n"; > } elsif (rename $file, $newfile) { > ## success, do nothing > } else { > warn "rename $file to $newfile failed: $!\n"; > } > } From dbkliv at gmail.com Wed Feb 16 09:23:30 2005 From: dbkliv at gmail.com (dbkliv) Date: Wed Feb 16 09:23:55 2005 Subject: [oak perl] file renaming script In-Reply-To: <1108566832.42136330877d2@webmail.rawbw.com> References: <5.1.0.14.2.20050216021007.025fe6f0@pop.mail.yahoo.com> <1108566832.42136330877d2@webmail.rawbw.com> Message-ID: Writing (and debugging) your own directory recursor can be pretty fun, but if you just want something that works right away use File::Find. Here is untested code which shows roughly how you'd convert your existing program to use File::Find. I've added a prompting feature to this re-write. You can turn it off if you like, but I really suggest running the code once or twice before letting it run wild. When this runs, you should see something like this: in C:\Windows\Tmp, rename foo%f.txt to foo_.txt? (y/[n]) y in C:\Windows\Tmp, rename bar%f.txt to bar_.txt? (y/[n]) Hope this helps. Belden #!/usr/bin/perl use strict; use warnings; use constant DO_PROMPT => 1 ; use File::Find; my @directories = qw( c:\windows\tmp c:\tmp ) ; # or wherever find( \&my_rename, @directories ); sub my_rename { my $file = $_ ; # $_ set magically by File::Find, see docs my $newfile = $file; $newfile =~ s/%2f/_/; if ( DO_PROMPT ) { print "in $File::Find::dir, rename $file to $newfile? (y/[n]) "; chomp( my $answer = ); return if ! $answer; # no response, don't do anything return if $answer !~ /y/i ; # response isn't 'y', don't do anything } if (-e $newfile) { ## warn "can't rename $file to $newfile: $newfile exists\n"; } elsif (rename $file, $newfile) { ## success, do nothing } else { warn "rename $file to $newfile failed: $!\n"; } } On Wed, 16 Feb 2005 07:13:52 -0800, Michael Paoli wrote: > In a word: recursion > > E.g. you could create a subroutine which handles renaming items within > a directory, where the directory is passed to the subroutine, and where > the subroutine, upon encountering a directory within the directory > passed to it, calls itself (recursion), passing that (sub-)directory > information. This will also exercise your scoping skills a bit. :-) > > Quoting Sandy Santra : > > > I've used this script to rename directories on a Win98 machine. (Apologies > > > > in advance for not scoping my variables.) Is there a line of code or > > switch or something I can add that would make it *also* operate on every > > file within each directory it's processing? Thanks. > > > > ## find [text string] and delete it from all file and directory names in a > > directory > > > > chdir "c:/[directoryname]" or die "cannot chdir to that directory: $!"; > > foreach $file (glob "*") { > > $newfile = $file; > > $newfile =~ s/%2f/_/; > > if (-e $newfile) { > > ## warn "can't rename $file to $newfile: $newfile > > exists\n"; > > } elsif (rename $file, $newfile) { > > ## success, do nothing > > } else { > > warn "rename $file to $newfile failed: $!\n"; > > } > > } > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > From george at metaart.org Wed Feb 16 19:00:14 2005 From: george at metaart.org (George Woolley) Date: Wed Feb 16 18:42:22 2005 Subject: [oak perl] Mike has arrived in Panama! Message-ID: <200502161900.14751.george@metaart.org> If I understand correctly he's in Panama City now, but he'll soon be located at David, Chiriqui, RP. From santranyc at yahoo.com Thu Feb 17 23:33:53 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Thu Feb 17 23:31:36 2005 Subject: [oak perl] file::find vs. learning recursive subs Message-ID: Belden, that script was amazing--but way over my head. I didn't know about file::find, use constant, or the even the value of including a prompting feature for the file rename (duh!). So you've opened my eyes in a half dozen ways (yes, there were other eye-openers in your script)--thanks. I think for now I'm going to follow Michael Paoli's advice and do it the hard way, which will help me learn scoping and many other things. (Thanks, Michael! At first I balked at doing the work, but now I see the value.) Anyway, working with a looping sub is just about my speed right now. And, yeah, I'm a little disturbed that I can't find a simple command that queries a listing in a directory and tells me (automatically) whether something is a file or a directory, but maybe I'll write a loop for that, too. Tonight just working on refining my search matching pattern is making me happy. "s/%2f/_/" is not going to be enough, since sometimes the "%" is followed by completely different characters (other than "2f"); so my redraft is going to be "s/%(\w){2}/_/" or "s/%\w\w/_/" or maybe even something more elegant (hope, hope--have to test these). And of course I'll be adding the "g" at the end for multiple instances. Just the beginning, but fun! Thanks, all. --Sandy Santra From extasia at gmail.com Fri Feb 18 08:54:09 2005 From: extasia at gmail.com (David Alban) Date: Fri Feb 18 08:54:23 2005 Subject: [oak perl] file::find vs. learning recursive subs In-Reply-To: <20050218073136.C104C17762@x6.develooper.com> References: <20050218073136.C104C17762@x6.develooper.com> Message-ID: <4c714a9c05021808543d42b03a@mail.gmail.com> Greetings, On Fri, 18 Feb 2005 07:33:53 +0000, Sandy Santra wrote: > And, yeah, I'm a little disturbed that I can't find a simple > command that queries a listing in a directory and tells > me (automatically) whether something is a file or a directory, > but maybe I'll write a loop for that, too. I don't know about perldoc on windows, maybe it works the same as on unix, but if you were on unix, I'd suggest you execute the following commands at the command prompt: perldoc -f -x perldoc -f stat These are building blocks. You'll have to supply the loop. :-) Or the more general: perldoc perlfunc (Reading the last, while time intensive, is a good way to open ones eyes even more.) David -- Live in a world of your own, but always welcome visitors. From jseidel at edpci.com Fri Feb 18 09:01:42 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Fri Feb 18 09:01:52 2005 Subject: [oak perl] file::find vs. learning recursive subs In-Reply-To: <20050218073136.E5DF8177A5@x6.develooper.com> References: <20050218073136.E5DF8177A5@x6.develooper.com> Message-ID: <50331.63.192.200.250.1108746102.squirrel@63.192.200.250> Sandy... I'm not positive, but I think that the "(\w){2}" or "\w\w" construct will need some work... you will need something to describe the word boundary or separation between the two words or else it's just one word... e.g., "\w\b\w" or else "\w\W\w" (the \b is word boundary and the \W is a non-word. Even this may not be enough... I'm not a regular expression guru :) Good luck, and keep up the good work...jon > Tonight just working on refining my search matching pattern > is making me happy. "s/%2f/_/" is not going to be enough, > since sometimes the "%" is followed by completely different > characters (other than "2f"); so my redraft is going to > be "s/%(\w){2}/_/" or "s/%\w\w/_/" or maybe even something > more elegant (hope, hope--have to test these). And of course > I'll be adding the "g" at the end for multiple instances. > Just the beginning, but fun! > > Thanks, all. > > --Sandy Santra > > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Connecting Business and Technology Jon Seidel, CMC +1-510-530-6314 EDP Consulting, Inc. www.edpci.com CMC (Certified Management Consultant) is a certification mark awarded by the Institute of Management Consultants USA and represents evidence of the highest standards of consulting and adherence to the ethical canons of the profession. Less than 1% of all consultants have achieved this level of performance. See www.imcusa.org/hireacmc.acgi. From jseidel at edpci.com Fri Feb 18 09:01:42 2005 From: jseidel at edpci.com (Jon Seidel, CMC) Date: Fri Feb 18 09:01:55 2005 Subject: [oak perl] file::find vs. learning recursive subs In-Reply-To: <20050218073136.E5DF8177A5@x6.develooper.com> References: <20050218073136.E5DF8177A5@x6.develooper.com> Message-ID: <50331.63.192.200.250.1108746102.squirrel@63.192.200.250> Sandy... I'm not positive, but I think that the "(\w){2}" or "\w\w" construct will need some work... you will need something to describe the word boundary or separation between the two words or else it's just one word... e.g., "\w\b\w" or else "\w\W\w" (the \b is word boundary and the \W is a non-word. Even this may not be enough... I'm not a regular expression guru :) Good luck, and keep up the good work...jon > Tonight just working on refining my search matching pattern > is making me happy. "s/%2f/_/" is not going to be enough, > since sometimes the "%" is followed by completely different > characters (other than "2f"); so my redraft is going to > be "s/%(\w){2}/_/" or "s/%\w\w/_/" or maybe even something > more elegant (hope, hope--have to test these). And of course > I'll be adding the "g" at the end for multiple instances. > Just the beginning, but fun! > > Thanks, all. > > --Sandy Santra > > > _______________________________________________ > Oakland mailing list > Oakland@pm.org > http://mail.pm.org/mailman/listinfo/oakland > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Connecting Business and Technology Jon Seidel, CMC +1-510-530-6314 EDP Consulting, Inc. www.edpci.com CMC (Certified Management Consultant) is a certification mark awarded by the Institute of Management Consultants USA and represents evidence of the highest standards of consulting and adherence to the ethical canons of the profession. Less than 1% of all consultants have achieved this level of performance. See www.imcusa.org/hireacmc.acgi. From dbkliv at gmail.com Fri Feb 18 09:08:25 2005 From: dbkliv at gmail.com (dbkliv) Date: Fri Feb 18 09:08:39 2005 Subject: [oak perl] file::find vs. learning recursive subs In-Reply-To: <20050218073136.E5DF8177A5@x6.develooper.com> References: <20050218073136.E5DF8177A5@x6.develooper.com> Message-ID: On Fri, 18 Feb 2005 07:33:53 +0000, Sandy Santra wrote: > Belden, that script was amazing--but way over my head. > I didn't know about file::find, use constant, or the even > the value of including a prompting feature for the file > rename (duh!). So you've opened my eyes in a half dozen > ways (yes, there were other eye-openers in your script)--thanks. > Glad to hear this. > I think for now I'm going to follow Michael Paoli's advice > and do it the hard way, which will help me learn scoping > and many other things. (Thanks, Michael! At first I balked > at doing the work, but now I see the value.) Anyway, working > with a looping sub is just about my speed right now. Glad to hear this too. There's nothing wrong with trying to do it yourself: just don't forget that you don't *have* to. I suggest incorporating a prompting feature ("really do this?") in your code. Not only will this give you a chance to make sure that everything's working how you expect, it'll also give you the chance to hit Control+C to exit the script if you notice it has entered an infinite loop. It's probably not a bad idea to make a sandbox for testing. On Windows, you could do this by opening a DOS prompt and running: C:\> mkdir C:\sandbox C:\> cd C:\sandbox C:\sandbox> echo > file1%f1%f2.txt C:\sandbox> echo > file2%f1%f2.txt Make a few sub directories under C:\sandbox, and put fake files in them too. > Just the beginning, but fun! Yes indeed :) Belden From george at metaart.org Fri Feb 18 16:36:46 2005 From: george at metaart.org (George Woolley) Date: Fri Feb 18 16:18:58 2005 Subject: [oak perl] Fwd: Newsletter from O'Reilly UG Program, February 18 Message-ID: <200502181636.46863.george@metaart.org> ---------- Forwarded Message ---------- Subject: Newsletter from O'Reilly UG Program, February 18 Date: Friday 18 February 2005 2:41 pm From: Marsee Henon ... ================================================================ O'Reilly News for User Group Members February 18, 2005 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Head First Java, 2nd Edition -Linux Device Drivers, 3rd Edition -Surviving PC Disasters, Mishaps, and Blunders -Linux Network Administrator's Guide, 3rd Edition -Windows XP in a Nutshell, 2nd Edition ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Adam Goldstein ("AppleScript: The Missing Manual"), Apple Store, Short Hills, NJ--February 25th -Jim Aspinwall ("PC Hacks"), Golden Gate Computer Society, San Rafael, CA--February 28 -O'Reilly at PhotoShop World, Las Vegas, NV--March 9 -Gordon Meyer ("Smart Home Hacks"), North Coast Mac Users Group, Rohnert Park, CA--March 15 -Sarah Milstein ("Google: The Missing Manual"), Golden Gate Computer Society, San Rafael, CA--March 28 ---------------------------------------------------------------- Conference News ---------------------------------------------------------------- -Register for the 2005 O'Reilly Emerging Technology Conference, San Diego, CA--March 14-17 -Register for the 2005 MySQL Users Conference, Santa Clara, CA--April 18-21 ---------------------------------------------------------------- News ---------------------------------------------------------------- -MAKE on Slashdot -Getting Real-Time Data From the Web in Excel -Stewart Butterfield on Flickr -Jolt Awards Finalists -500 O'Reilly Books on Safari -Fear and Loathing in Information Security -Object Oriented PHP Programming & Performance -Michael Stutz on Computer Outlook/KLAV Radio -Writing Apache's Logs to MySQL -iPod shuffle Tips and Tricks -Apache and AppleScript -Encrypting Connection Strings in Web.config -Building the Perfect Budget PC, Part 1 -JDMK and Legacy IT Management -Eclipse Plugins Exposed, Part 1: A First Glimpse -High Definition in Focus at 2005 Sundance Festival -Raymond Soemarsono: Natural Eye -Introduction to Browser Specific CSS Hacks -Web Programming Certificate Series Extended until February 28 ================================================ Book News ================================================ Did you know you can request a free book to review for your group? Ask your group leader for more information. For book review writing tips and suggestions, go to: http://ug.oreilly.com/bookreviews.html Don't forget, you can receive 20% off any O'Reilly, No Starch, Paraglyph, Pragmatic Bookshelf, SitePoint, or Syngress book you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. http://www.oreilly.com/ ***Free ground shipping is available for online orders of at least $29.95 that go to a single U.S. address. This offer applies to U.S. delivery addresses in the 50 states and Puerto Rico. For more details, go to: http://www.oreilly.com/news/freeshipping_0703.html ---------------------------------------------------------------- New Releases ---------------------------------------------------------------- ***Head First Java, 2nd Edition Publisher: O'Reilly ISBN: 0596009208 "Head First Java, 2nd Edition" delivers a highly interactive, multi-sensory learning experience that lets new programmers pick up the fundamentals of the Java language quickly. Through mind-stretching exercises, memorable analogies, humorous pictures, and casual language, "Head First Java" encourages readers to think like Java programmers. This revised second edition focuses on Java 5.0, the latest version of the Java development platform. http://www.oreilly.com/catalog/hfjava2/ Chapter 2, "A Trip to Objectville," and Chapter 8, "Serious Polymorphism," are available online: http://www.oreilly.com/catalog/hfjava2/chapter/index.html ***Linux Device Drivers, 3rd Edition Publisher: O'Reilly ISBN: 0596005903 Over the years, this best-selling guide has helped countless programmers learn how to support computer peripherals and how to develop new hardware under the Linux operating system. Now, with this third edition, it's even more helpful, covering all the significant changes to Version 2.6 of the Linux kernel. The guide even includes full-featured examples that programmers can compile and run without special hardware. http://www.oreilly.com/catalog/linuxdrive3/ Chapter 13, "USB Drivers," is available online: http://www.oreilly.com/catalog/linuxdrive3/chapter/index.html ***Surviving PC Disasters, Mishaps, and Blunders Publisher: Paraglyph Press ISBN: 1932111980 "Surviving PC Disasters, Mishaps, and Blunders" is the must-have survival guide for every PC user. Written in an engaging, reassuring, and fun style, it gives you the answers you need immediately to fix the thorniest PC problems. It also provides valuable insight on measures that can prevent a difficult and often expensive cure. (Who's got money to waste these days on fixing mishaps and blunders anyway?) http://www.oreilly.com/catalog/1932111980/index.html ***Linux Network Administrator's Guide, 3rd Edition Publisher: O'Reilly ISBN: 0596005482 This refreshed resource takes an in-depth look at everything you need to know to join a network. Topics covered include all of the essential networking software that comes with the Linux operating system, plus information on a host of cutting-edge services including wireless hubs, spam filtering, IPv6, OpenLDAP, and more. http://www.oreilly.com/catalog/linag3/ Chapter 18, "Wireless Networking," is available online: http://www.oreilly.com/catalog/linag3/chapter/index.html ***Windows XP in a Nutshell, 2nd Edition Publisher: O'Reilly ISBN: 0596009003 "Windows XP in a Nutshell, 2nd Edition" documents everything there is to know about the world's most widely used operating system. Updated to include information on the security technologies featured in Service Pack 2 (SP2), this must-have desktop reference is dedicated to making your time at the computer safer, easier, and more fun. It's the ultimate resource for IT professionals and Windows XP power users everywhere. http://www.oreilly.com/catalog/winxpnut2/ Chapter 8, "The Registry," is available online: http://www.oreilly.com/catalog/winxpnut2/chapter/index.html ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Adam Goldstein ("AppleScript: The Missing Manual"), Apple Store, Short Hills, NJ--February 25th Adam will be giving and talk and signing books. Adam was a technical editor for O'Reilly's "Mac OS X: The Missing Manual." When he's not writing books or code, Adam attends high school in New Jersey, where he is captain of the Debate and Quizbowl teams and an editor of the school paper. Read a recent review of Adam's book on Slashdot: http://books.slashdot.org/books/05/02/06/222219.shtml?tid=156&tid=6&tid=3 Apple Store Short Hills at 7pm February 25th 1200 Morris Turnpike Short Hills, NJ 07078 (973) 467-4890 http://www.apple.com/retail/shorthills/week/20050213.html ***Jim Aspinwall ("PC Hacks"), Golden Gate Computer Society, San Rafael, CA--February 28 Jim will be giving a talk on "Computer Security, PC Hacks, and Troubleshooting Tips." The meeting starts at 7:15 pm at the Embassy Suites Hotel,101 McInnis Parkway, San Rafael. http://www.ggcs.org/thismonth.html ***O'Reilly at PhotoShop World, Las Vegas, NV--March 9 Come by and say hi and check out our latest Digital Media books at our booth (#220). Mandalay Bay Resort, Las Vegas, NV. http://www.photoshopworld.com/ ***Gordon Meyer ("Smart Home Hacks"), North Coast Mac Users Group, Rohnert Park, CA--March 15 Gordon will be presenting automation tips and hacks from his book. The meeting starts at 7pm at the Rohnert Park Senior Center, 6800 Hunter Drive--Suite A, Rohnert Park. http://www.ncmug.org/ ***Sarah Milstein ("Google: The Missing Manual"), Golden Gate Computer Society, San Rafael, CA--March 28 An O'Reilly editor and author, Sarah will start with the Google basics and quickly move on to the sophisticated ways to search, covering search syntax, techniques, and hidden tricks to hone in on relevant content. The meeting starts at 7:15 pm at the Embassy Suites Hotel, 101 McInnis Parkway, San Rafael. http://www.ggcs.org/gen-next.html ================================================ Conference News ================================================ ***2005 O'Reilly Emerging Technology Conference, San Diego, CA--March 14-17 This year's conference theme is "Remix," which infuses ETech's roll-up-your-sleeves tutorials, to-the-point plenary presentations, and real world focused breakout sessions. Come to ETech and discover how applications and hardware are being deconstructed and recombined in unexpected ways. Learn how users and customers are influencing new interfaces, devices, business models, and services. For all the scoop on tutorials, featured speakers, and conference events, check out: http://conferences.oreillynet.com/etech/ User group members use code DSUG when you register, and receive 20% off the registration price. To register for the conference, go to: http://conferences.oreillynet.com/cs/et2005/create/ord_et05 ***Register for the 2005 MySQL Users Conference, Santa Clara, CA-- April 18-21 The MySQL Users Conference, co-presented by O'Reilly Media and MySQL AB, brings together experts, users, and industry leaders with unique MySQL insights, offering attendees a detailed look into new features in MySQL 5.0, sessions and workshops designed to teach best practices, and exposure to new open source technologies. For more information, go to: http://www.mysqluc.com/ User Group members who register before Febuary 28, 2005 get a double discount. Use code DSUG when you register, and receive 20% off the early registration price. To register for the conference, go to: http://conferences.oreillynet.com/cs/mysqluc2005/create/ord_mysql05 ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***User Groups Benefit from Safari When O???Reilly developers needed someone to user-test the new Safari Affiliate Program, Stephen Henry from the North Coast Mac Users Group was the ideal choice. Situated 40 miles north of San Francisco, NCMUG has been active since the Mac first arrived in 1984. Henry created an excellent working example of how user groups can implement the Affiliate Program to benefit their members. Ed Stephenson brings you the details. http://oreilly.com/news/ncmug.html ****MAKE on Slashdot http://books.slashdot.org/books/05/02/17/1958221.shtml?tid=222&tid=159&tid=12 6&tid=6 The MAKE blog is available at: http://www.makezine.com/blog/ MAKE Subscriptions Available The annual subscription price for four issues is $34.95. When you subscribe with this link, you'll get a free issue--the first one plus four more for $34.95. So subscribe for yourself or friends with this great offer for charter subscribers: five volumes for the cost of four. Subscribe at: https://www.pubservice.com/MK/Subnew.aspx?PC=MK&PK=M5ZUGLA ***Getting Real-Time Data From the Web in Excel Did you know that you can use Excel for more than just storing and organizing static data? In this article, Matthew MacDonald, author of "Excel: The Missing Manual," shows you how to use Excel as a tool to handle up-to-the-minute information like sales figures and currency exchange rates. http://www.windowsdevcenter.com/pub/a/windows/2005/02/08/xcel_mm.html ***Stewart Butterfield on Flickr Not even a year old and still in beta, Flickr is a revolutionary photo storage, sharing, and organization application boasting roughly 270,000 members. Richard Koman catches Flickr CEO Stewart Butterfield for a few words on what has made Flickr so revolutionary and where it may be headed. http://www.oreillynet.com/pub/a/network/2005/02/04/sb_flckr.html ***Jolt Awards Finalists "Software Development Magazine" recently announced the finalists for the 15th Annual Jolt Product Excellence Awards. Several O'Reilly titles and sites were nominated: "Head First Design Patterns" in the General Books category; and "Better, Faster, Lighter Java," "Head First Servlets & JSP," "Hibernate: A Developer's Notebook," and "Mono: A Developer's Notebook" in the Technical Books category. Java.net and the O'Reilly Network were named finalists in the Web Sites and Developer Networks category. http://www.sdmagazine.com/jolts/15th_jolt_finalists.html ***500 O'Reilly Books on Safari O'Reilly now boasts over 500 books on Safari, the premier electronic reference library for IT professionals and programmers. With Safari, you can search electronic versions of a broad range of the best technical books from leading publishers including O'Reilly. Check out our newest title, "All About Your iPod Photo," and learn how to get the most out of your favorite toy. Give Safari a try today with a free trial subscription. http://www.oreilly.com/go/safari-ug --------------------- Open Source --------------------- ***Fear and Loathing in Information Security "Society has always treated innovators and whistle blowers with ambivalence," writes author Michael D. Bauer in reference to hackers. In this article, Michael discusses why information security professionals demonize hackers and why that tendency is both irrational and counterproductive. Michael is the author of "Linux Server Security, 2nd Edition." http://www.oreillynet.com/pub/a/network/2005/02/11/mbauer_1.html ***Object Oriented PHP Programming & Performance Harry explores the trade-offs between object oriented and procedural programming in PHP in a lengthy discussion on the pros and cons of each. http://www.sitepoint.com/blog-post-view.php?id=223760 ***Michael Stutz on Computer Outlook/KLAV Radio Listen to the author of No Starch's "The Linux Cookbook, 2nd Edition." http://computeroutlook.com/audiostudio.html ***Writing Apache's Logs to MySQL Adding a few performance statistics to your Apache httpd logs can help you profile your applications. Digging through flat files for information is a drag, though. Logging to a relational database can make reporting and analysis much more convenient. Chris Josephes demonstrates how to install and configure mod_log_mysql and shows off what you can do with it. http://www.onlamp.com/pub/a/apache/2005/02/10/database_logs.html --------------------- Mac --------------------- ***iPod shuffle Tips and Tricks The iPod shuffle is the easiest-to-use iPod to date. But that doesn't mean you can't customize how you listen and upload music. Scott Knaster shows you some very handy tips and tricks for the shuffle and iTunes 4.7.1. http://www.macdevcenter.com/pub/a/mac/2005/02/15/shuffle.html ***Apache and AppleScript AppleScript traditionally interacts with Mac applications and Apache is the web server that powers most of the Internet. David Miller shows you how AppleScript can invoke Unix utilities through its do shell script command, thereby creating some interesting intersections with Apache. http://www.macdevcenter.com/pub/a/mac/2005/02/11/applescript.html --------------------- Windows/.NET --------------------- ***Encrypting Connection Strings in Web.config One of the best practices in ASP.NET is to save your database connection strings in the Web.config file instead of hard-coding it in your code. It's not such a good idea to save your connection strings as plain text in Web.config--you should ideally encrypt the connection strings so it leaves no chance for a potential hacker to easily get more information about your database server. In ASP.NET 2.0, Microsoft has taken this further by allowing you to encrypt the connection strings in Web.config, all without much plumbing on your part. In this new article by Wei-Meng Lee, he shows you how it works. http://www.ondotnet.com/pub/a/dotnet/2005/02/15/encryptingconnstring.html ***Building the Perfect Budget PC, Part 1 You can build a powerhouse system without breaking the bank. In this first part of a two-part article, Robert Bruce Thompson and Barbara Fritchman Thompson, authors of "Building the Perfect PC," show you which components to buy. http://www.windowsdevcenter.com/pub/a/windows/2005/02/15/Perfect_BudgetPC.htm l --------------------- Java --------------------- ***JDMK and Legacy IT Management Keeping a network with legacy (and possibly unreliable) devices is nearly impossible without some automated help. Stephen Morris shows how to use the Java Dynamic Management Kit to keep tabs on your network and find potential points of failure. http://www.onjava.com/pub/a/onjava/2005/02/16/jdmk.html ***Eclipse Plugins Exposed, Part 1: A First Glimpse Many developers use Eclipse out of the box as an IDE, never investigating its powerful extensibility. But as Emmanuel Proulx shows in this first installment of a new series, Eclipse's modular system of plugins allow you to customize it to your suit your development needs. http://www.onjava.com/pub/a/onjava/2005/02/09/eclipse.html --------------------- Digital Media --------------------- ***High Definition in Focus at 2005 Sundance Festival Cheaper than film, bigger and better than plain, old digital video, high-definition digital video definitely came into its own during this year's Sundance Film Festival. According to Sony, nearly half of the features, documentaries, and shorts screened in Park City were shot in HD. Susan Boyer reports. http://digitalmedia.oreilly.com/2005/02/09/hd.html ***Raymond Soemarsono: Natural Eye Some people are meant to be artists. Self-taught photographer Raymond Soemarsono has a natural eye for composing stunning landscape scenes, then taming his digital camera to record them according to his vision. His gallery features many places with which you're probably familiar. Maybe it's time to get in the car and revisit them? http://digitalmedia.oreilly.com/2005/02/16/featured.html --------------------- Web --------------------- ***Introduction to Browser Specific CSS Hacks CSS leaves your layout open to interpretation by browsers...or does it? In this hands-on trouble-shooter, Trenton explains why and how different browser-specific CSS hacks work--and provides code to help you regain control over your layouts. http://www.sitepoint.com/article/browser-specific-css-hacks ***Web Programming Certificate Series Extended until February 28 This six-course series from the O'Reilly Learning Lab teaches you the skills needed for web programming, web administration, and web site development. You'll learn HTML, JavaScript, XML, SQL, Perl, and Unix. Upon completion of the series, students receive a Certificate of Professional Development from the University of Illinois Office of Continuing Education. Sign up today and save 40% on all Web Programming Certificate courses. Offer extended until February 28. http://www.oreilly.com/redirector.csp?link=UAWeb&type=news ================================================ From Your Peers =============================================== Don't forget to check out the O'Reilly UG wiki to see what user groups across the globe are up to: http://wiki.oreillynet.com/usergroups/index.cgi Until next time-- Marsee ------------------------------------------------------- From jkeen at verizon.net Sun Feb 20 16:34:51 2005 From: jkeen at verizon.net (James Keenan) Date: Sun Feb 20 16:35:00 2005 Subject: [oak perl] Re: file::find vs. learning recursive subs In-Reply-To: <20050219001902.1B278177D7@x6.develooper.com> References: <20050219001902.1B278177D7@x6.develooper.com> Message-ID: <2825da49333213e4820845d6ed02943a@verizon.net> > Date: Fri, 18 Feb 2005 08:54:09 -0800 > From: David Alban > Subject: Re: [oak perl] file::find vs. learning recursive subs > To: Oakland Perl Mongers > > perldoc -f -x Learned something new today! Many is the time I've had to grep my documentation or perldoc.com for information about file test operators. The fact that they're call "operators" always points me away from looking at perlfunc -- and even when I *do* look there, the size of that file is daunting. So I end up looking them up in the Camel book. And it appears you can substitute the file test of your choice for the 'x'. This will be a time saver. Thanks, David. Jim Keenan Brooklyn NY From george at metaart.org Tue Feb 22 18:44:52 2005 From: george at metaart.org (George Woolley) Date: Tue Feb 22 18:26:43 2005 Subject: [oak perl] Next Oakland.pm Meeting: Tue. Mar. 8 Message-ID: <200502221844.52551.george@metaart.org> cut & paste from our website at http://www.metaart.org/opug/ ....................................... Next meeting * when: Tue. Mar. 8 at 7:30-9:30pm (on 2nd Tuesdays since Dec. 2002) * where: Connie's Cantina 3340 Grand Ave., Oakland CA * directions: [link to] directions and ascii map * special guest: Janet Crosbie (Apress User Group Program) * topic: POE * activities: o introductions o giveaways o talk by Tony Monroe o eat Mexican food o ... * who: open to anyone interested. * how much: no fee for our meetings. However, it would be kool if you got something to eat and/or drink. * RSVP: if you want to be sure to have a seat at the Oakland.pm table. From george at metaart.org Tue Feb 22 18:44:58 2005 From: george at metaart.org (George Woolley) Date: Tue Feb 22 18:26:45 2005 Subject: [oak perl] Brief Profiles Message-ID: <200502221844.58426.george@metaart.org> Reference: http://www.metaart.org/opug/members/members.html A couple of people have new profiles and several people's entries have been updated. Anyone else? George From santranyc at yahoo.com Tue Feb 22 22:05:39 2005 From: santranyc at yahoo.com (Sandy Santra) Date: Tue Feb 22 22:03:21 2005 Subject: [oak perl] prepend operator? Message-ID: I know ".=" is the append operator (for string concatenate)... Is there also a "prepend" operator? --Sandy Santra From david at fetter.org Wed Feb 23 00:36:45 2005 From: david at fetter.org (David Fetter) Date: Wed Feb 23 00:36:56 2005 Subject: [oak perl] prepend operator? In-Reply-To: <20050223060321.5550B17760@x6.develooper.com> References: <20050223060321.5550B17760@x6.develooper.com> Message-ID: <20050223083645.GA29476@fetter.org> On Wed, Feb 23, 2005 at 06:05:39AM +0000, Sandy Santra wrote: > I know ".=" is the append operator (for string concatenate)... > > Is there also a "prepend" operator? I suppose you could make one, but it's usually easier just to use the append, as in $foo = $prepended . $next_thing; There is, of course, More Than One Way To Do It. :) Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! From tony+s+d414ac at nog.net Wed Feb 23 11:56:59 2005 From: tony+s+d414ac at nog.net (Tony Monroe) Date: Wed Feb 23 11:57:18 2005 Subject: [oak perl] Vaguely Perl-related job Message-ID: <20050223195659.GB88235@ethics-gradient.nog.net> We're looking to hire someone in my group. The position is half technical, half managerial. http://www.craigslist.org/pen/sof/60873910.html IIRC at our last meeting, mtheo (?) said something about searching for a job, possibly with Perl and SQL involved. Here's a lead. Oh, if you're not mtheo, you can respond too. :-) -- tony -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://mail.pm.org/pipermail/oakland/attachments/20050223/2cd28e4e/attachment.bin