From dwaring at nwsr.com Mon May 1 02:05:28 2000 From: dwaring at nwsr.com (David Waring) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Something to loose sleep over Message-ID: Sorry about my mistake. The program was not really printing ABC but of course ARRAY(0x8102b84)BC. But I am afraid you are all missing the point. The point is that the subroutine is behaving as if the same parameters are being passed each time, when they are not. This behaviour is dependent on using shift to get the values of @_ and shifting all values off. Interestingly the misbehaviour can be seen even if @_ is printed before the shifts. I am not talking about a bug in my code. The code is good it works fine on many machines. It just appears to be a bug in one installation of Perl. I am just wondering if anyone can tell what might be going on in this bad version of Perl. >Think that this line will give you what you want in terms of printing: > print "array = '@{shift()}' @_\n"; > >As for the weirdness you're seeing -- are you using strict? :) > >This works on both 5.6 and 5.005_03 > >Here's the code. It works with and without the $x = shift lines. > >#!/usr/bin/perl > >@A = (1..3); >@B = (4..6); >@C = (7..9); > >asubroutine(\@A,"B","C"); >asubroutine(\@B,"E","F"); >asubroutine(\@C,"Y","Z"); > >sub asubroutine { > print "array = '@{shift()}' @_\n"; >} > >Results: >array = '1 2 3' B C >array = '4 5 6' E F >array = '7 8 9' Y Z > > >On Fri, 28 Apr 2000, David Waring wrote: > > > Warning this is a demonstration of a bug that only appears in certain > > installations of Perl. It is a weird bug and I am really pointing it > > out as a topic of conversation. Ignore this if you are not interested > > in really yucky stuff. > > > > > > We have recently had a problem with passing parameters to a > > subroutine. It only appears on one of our many boxes that are all > > running the same version of Perl (can't remember the version but it > > is pre 5.6) All boxes are running AIX. > > > > > > To paraphrase the code as closely as possible > > > > > > ..... > > # call a subroutine several times with different parameters > > > > asubroutine(\@A,"B","C"); > > asubroutine(\@D,"E","F"); > > asubroutine(\@X,"Y","Z"); > > > > > > sub asubroutine{ > > print @_,\n"; > > $x= shift @_; > > $y= shift @_; > > $z= shift @_; > > } > > > > RESULTS > > ABC > > ABC > > ABC > > > > whoa thats weird the subroutine is acting like it was called three > > times with the same parameters > > > > Now we can fix this in several ways. All of the following changes > > behaved properly an had the expected results of > > ABC > > DEF > > XYZ > > > > 1) get rid of the multiple shifts and instead grab all the incoming > > params at once as any normal person would do > > > > ($x,$y,$z) = @_; > > > > 2) forget about $z and only shift in the x y values leaving @_ with a > > single value > > > > 3) stop passing the reference in the params just pass the 'normal' scalars; > > > > 4) removing all the shifts and just printing @_ > > I mean how on earth can what is done later with @_ affect the values > > in it????????? > > > > Doing #1 but then setting @_ = (); -- which should be pretty damn > > close to shifting out all the values from @_ worked normally. > > > > The Print statement before the shifts was not important. The wrong > > values were being set for x y z anyway. > > > > > > > > > > We will be reinstalling Perl on this box but does anyone have any > > idea what in the deepest bowels of Perl could be going on here???? > > > > David Waring > > > > > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > > Email to majordomo@pm.org: "action" spug-list your_address > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From tim at consultix-inc.com Mon May 1 07:12:08 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Damian Teaching OOP/Parsing, Kirkland Message-ID: <20000501051208.A6481@timji.consultix.wa.com> SPUGsters, Here's a complimentary copy of the Training Bulletin we just sent to our corporate clients, announcing Damian's commitment to teach two Perl seminars through CONSULTIX in July. Hope some of you will avail yourselves of this unique opportunity! P.S. He'll be giving two free talks to SPUG, on the evenings of the 5th and 6th; details to follow soon. -Tim ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== From: Tim Maher, CONSULTIX To: Former and Future Students RE: Conway Perl Seminars in July, Kirkland WA NOTE: For List Removal, see below NEWS FLASH: Damian Conway Teaching "OOP" and "Parsing", Kirkland Serious Perl programmers are familiar with Dr. Damian Conway (http://www.csse.monash.edu.au/~damian/), of Australia's Monash University. He's the author of the celebrated best-seller "Object Oriented Perl" (http://www.manning.com/Conway/), the two-time winner of the "Larry Wall Award for a Practical Perl Utility", and a top-rated Perl Conference tutorial speaker (given the highest rating allowed by 91% of his students at TPC 3.0). So Damian is a top Perl programmer and author, as well as a pleasant, witty, and articulate teacher. Which leads me to my big announcement: Consultix is proud to be sponsoring Dr. Conway in his presentation of two one-day Perl seminars (listed below) in Kirkland in early July! These seminars are related to ones he will respectively already have given (at "Yet Another Perl Conference"), or be about to give (at The Perl Conference 4.0). So this is a great opportunity for those who cannot attend the conferences to learn from him without leaving town! In addition, those who will be attending the conferences might wish to take these seminars in Seattle to free up valuable conference time to invest in other events. As usual, our web page has further details, and "On-Line Registration" is open! REMINDER: The "Early-Bird Discounts" (worth 10%) for the "Intermediate Perl" and "Advanced Pattern Matching" classes listed below expire on 5/12. "PIR" (Procrastination in Registration) can be costly! -------------------------------------------------------------------- SPRING/SUMMER 2000 CLASS SCHEDULE, Kirkland WA Course Dates Days UNIX Fundamentals 05/16-05/19 4 Perl Programming, plus Modules 05/22-05/25 4 Intermediate Perl Programming 06/12-06/15 3.5 Adv. Pattern Matching with Perl 06/15-06/16 1.5 Int. Perl Programming + Adv. PM 06/12-06/16 5 Advanced Object Oriented Perl 7/6 1 Parsing with Perl Modules 7/7 1 ------------------------------------------------------------------- NEED MORE INFORMATION? Course Outlines for currently scheduled Hands-On classes follow below; see our web page for further info on Damian's seminars. ON-LINE RESOURCES On-Site training information: http://www.consultix-inc.com/on-site.html Curriculum Listings: UNIX/Shell: http://www.consultix-inc.com/unixlist.html AWK/Perl: http://www.consultix-inc.com/perllist.html Instructor Evaluations: http://www.consultix-inc.com/evals.html Course outlines, company information, Instructor evaluations, course prices, downloadable Registration Forms, and On-Line Registration are all available at our Web site, http://www.consultix-inc.com Remember, any of our 17 courses on UNIX and Perl topics can be delivered on-site at a considerable savings, for groups of three or more students! *========================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | *========================================================================* UNIX FUNDAMENTALS (4 days) by CONSULTIX http://www.consultix-inc.com May 16-19, 2000 Kirkland, WA DESCRIPTION This lecture/lab course teaches computer users to make productive use of the UNIX operating system. The most important and empowering concepts, such as pattern matching, command editing, shell scripting, and pipelines are emphasized, alongside coverage of basic OS utilities and services. 40% of class time is spent in supervised laboratory activities, with students using a Korn (POSIX) shell interface to UNIX. The course does not cover the use of windowing interfaces to UNIX. Although this is intended as a first course in UNIX, it is especially well suited for those who wish to become "power users", Programmers, or System-, Database-, Network-, or Web-Administrators. The course material is applicable to all UNIX and UNIX-like systems (including Linux). PREREQUISITES A conceptual understanding of elementary computer terms, such as memory, disk storage, and time-sharing. Typing skills are beneficial, as is familiarity with other operating systems, such as DOS and its relatives. AUTHOR & INSTRUCTOR Dr. Tim Maher has been an avid user of UNIX since 1976, and, since the early 80s, he has taught literally thousands of others to make the most of it. He has authored 16 UNIX courses, including ones taught by AT&T. CONSULTIX instructors are renowned for their ability to communicate complex concepts in simple terms and to make the study of dry technical material enjoyable. (http://www.consultix-inc.com/evals.html) TOPICS INTRO. to UNIX THE VI EDITOR History of UNIX Creating Files Logging In, Logging Out Modifying Files The Password System THE UNIX SHELLS Using the on-line Manual Shell Comparisons Accessing the Printer Quoting Techniques THE UNIX FILESYSTEM Shell Scripts File Types Startup Files Pathnames Variables Permissions Aliases User and Group IDs History Substitutions FILE UTILITIES Command Editing ls, find, chmod Filename Wildcards cp, mv I/O Redirection cat, more, head, tail Pipelines rm, rmdir, mkdir Background Execution UNIX NETWORKING Job Control TCP/IP REGULAR EXPRESSIONS ping Command grep Command E-Mail sed Command Firewalls Using with VI Editor Proxies THE PROCESS HIERARCHY Remote Access Commands The ps Command rsh, rlogin, rcp Process Priorities ssh, slogin, scp Process Control PERL PROGRAMMING, plus Modules (4 days) by CONSULTIX http://www.consultix-inc.com May 22-25, 2000 Kirkland WA DESCRIPTION PERL is a popular and powerful language that can be applied to a wide range of data processing problems. Students will learn the basic features of PERL and gain experience in writing typical applications that validate data, generate reports, convert text files, and perform numerical analyses. This class consists of our basic Perl Programming class plus additional material on Perl Modules . Lecture and lab sessions emphasize the "Getopt" (option processing), "Text" (simple text formatting), "LWP" (Internet access) and "CGI" (Web-page form-handling) modules. WHO SHOULD ATTEND Students should have at least 6 months of prior experience with UNIX, be competent users of the VI editor, and have prior programming experience in a modern high-level language (C, AWK, Shell, etc.). The course is intended for UNIX programmers, system administrators, network administrators, data administrators, and webmasters. AUTHOR & INSTRUCTORS Dr. Tim Maher has been working with the interpreted languages of UNIX for over 20 years. He has used them to write many sophisticated applications, including a user interface for U.C. Berkeley undergraduates and source code beautifiers for Perl and C++. As the founder and head of Consultix, Tim regularly teaches courses on a wide variety of UNIX topics. COURSE TOPICS Language Features Programming Applications Data Types General Scripting Conditional Execution Text Processing Files & Pipelines File Conversion Variables and Arrays Number Crunching Flow Control Data Validation Subroutines Report Generation Fields and Records Option Processing Input & Output Text Formatting Regular Expressions Generating Web Pages Perl Modules CGI Form Creation Getopt, Text, LWP CGI Form Processing CGI, Benchmark . . . INTERMEDIATE PERL PROGRAMMING (3.5 days) by CONSULTIX http://www.consultix-inc.com June 12-15, 2000 Kirkland, WA COURSE DESCRIPTION This course is for Students with previous Perl programming experience who are ready to go "beyond the basics". Students will learn to use language features and expert tricks that allow them to write more compact and efficient programs, and to solve complex problems more easily. They'll also acquire new skills that will help them do basic tasks with greater elegance, security, and "cool-osity"! WHO SHOULD ATTEND Students should have at least 6 months of prior experience with UNIX and Perl, have Perl skills equivalent to those taught in our Perl Programming class (http://www/consultix-inc.com/perl.html) be competent users of the VI editor, and feel comfortable using a command-line interface to UNIX while writing Perl programs. The course is intended for programmers, system administrators, network administrators, data administrators, and webmasters. AUTHOR & INSTRUCTOR Dr. Tim Maher has been working with the interpreted languages of UNIX for over 20 years. He has used them to write many sophisticated applications, including a user interface for U.C. Berkeley undergraduates and source code beautifiers for Perl and C++. As the founder and head of CONSULTIX, Tim regularly teaches courses on a wide variety of software topics. TOPICS Editing-in-Place Signal Handling Using map & grep File Locking Validating Regexes Schwartzian Transforms Finding Files Pattern Matching Taint Mode Data Structures Symbol Packages Laundering Data Tying Hashes to DBs Data References Writing Modules Complex Tied Hashes Code References Object Orientation Data Persistence Variable Scoping Object Persistence Using Data::Dumper Anonymous Arrays Intro. to OOP Exceptions and eval Anonymous Hashes Program Debugging ADVANCED PATTERN MATCHING with PERL (1.5 days) by CONSULTIX http://www.consultix-inc.com June 15-16, 2000 Kirkland WA DESCRIPTION This class shows Perl programmers how to use advanced features of Perl's Regular Expression notation, matching and substitution operators, and the split operator. Practical applications of these skills to typical data processing tasks are emphasized in hands-on lab sessions. WHO SHOULD ATTEND Students should have at least 6 months of prior experience with Perl, and be competent users of the VI editor. The course is intended for UNIX programmers, system administrators, network administrators, data administrators, and webmasters. AUTHOR & INSTRUCTOR Dr. Tim Maher has been working with the interpreted languages of UNIX for over 20 years. He has used them to write many sophisticated applications, including a user interface for U.C. Berkeley undergraduates and source code beautifiers for Perl and C++. As the founder and head of Consultix, Tim regularly teaches courses on a wide variety of UNIX topics. Consultix instructors are renowned for their ability to communicate complex concepts in simple terms and to make the study of dry technical material enjoyable. COURSE TOPICS Line-Anchors Match Variables Fuzzy Matching String-Anchors Split Delimiters eval and REs Word-Anchors Single-Line Mode Pre-Compiling REs Back-References Multi-Line Mode Using study() Capturing () Negated Character Class Text::Balanced Non-capturing () Balanced Matches String::Approx RE grouping Managing Complex REs Text::Soundex Stingy vs. Greedy RE Efficiency Lookahead/Lookbehind Pattern Ranges ************************************************************** * NOTE: If you want to be removed from this mailing list, * * include the word REMOVE in the Subject: line of your reply * ************************************************************** ----- End forwarded message ----- -- *========================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes; 5/16: UNIX 5/22: Basic Perl+Modules 6/12: Intermediate Perl | *========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From tim at consultix-inc.com Mon May 1 20:49:18 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Damian's Talks, and Socializing Opportunities Message-ID: <20000501184918.B9223@timji.consultix.wa.com> SPUG-o-philes, Dr. Damian Conway (Senior Lecturer in CS at Australia's Monash University, author of "Object Oriented Perl", and now a visiting Software Instructor for CONSULTIX) has agreed to speak to SPUG on the evenings of 7/5 and 7/6, at the E-SPUG meeting place in Redmond. We realize that some of you will be leaving town in conjunction with 4th of July celebrations, but we hope you'll be able to juggle your schedules so you can attend at least one of these meetings. Hearty thanks go out to NeoInformatics, www.neoinformatics.com, for sponsoring these SPUG visits! * SPUG Talk #1 Damian will do an one-hour presentation on a topic nominated by our members, in one of his areas of expertise: OOP, parsing, natural language processing, programming language design, etc. He reminds me that he'd like to hear our preferences soon, so "Emperor Ryan", how about firing up that web-based survey page again? For the second hour, he will answer audience questions on Perl-related topics (so start jotting down your ideas!). * SPUG Talk #2 For this talk, Damian proposes to reprise the one-hour talk he will have given at YAPC two weeks earlier: "Quantum Superpositions and the First Virtue". * Damian's Agenda, and Arranging Meetings with Him Damian will be arriving in Seattle on 6/30, and leaving on 7/9. His agenda is already quite full for the latter part of the week, with four presentations already scheduled (see below). However, during his free time (mainly 7/1-7/5), he's expressed an interest in meeting with local companies or individuals to tour high-tech facilities, see how Perl is being used, pick each others brains, share meals and conversation, and so on. (Damian is reportedly quite happy at Monash U in beautiful Melbourne, but he's heard about the vibrant Perl community in Seattle, and who knows, given the right conditions, perhaps he'd be willing to relocate here; anybody interested in recruiting him?) Those wishing to meet with Damian are welcome to contact him directly (damian@conway.org) to discuss possible activities and scheduling. * Damian Conway's Speaking Engagements, as of 5/1/2000 #1: 7/5 SPUG talk, evening, Redmond, WA #2: 7/6 "Adv. Object Oriented Perl", all day, Kirkland, WA (through Consultix) #3: 7/6 SPUG talk, evening, Redmond, WA #4: 7/7 "Beyond Regexes: Text Parsing with Perl Modules", all day, Kirkland, WA (through Consultix) ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From tim at consultix-inc.com Tue May 2 13:01:51 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: G'Day from Damian Conway Message-ID: <20000502110151.A11149@timji.consultix.wa.com> # It's ironic that Damian, in his very first posting to our list, sprang # the trap for word the "[s]ubscribe", so I'm re-posting the politically # correct version here - TIm G'day! Now that Tim's announced the details of my visit, I thought I'd [s]ubscribe to your list and get an idea of what I'm getting myself into :-) I'd also like to expand on a few points... > Damian will do an one-hour presentation on a topic nominated > by our members, in one of his areas of expertise: OOP, parsing, > natural language processing, programming language design, etc. Any of my articles in TPJ, or my previous TPC papers, or my CPAN modules, are also fair game. > For the second hour, he will answer audience questions on > Perl-related topics (so start jotting down your ideas!). But bear in mind that I'm not into CGI or DBI, so I'm likely to take the fifth on questions in those areas. Hit me with tough questions in the abovementioned areas of expertise, if you want to make me look smart :-) > For this talk, Damian proposes to reprise the one-hour talk he > will have given at YAPC two weeks earlier: > > "Quantum Superpositions and the First Virtue". Yes, it's *meant* to be obscure. Here's the full abstract (which isn't supposed to be much clearer): Quantum Superpositions and the First Virtue Damian Conway School of Computer Science and Software Engineering Monash University Australia Abstract Take two quantized disjunctive/conjunctive equiprobable scalar datastructures, add a dash of multidimensional polymorphism, a handful of redefined operators, and a pinch of breadth-first optree evaluation. Simmer gently in the Principle of Least Effort. Decant into a grandiosely named module. Now serve vector operations (prime generation, list membership, list extrema, etc.) without loops or recursion. Tim asked me if it's meant to be a parody lecture. I know it looks that way, but actually it's just like my Coy paper at last year's TPC: serious science and useful Perl techniques smuggled into unsuspecting brains hidden behind a dazzlingly stupid idea. > * Damian's Agenda, and Arranging Meetings with Him > > However, during his free time (mainly 7/1-7/5), he's expressed an > interest in meeting with local companies or individuals to tour > high-tech facilities, see how Perl is being used, pick each others > brains, share meals and conversation, and so on. I'm really hoping to get to know some of you and find out more about your city and state. I'd also appreciate any advice on what to see and do there (e.g. I've already been advised *not* to eat at the Space Needle :-) > Those wishing to meet with Damian are welcome to contact him directly > (damian@conway.org) to discuss possible activities and scheduling. Please do. Damian - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From ced at carios2.ca.boeing.com Tue May 2 14:10:57 2000 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: G'Day from Damian Conway Message-ID: <200005021910.MAA07012@carios2.ca.boeing.com> >... Delightful. Many thanks to Damian for agreeing to come. And to Tim for orchestrating. Rgds, -- Charles DeRykus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From billa at willapabay.org Tue May 2 14:48:55 2000 From: billa at willapabay.org (Bill Alford) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Something to loose sleep over In-Reply-To: Message-ID: Could you please post a working example of code that exihbits the behavior you described. One thing I noticed in an earlier version of perl, when my program got too big, a simple print statement of a variable (eg. print "test: $x\n";) caused different behavior in my program. I don't know if this is what your seeing, a small test program will show that. Thanks, Bill On Sun, 30 Apr 2000, David Waring wrote: > Sorry about my mistake. The program was not really printing ABC but of course > ARRAY(0x8102b84)BC. But I am afraid you are all missing the point. > The point is that the subroutine is behaving as if the same > parameters are being passed each time, when they are not. This > behaviour is dependent on using shift to get the values of @_ and > shifting all values off. Interestingly the misbehaviour can be seen > even if @_ is printed before the shifts. I am not talking about a bug > in my code. The code is good it works fine on many machines. It just > appears to be a bug in one installation of Perl. I am just wondering > if anyone can tell what might be going on in this bad version of Perl. > > > > > > >Think that this line will give you what you want in terms of printing: > > print "array = '@{shift()}' @_\n"; > > > >As for the weirdness you're seeing -- are you using strict? :) > > > >This works on both 5.6 and 5.005_03 > > > >Here's the code. It works with and without the $x = shift lines. > > > >#!/usr/bin/perl > > > >@A = (1..3); > >@B = (4..6); > >@C = (7..9); > > > >asubroutine(\@A,"B","C"); > >asubroutine(\@B,"E","F"); > >asubroutine(\@C,"Y","Z"); > > > >sub asubroutine { > > print "array = '@{shift()}' @_\n"; > >} > > > >Results: > >array = '1 2 3' B C > >array = '4 5 6' E F > >array = '7 8 9' Y Z > > > > > >On Fri, 28 Apr 2000, David Waring wrote: > > > > > Warning this is a demonstration of a bug that only appears in certain > > > installations of Perl. It is a weird bug and I am really pointing it > > > out as a topic of conversation. Ignore this if you are not interested > > > in really yucky stuff. > > > > > > > > > We have recently had a problem with passing parameters to a > > > subroutine. It only appears on one of our many boxes that are all > > > running the same version of Perl (can't remember the version but it > > > is pre 5.6) All boxes are running AIX. > > > > > > > > > To paraphrase the code as closely as possible > > > > > > > > > ..... > > > # call a subroutine several times with different parameters > > > > > > asubroutine(\@A,"B","C"); > > > asubroutine(\@D,"E","F"); > > > asubroutine(\@X,"Y","Z"); > > > > > > > > > sub asubroutine{ > > > print @_,\n"; > > > $x= shift @_; > > > $y= shift @_; > > > $z= shift @_; > > > } > > > > > > RESULTS > > > ABC > > > ABC > > > ABC > > > > > > whoa thats weird the subroutine is acting like it was called three > > > times with the same parameters > > > > > > Now we can fix this in several ways. All of the following changes > > > behaved properly an had the expected results of > > > ABC > > > DEF > > > XYZ > > > > > > 1) get rid of the multiple shifts and instead grab all the incoming > > > params at once as any normal person would do > > > > > > ($x,$y,$z) = @_; > > > > > > 2) forget about $z and only shift in the x y values leaving @_ with a > > > single value > > > > > > 3) stop passing the reference in the params just pass the 'normal' scalars; > > > > > > 4) removing all the shifts and just printing @_ > > > I mean how on earth can what is done later with @_ affect the values > > > in it????????? > > > > > > Doing #1 but then setting @_ = (); -- which should be pretty damn > > > close to shifting out all the values from @_ worked normally. > > > > > > The Print statement before the shifts was not important. The wrong > > > values were being set for x y z anyway. > > > > > > > > > > > > > > > We will be reinstalling Perl on this box but does anyone have any > > > idea what in the deepest bowels of Perl could be going on here???? > > > > > > David Waring > > > > > > > > > > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > > > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > > > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > > > Email to majordomo@pm.org: "action" spug-list your_address > > > > > > > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From damian at cs.monash.edu.au Tue May 2 15:05:46 2000 From: damian at cs.monash.edu.au (Damian Conway) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: G'Day from Damian Conway Message-ID: <200005022005.GAA08113@indy05.csse.monash.edu.au> > Many thanks to Damian for agreeing to come. > And to Tim for orchestrating. And to NeoInformatics for sponsoring. And to Ryan for organizing in Tim's absence. BTW, Tim *has* done an excellent job. He emailed me and said: "I've arranged a a speaking venue, an audience, and a free air ticket to get there". The proverbial Offer I Couldn't Refuse! :-) Damian - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From Gimpit at netscape.net Tue May 2 15:39:27 2000 From: Gimpit at netscape.net (Jay Scherrer) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: a s/// question. Message-ID: <20000502203930.531.qmail@ww190.netaddress.usa.net> Hello Fellow SPUGERS, I have been going around and around with trying to replace this string with a blank line. Perhaps someone could give me a clue with s///? The following string occurs three or four times in the files that I'm working with. All I want to do is replace this string with a blank line. ## Constant string needed to be stripped from file ## name last chng bid ask vol(H) high low ahigh alow ####I have been trying this line nested with in a if ( .. ) range operator: $Line =~ s/name last chng bid ask vol(H) high low ahigh alow//; This seems to work on the other headings that are shorter but it seems to ignore this match. Any suggestions? Jay Scherrer Jay@Scherrer.com Gimpit@netscape.net ____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From andyj at microsoft.com Tue May 2 15:50:54 2000 From: andyj at microsoft.com (Andy Jacobs) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: a s/// question. Message-ID: <39ADCF833E74D111A2D700805F1951EF17682091@RED-MSG-06> Just with a quick glance, I'd say that the problem might be the parenthesis around H in the RE. Try escaping them like: $Line =~ s/name last chng bid ask vol\(H\) high low ahigh alow//; - Andy Jacobs > -----Original Message----- > From: owner-spug-list@pm.org > [mailto:owner-spug-list@pm.org]On Behalf Of > Jay Scherrer > Sent: Tuesday, May 02, 2000 1:39 PM > To: spug-list@pm.org > Subject: SPUG: a s/// question. > > > Hello Fellow SPUGERS, > > I have been going around and around with trying to replace > this string with a > blank line. Perhaps someone could give me a clue with s///? > > The following string occurs three or four times in the files > that I'm working > with. All I want to do is replace this string with a blank > line. ## Constant > string needed to be stripped from file ## > > name last chng bid ask vol(H) high low > ahigh alow > > ####I have been trying this line nested with in a if ( .. ) > range operator: > > $Line =~ s/name last chng bid ask vol(H) > high low ahigh alow//; > > This seems to work on the other headings that are shorter but > it seems to > ignore this match. > Any suggestions? > > Jay Scherrer > Jay@Scherrer.com > Gimpit@netscape.net > > ____________________________________________________________________ > Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From scott at sabmail.rresearch.com Tue May 2 16:15:48 2000 From: scott at sabmail.rresearch.com (Scott Blachowicz) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: a s/// question. In-Reply-To: <20000502203930.531.qmail@ww190.netaddress.usa.net>; from Gimpit@netscape.net on Tue, May 02, 2000 at 01:39:27PM -0700 References: <20000502203930.531.qmail@ww190.netaddress.usa.net> Message-ID: <20000502141548.A1522@sabami.seaslug.org> On Tue, May 02, 2000 at 01:39:27PM -0700, Jay Scherrer wrote: > ... > name last chng bid ask vol(H) high low ahigh alow > > ####I have been trying this line nested with in a if ( .. ) range operator: > > $Line =~ s/name last chng bid ask vol(H) high low ahigh alow//; > Note that the parens are special, so if you want them to match literal parens you need to escape them: $Line =~ s/name last chng bid ask vol\(H\) high low ahigh alow//; -- Scott Blachowicz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From traugott at iname.com Tue May 2 16:38:39 2000 From: traugott at iname.com (Jim Traugott) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: a s/// question. In-Reply-To: <20000502203930.531.qmail@ww190.netaddress.usa.net> (message from Jay Scherrer on 2 May 00 13:39:27 PDT) References: <20000502203930.531.qmail@ww190.netaddress.usa.net> Message-ID: <200005022138.RAA28360@happyfunball.pm.org> How about this? #! perl -w use strict; while ( ) { $_ =~ s/name\s+last\s+chng\s+bid\s+ask\s+vol\(H\)\s+high\s+low\s+ahigh\s+alow//; print; } __END__ name last chng bid ask vol(H) high low ahigh alow fubar some other line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From damian at cs.monash.edu.au Tue May 2 18:14:07 2000 From: damian at cs.monash.edu.au (Damian Conway) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: a s/// question. References: <20000502203930.531.qmail@ww190.netaddress.usa.net> Message-ID: <200005022314.JAA08665@indy05.csse.monash.edu.au> Scott Blachowicz wrote: > Note that the parens are special, so if you want them to match literal > parens you need to escape them: > > $Line =~ s/name last chng bid ask vol\(H\) Alternatively, the \Q metacharacter turns off all other special characters that follow it: $Line =~ s/\Qname last chng bid ask vol(H) high low ahigh alow//; Damian - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From Gimpit at netscape.net Wed May 3 20:26:45 2000 From: Gimpit at netscape.net (Jay Scherrer) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Thanks Message-ID: <20000504012646.8302.qmail@www0b.netaddress.usa.net> Thanks for saving mind, I had tried every other possible solution from using [string] and "string" for that line. Yep it was was those pesky ()'s that did it. Thanks again, Jay Scherrer ____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From christopher at cavnor.com Wed May 3 21:55:08 2000 From: christopher at cavnor.com (Christopher Cavnor) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: removing common words Message-ID: <00ef01bfb574$56c30b40$919727d8@daneel> Does anyone know of a module that can extract common words (aka "stop words") from a text file or scalar? Specifically, I want to parse something like: "The foo that foo's it's foo is likely to foo time and time again" to something like this -> "foo foo's foo likely foo time time again" I searched CPAN, and was amazed not to find such a simple mod. Yes, I can wrote it myself - but it might take me more time than I want to invest to figure a nice breadth of stop words. thnx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20000503/f9762883/attachment.htm From andy at n2h2.com Wed May 3 22:05:16 2000 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: removing common words In-Reply-To: <00ef01bfb574$56c30b40$919727d8@daneel> Message-ID: On May 3, 2000 @ 7:55pm, Christopher Cavnor wrote: > Does anyone know of a module that can extract common words (aka "stop > words") from a text file or scalar? Specifically, I want to parse > something like: > > "The foo that foo's it's foo is likely to foo time and time again" > to something like this -> "foo foo's foo likely foo time time again" > > I searched CPAN, and was amazed not to find such a simple mod. Yes, I > can wrote it myself - but it might take me more time than I want to > invest to figure a nice breadth of stop words. Take a look at the Lingua:: family. You may need to adapt something to suite your needs. I'm not really sure I understand the purpose of what you're trying to do. Any chance you're trying to compress text for a pager? -- Andrew Sweger | N2H2, Incorporated Systems Architect | 900 Fourth Avenue, Suite 3400 Advanced Technologies Division | Seattle WA 98164-1059 v=206.336.2947 f=206.336.1541 | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From dean at ero.com Thu May 4 00:00:38 2000 From: dean at ero.com (Dean Hudson) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: removing common words In-Reply-To: <00ef01bfb574$56c30b40$919727d8@daneel> Message-ID: On Wed, 3 May 2000, Christopher Cavnor wrote: > Does anyone know of a module that can extract common words (aka "stop > words") from a text file or scalar? Specifically, I want to parse > something like: > > "The foo that foo's it's foo is likely to foo time and time again" > to something like this -> "foo foo's foo likely foo time time again" Here are a couple lists I found by searching for "stop words", "stop words lists" on google: http://www.library.csustan.edu/catalog/doc/oclc5.htm http://www.access.gpo.gov/su_docs/dpos/stopword.html http://www.cqs.washington.edu/crisp/lit/stop.html The lists seem suprisingly short, so you could probably whip something up that has basic functionality pretty quickly... dean. -- my $email = qr{ dean(h)?@(?(1)verio\.net # @ work if h | ero\.com) }x; # other - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From torin at daft.com Thu May 4 00:58:22 2000 From: torin at daft.com (Darren/Torin/Who Ever...) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Thanks In-Reply-To: Jay Scherrer's message of "3 May 00 18:26:45 PDT" References: <20000504012646.8302.qmail@www0b.netaddress.usa.net> Message-ID: <87aei63lhd.fsf@perv.daft.com> Jay Scherrer, in an immanent manifestation of deity, wrote: >I had tried every other possible solution from using [string] and "string" for >that line. Yep it was was those pesky ()'s that did it. Remember that rather than special casing the []'s, use \Q...\E, they are most definitely your friends. About the only real problem with them are that you can't have a literal $ or @ in there. Oops. Darren -- Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996 @ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @ @ Make a little hot-tub in your soul. @ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From stuart_poulin at yahoo.com Thu May 4 10:11:13 2000 From: stuart_poulin at yahoo.com (Stuart Poulin) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Thanks Message-ID: <20000504151113.20123.qmail@web117.yahoomail.com> You could use \Q\E multiple times: \Q(foo)\E$bar\Q*foo\E But like Jim's RE pointed out, I don't like to get fooled by things like extra spaces and tabs. So one thing I do once in a while is use the quotemeta() function: perl -e "print quotemeta q{something (I'm) trying to quote}" (I'm on NT, if I was on Unix I'd suround it with single quotes.) Then go through the output convert it to a RE by changing multiple "\ " to "\s+", etc. Then I stuff in the ${variables} where I want them. --- "Darren/Torin/Who Ever..." wrote: > Jay Scherrer, in an immanent manifestation of deity, wrote: > >I had tried every other possible solution from using [string] and "string" > for > >that line. Yep it was was those pesky ()'s that did it. > > Remember that rather than special casing the []'s, use \Q...\E, they are > most definitely your friends. About the only real problem with them are > that you can't have a literal $ or @ in there. Oops. > > Darren > -- > > > Darren Stalder/2608 Second Ave, @282/Seattle, WA > 98121-1212/USA/+1-800-921-4996 > @ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor > @ > @ Make a little hot-tub in your soul. @ > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From Shamon22 at aol.com Thu May 4 10:57:28 2000 From: Shamon22 at aol.com (Shamon22@aol.com) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: CPAN Mail::Mailer ...help! Message-ID: <26.5362902.2642f7e8@aol.com> Hello fellow SPUGers! I am trying to get my Mail::Mailer CPAN modual to work. I have written a script to take in an html form and (supposedly) pipe it out to another email address. Here is my script: ****************************************************** #!/usr/bin/perl # cgi-bin/contact.cgi:Information sending program. # TESTING --Contact.html(v2) use Mail::Mailer; $mailer = Mail::Mailer->new("sendmail"); $mailer->open({ From => $email, To => $mailto, Subject => $subject, }) or die "Can't open: $!\n"; print $mailer $body; $mailer->close(); ******************************************************* ..and here is the error straight from the logs: ******************************************************* [Wed May 3 08:06:01 2000] [error] malformed header from script. Bad header=No recipient addresses found i: /home/httpd/cgi-bin/contact2.cgi ******************************************************* If it is any help to you all, I based this script off of the one listed in O'Reilly's "Perl Cookbook", pg.651. -Garrett - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From LaurenS at bsquare.com Thu May 4 12:26:47 2000 From: LaurenS at bsquare.com (Lauren Smith) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: CPAN Mail::Mailer ...help! Message-ID: <75514FC5ECC8D2118C8D00A0C9ED54DB91447A@obcmail1.bsquare.com> > #!/usr/bin/perl I like having the '-w' at the end of that line. > > # cgi-bin/contact.cgi:Information sending program. > # TESTING --Contact.html(v2) > > use Mail::Mailer; > > $mailer = Mail::Mailer->new("sendmail"); > $mailer->open({ From => $email, > To => $mailto, > Subject => $subject, > }) > or die "Can't open: $!\n"; > print $mailer $body; > $mailer->close(); > > ******************************************************* > ..and here is the error straight from the logs: > > ******************************************************* > [Wed May 3 08:06:01 2000] [error] malformed header from script. Bad > header=No recipient addresses found i: > /home/httpd/cgi-bin/contact2.cgi > ******************************************************* This may be a silly question, but have you assigned values to $email, $mailto, and $subject? Lauren - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From dean at ero.com Thu May 4 12:56:12 2000 From: dean at ero.com (Dean Hudson) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: CPAN Mail::Mailer ...help! In-Reply-To: <26.5362902.2642f7e8@aol.com> Message-ID: On Thu, 4 May 2000 Shamon22@aol.com wrote: > Here is my script: > ****************************************************** > > #!/usr/bin/perl > > # cgi-bin/contact.cgi:Information sending program. > # TESTING --Contact.html(v2) > > use Mail::Mailer; > > $mailer = Mail::Mailer->new("sendmail"); > $mailer->open({ From => $email, > To => $mailto, > Subject => $subject, > }) > or die "Can't open: $!\n"; > print $mailer $body; > $mailer->close(); [...] > ******************************************************* > [Wed May 3 08:06:01 2000] [error] malformed header from script. Bad > header=No recipient addresses found i: /home/httpd/cgi-bin/contact2.cgi > ******************************************************* Looks fishy. Try debugging your cgi to make sure the variables are being populated properly from the form. You may want to try piping into sendmail directly (also on the same page of the Cookbook, I believe) to see if you get the same error. dean. -- my $email = qr{ dean(h)?@(?(1)verio\.net # @ work if h | ero\.com) }x; # other - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From dvergin at igc.org Thu May 4 13:01:17 2000 From: dvergin at igc.org (David Vergin) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: CPAN Mail::Mailer ...help! In-Reply-To: <26.5362902.2642f7e8@aol.com> Message-ID: <000101bfb5f2$beb96f40$2801a8c0@bigmindmedia.com> That is indeed what appears on that page. I do not use Mail::Mailer; preferring the direct approach that follows that example in the book. But at the very least you will need to specify the contents of $email, $mailto, and $subject. Although sometimes I wonder, in fact, Perl cannot read your mind. See below for sample insertion. Note that if you use double quotes at some point for email addresses you have to escape the @ thus: "Shamon22\@aol.com" Regards, david > ****************************************************** > > #!/usr/bin/perl > > # cgi-bin/contact.cgi:Information sending program. > # TESTING --Contact.html(v2) > > use Mail::Mailer; $email = 'Shamon22@aol.com'; $mailto = 'someone@somewhere.com'; # insert desired recipient here $subject = 'This is the subject line'; # insert your subject here $body = 'A whole bunch of text that might' # your message here . ' go on and on for several lines.'; > $mailer = Mail::Mailer->new("sendmail"); > $mailer->open({ From => $email, > To => $mailto, > Subject => $subject, > }) > or die "Can't open: $!\n"; > print $mailer $body; > $mailer->close(); > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From tim at consultix-inc.com Thu May 4 13:19:37 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: CPAN Mailer Message-ID: <20000504111937.C17815@timji.consultix.wa.com> ----- Forwarded message from owner-spug-list@pm.org ----- From: owner-spug-list@pm.org Date: Thu, 4 May 2000 13:33:03 -0400 (EDT) X-Authentication-Warning: happyfunball.pm.org: mjordomo set sender to owner-spug-list@pm.org using -f To: owner-spug-list@pm.org Subject: BOUNCE spug-list@pm.org: Admin request of type /^sub\b/i at line 4 >From tim@consultix-inc.com Thu May 4 13:33:01 2000 Received: from jason04.u.washington.edu (root@jason04.u.washington.edu [140.142.78.5]) by happyfunball.pm.org (8.9.3/8.9.1) with ESMTP id NAA08961 for ; Thu, 4 May 2000 13:33:00 -0400 (EDT) Received: from dante30.u.washington.edu (ryannn@dante30.u.washington.edu [140.142.15.212]) by jason04.u.washington.edu (8.9.3+UW99.09/8.9.3+UW00.01) with ESMTP id KAA13638; Thu, 4 May 2000 10:38:21 -0700 Received: from localhost (ryannn@localhost) by dante30.u.washington.edu (8.9.3+UW99.09/8.9.3+UW99.09) with ESMTP id KAA137918; Thu, 4 May 2000 10:38:18 -0700 Date: Thu, 4 May 2000 10:38:18 -0700 (PDT) From: "R. Christianson" To: Lauren Smith cc: "'Shamon22@aol.com'" , spug-list@pm.org Subject: RE: SPUG: CPAN Mail::Mailer ...help! In-Reply-To: <75514FC5ECC8D2118C8D00A0C9ED54DB91447A@obcmail1.bsquare.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII If that doesnt work, you could do something like this: $mailprog = '/usr/sbin/sendmail'; [s]ub send_mail { my ( $to,$from,$subject,$text ) = @_; # Open The Mail Program open(MAIL,"|$mailprog -t"); print MAIL "To: " . $to . "\n"; print MAIL "From:" . $from . "\n"; print MAIL "Subject: " . $subject . "\n\n"; print MAIL $text; close (MAIL); } Ryan Christianson On Thu, 4 May 2000, Lauren Smith wrote: > > > > #!/usr/bin/perl > > I like having the '-w' at the end of that line. > > > > > # cgi-bin/contact.cgi:Information sending program. > > # TESTING --Contact.html(v2) > > > > use Mail::Mailer; > > > > $mailer = Mail::Mailer->new("sendmail"); > > $mailer->open({ From => $email, > > To => $mailto, > > Subject => $subject, > > }) > > or die "Can't open: $!\n"; > > print $mailer $body; > > $mailer->close(); > > > > ******************************************************* > > ..and here is the error straight from the logs: > > > > ******************************************************* > > [Wed May 3 08:06:01 2000] [error] malformed header from script. Bad > > header=No recipient addresses found i: > > /home/httpd/cgi-bin/contact2.cgi > > ******************************************************* > > This may be a silly question, but have you assigned values to $email, > $mailto, and $subject? > > Lauren > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From robg at techie.com Fri May 5 13:04:31 2000 From: robg at techie.com (Rob Garrett) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? Message-ID: <380361039.957549871263.JavaMail.root@web302-mc.mail.com> Good morning - I'd appreciate a little help understanding the behavior of the following script. I've included 3 versions of the same script which are identical except for the subset of lines which have been commented out. The first example is producing the results I want but I was trying to streamline the logic. Thanks for your help. Rob - - - - - - - - - - - - - - - Version 1 #!/usr/bin/perl %DATA; $dsku = 'fred'; @prices = ('11.11','22.22','33.33','44.44'); $DATA{$dsku}[0] = '00.00'; #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; $DATA{$dsku}[1] = @prices[0]; $DATA{$dsku}[2] = @prices[1]; $DATA{$dsku}[3] = @prices[2]; $DATA{$dsku}[4] = @prices[3]; $DATA{$dsku}[5] = '55.55'; for ( my $i = 0; $i < 6; $i++ ) { print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; } ====> $DATA{$sku}[0] = '00.00' $DATA{$sku}[1] = '11.11' $DATA{$sku}[2] = '22.22' $DATA{$sku}[3] = '33.33' $DATA{$sku}[4] = '44.44' $DATA{$sku}[5] = '55.55' - - - - - - - - - - - - - - - Version 2 #!/usr/bin/perl %DATA; $dsku = 'fred'; @prices = ('11.11','22.22','33.33','44.44'); $DATA{$dsku}[0] = '00.00'; $DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; #$DATA{$dsku}[1] = @prices[0]; #$DATA{$dsku}[2] = @prices[1]; #$DATA{$dsku}[3] = @prices[2]; #$DATA{$dsku}[4] = @prices[3]; $DATA{$dsku}[5] = '55.55'; for ( my $i = 0; $i < 6; $i++ ) { print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; } ====> $DATA{$sku}[0] = '44.44' $DATA{$sku}[1] = '' $DATA{$sku}[2] = '' $DATA{$sku}[3] = '' $DATA{$sku}[4] = '' $DATA{$sku}[5] = '55.55' - - - - - - - - - - - - - - - Version 3 #!/usr/bin/perl %DATA; $dsku = 'fred'; @prices = ('11.11','22.22','33.33','44.44'); $DATA{$dsku}[0] = '00.00'; #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; $DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; #$DATA{$dsku}[1] = @prices[0]; #$DATA{$dsku}[2] = @prices[1]; #$DATA{$dsku}[3] = @prices[2]; #$DATA{$dsku}[4] = @prices[3]; $DATA{$dsku}[5] = '55.55'; for ( my $i = 0; $i < 6; $i++ ) { print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; } ====> $DATA{$sku}[0] = '00.00' $DATA{$sku}[1] = '' $DATA{$sku}[2] = '' $DATA{$sku}[3] = '' $DATA{$sku}[4] = '44.44' $DATA{$sku}[5] = '55.55' ______________________________________________ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From largest at largest.org Fri May 5 13:30:59 2000 From: largest at largest.org (Joel) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: Message-ID: I'm not completely clear on what you're trying to do, but it looks like something like this would work for you: #!/usr/bin/perl # You should always use strict :-) use strict; my %DATA; my $dsku = 'fred'; my @prices = ('11.11','22.22','33.33','44.44'); @{ $DATA{$dsku} } = ('00.00', @prices, '55.55'); my $count; for my $element ( @{ $DATA{$dsku} } ) { $count++; print "\$DATA{\$sku}[$count] = '$element'\n"; } __END__ Joel > I'd appreciate a little help understanding the behavior of the > following script. > > I've included 3 versions of the same script which are identical except > for the subset of lines which have been commented out. > > The first example is producing the results I want but I was trying to > streamline the logic. > > - - - - - - - - - - - - - - - Version 1 > > #!/usr/bin/perl > %DATA; > $dsku = 'fred'; > @prices = ('11.11','22.22','33.33','44.44'); > $DATA{$dsku}[0] = '00.00'; > #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > $DATA{$dsku}[1] = @prices[0]; > $DATA{$dsku}[2] = @prices[1]; > $DATA{$dsku}[3] = @prices[2]; > $DATA{$dsku}[4] = @prices[3]; > $DATA{$dsku}[5] = '55.55'; > > for ( my $i = 0; $i < 6; $i++ ) > { > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > } > ====> > $DATA{$sku}[0] = '00.00' > $DATA{$sku}[1] = '11.11' > $DATA{$sku}[2] = '22.22' > $DATA{$sku}[3] = '33.33' > $DATA{$sku}[4] = '44.44' > $DATA{$sku}[5] = '55.55' > > - - - - - - - - - - - - - - - Version 2 > > #!/usr/bin/perl > %DATA; > $dsku = 'fred'; > @prices = ('11.11','22.22','33.33','44.44'); > $DATA{$dsku}[0] = '00.00'; > $DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > #$DATA{$dsku}[1] = @prices[0]; > #$DATA{$dsku}[2] = @prices[1]; > #$DATA{$dsku}[3] = @prices[2]; > #$DATA{$dsku}[4] = @prices[3]; > $DATA{$dsku}[5] = '55.55'; > > for ( my $i = 0; $i < 6; $i++ ) > { > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > } > ====> > $DATA{$sku}[0] = '44.44' > $DATA{$sku}[1] = '' > $DATA{$sku}[2] = '' > $DATA{$sku}[3] = '' > $DATA{$sku}[4] = '' > $DATA{$sku}[5] = '55.55' > > - - - - - - - - - - - - - - - Version 3 > > #!/usr/bin/perl > %DATA; > $dsku = 'fred'; > @prices = ('11.11','22.22','33.33','44.44'); > $DATA{$dsku}[0] = '00.00'; > #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > $DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > #$DATA{$dsku}[1] = @prices[0]; > #$DATA{$dsku}[2] = @prices[1]; > #$DATA{$dsku}[3] = @prices[2]; > #$DATA{$dsku}[4] = @prices[3]; > $DATA{$dsku}[5] = '55.55'; > > for ( my $i = 0; $i < 6; $i++ ) > { > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > } > ====> > $DATA{$sku}[0] = '00.00' > $DATA{$sku}[1] = '' > $DATA{$sku}[2] = '' > $DATA{$sku}[3] = '' > $DATA{$sku}[4] = '44.44' > $DATA{$sku}[5] = '55.55' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From largest at largest.org Fri May 5 13:46:25 2000 From: largest at largest.org (Joel) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: Message-ID: Replying to myself here... I now see you were talking about slices. If this is what you want, you could do one of the following 2 ways: #!/usr/bin/perl # You should always use strict use strict; my %DATA; my $dsku = 'fred'; my @prices = ('11.11','22.22','33.33','44.44'); # EITHER THIS $DATA{$dsku}[0] = '00.00'; @{ $DATA{$dsku} }[1..4] = @prices; $DATA{$dsku}[5] = '55.55'; # OR THIS @{ $DATA{$dsku} }[0..5] = ('00.00', @prices, '55.55'); #I also moved my $count++ so that it reflects 0-5, not 1-6 my $count = 0; for my $element ( @{ $DATA{$dsku} } ) { print "\$DATA{\$sku}[$count] = '$element'\n"; $count++; } __END__ HTH Joel On Fri, 5 May 2000, Joel wrote: > I'm not completely clear on what you're trying to do, but it looks like > something like this would work for you: > > > #!/usr/bin/perl > > # You should always use strict :-) > use strict; > > my %DATA; > my $dsku = 'fred'; > my @prices = ('11.11','22.22','33.33','44.44'); > > @{ $DATA{$dsku} } = ('00.00', @prices, '55.55'); > > my $count; > for my $element ( @{ $DATA{$dsku} } ) { > $count++; > print "\$DATA{\$sku}[$count] = '$element'\n"; > } > > __END__ > > Joel > > > > > I'd appreciate a little help understanding the behavior of the > > following script. > > > > I've included 3 versions of the same script which are identical except > > for the subset of lines which have been commented out. > > > > The first example is producing the results I want but I was trying to > > streamline the logic. > > > > - - - - - - - - - - - - - - - Version 1 > > > > #!/usr/bin/perl > > %DATA; > > $dsku = 'fred'; > > @prices = ('11.11','22.22','33.33','44.44'); > > $DATA{$dsku}[0] = '00.00'; > > #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > > #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > > $DATA{$dsku}[1] = @prices[0]; > > $DATA{$dsku}[2] = @prices[1]; > > $DATA{$dsku}[3] = @prices[2]; > > $DATA{$dsku}[4] = @prices[3]; > > $DATA{$dsku}[5] = '55.55'; > > > > for ( my $i = 0; $i < 6; $i++ ) > > { > > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > > } > > ====> > > $DATA{$sku}[0] = '00.00' > > $DATA{$sku}[1] = '11.11' > > $DATA{$sku}[2] = '22.22' > > $DATA{$sku}[3] = '33.33' > > $DATA{$sku}[4] = '44.44' > > $DATA{$sku}[5] = '55.55' > > > > - - - - - - - - - - - - - - - Version 2 > > > > #!/usr/bin/perl > > %DATA; > > $dsku = 'fred'; > > @prices = ('11.11','22.22','33.33','44.44'); > > $DATA{$dsku}[0] = '00.00'; > > $DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > > #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > > #$DATA{$dsku}[1] = @prices[0]; > > #$DATA{$dsku}[2] = @prices[1]; > > #$DATA{$dsku}[3] = @prices[2]; > > #$DATA{$dsku}[4] = @prices[3]; > > $DATA{$dsku}[5] = '55.55'; > > > > for ( my $i = 0; $i < 6; $i++ ) > > { > > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > > } > > ====> > > $DATA{$sku}[0] = '44.44' > > $DATA{$sku}[1] = '' > > $DATA{$sku}[2] = '' > > $DATA{$sku}[3] = '' > > $DATA{$sku}[4] = '' > > $DATA{$sku}[5] = '55.55' > > > > - - - - - - - - - - - - - - - Version 3 > > > > #!/usr/bin/perl > > %DATA; > > $dsku = 'fred'; > > @prices = ('11.11','22.22','33.33','44.44'); > > $DATA{$dsku}[0] = '00.00'; > > #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > > $DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > > #$DATA{$dsku}[1] = @prices[0]; > > #$DATA{$dsku}[2] = @prices[1]; > > #$DATA{$dsku}[3] = @prices[2]; > > #$DATA{$dsku}[4] = @prices[3]; > > $DATA{$dsku}[5] = '55.55'; > > > > for ( my $i = 0; $i < 6; $i++ ) > > { > > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > > } > > ====> > > $DATA{$sku}[0] = '00.00' > > $DATA{$sku}[1] = '' > > $DATA{$sku}[2] = '' > > $DATA{$sku}[3] = '' > > $DATA{$sku}[4] = '44.44' > > $DATA{$sku}[5] = '55.55' > > --------------------------------------------------- Procedure Computers_Move(var CPU_Turn :boolean); var a:integer; begin writeln('Computer decides to skip this round. '); CPU_Turn := False; end; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From ned at bike-nomad.com Fri May 5 14:19:37 2000 From: ned at bike-nomad.com (Ned Konz) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? References: <380361039.957549871263.JavaMail.root@web302-mc.mail.com> Message-ID: <39131EC9.7D73DBF7@bike-nomad.com> Rob Garrett wrote: > $DATA{$dsku}[0] = '00.00'; So $DATA{$dsku} holds a reference to an array containing one object. > #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; If you want to do array slice assignment, you have to have an array on the left hand side too: @{$DATA{$dsku}}[1 .. 4] = @prices[0 .. 3]; -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://www.bike-nomad.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From debert at dusya.osd.com Fri May 5 14:27:54 2000 From: debert at dusya.osd.com (Daniel V. Ebert) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: References: Message-ID: <200005051927.AA06259@dusya.osd.com> This thread has sparked a couple questions. 1. I haven't seen this type of thing before @{ $DATA{$dsku} } and was wondering if someone could write it out 'longhand' If there is a bit of the Camel or Llama book that covers it I can read it myself, but didn't find one im my search. 2. I often see people saying "always use strict" ... is there some recommended reading on that subject? Thanks for your time! Dan. ============== It's poetry in motion She turned her tender eyes to me As deep as any ocean As sweet as any harmony -Thomas Dolby You wrote: > Replying to myself here... > > I now see you were talking about slices. If this is what you want, you > could do one of the following 2 ways: > > > #!/usr/bin/perl > > # You should always use strict > use strict; > > my %DATA; > my $dsku = 'fred'; > my @prices = ('11.11','22.22','33.33','44.44'); > > > # EITHER THIS > $DATA{$dsku}[0] = '00.00'; > @{ $DATA{$dsku} }[1..4] = @prices; > $DATA{$dsku}[5] = '55.55'; > > # OR THIS > @{ $DATA{$dsku} }[0..5] = ('00.00', @prices, '55.55'); > > > #I also moved my $count++ so that it reflects 0-5, not 1-6 > my $count = 0; > > for my $element ( @{ $DATA{$dsku} } ) { > print "\$DATA{\$sku}[$count] = '$element'\n"; > $count++; > } > > __END__ > > HTH > > Joel > > > > On Fri, 5 May 2000, Joel wrote: > > > I'm not completely clear on what you're trying to do, but it looks like > > something like this would work for you: > > > > > > #!/usr/bin/perl > > > > # You should always use strict :-) > > use strict; > > > > my %DATA; > > my $dsku = 'fred'; > > my @prices = ('11.11','22.22','33.33','44.44'); > > > > @{ $DATA{$dsku} } = ('00.00', @prices, '55.55'); > > > > my $count; > > for my $element ( @{ $DATA{$dsku} } ) { > > $count++; > > print "\$DATA{\$sku}[$count] = '$element'\n"; > > } > > > > __END__ > > > > Joel > > > > > > > > > I'd appreciate a little help understanding the behavior of the > > > following script. > > > > > > I've included 3 versions of the same script which are identical except > > > for the subset of lines which have been commented out. > > > > > > The first example is producing the results I want but I was trying to > > > streamline the logic. > > > > > > - - - - - - - - - - - - - - - Version 1 > > > > > > #!/usr/bin/perl > > > %DATA; > > > $dsku = 'fred'; > > > @prices = ('11.11','22.22','33.33','44.44'); > > > $DATA{$dsku}[0] = '00.00'; > > > #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > > > #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > > > $DATA{$dsku}[1] = @prices[0]; > > > $DATA{$dsku}[2] = @prices[1]; > > > $DATA{$dsku}[3] = @prices[2]; > > > $DATA{$dsku}[4] = @prices[3]; > > > $DATA{$dsku}[5] = '55.55'; > > > > > > for ( my $i = 0; $i < 6; $i++ ) > > > { > > > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > > > } > > > ====> > > > $DATA{$sku}[0] = '00.00' > > > $DATA{$sku}[1] = '11.11' > > > $DATA{$sku}[2] = '22.22' > > > $DATA{$sku}[3] = '33.33' > > > $DATA{$sku}[4] = '44.44' > > > $DATA{$sku}[5] = '55.55' > > > > > > - - - - - - - - - - - - - - - Version 2 > > > > > > #!/usr/bin/perl > > > %DATA; > > > $dsku = 'fred'; > > > @prices = ('11.11','22.22','33.33','44.44'); > > > $DATA{$dsku}[0] = '00.00'; > > > $DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > > > #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > > > #$DATA{$dsku}[1] = @prices[0]; > > > #$DATA{$dsku}[2] = @prices[1]; > > > #$DATA{$dsku}[3] = @prices[2]; > > > #$DATA{$dsku}[4] = @prices[3]; > > > $DATA{$dsku}[5] = '55.55'; > > > > > > for ( my $i = 0; $i < 6; $i++ ) > > > { > > > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > > > } > > > ====> > > > $DATA{$sku}[0] = '44.44' > > > $DATA{$sku}[1] = '' > > > $DATA{$sku}[2] = '' > > > $DATA{$sku}[3] = '' > > > $DATA{$sku}[4] = '' > > > $DATA{$sku}[5] = '55.55' > > > > > > - - - - - - - - - - - - - - - Version 3 > > > > > > #!/usr/bin/perl > > > %DATA; > > > $dsku = 'fred'; > > > @prices = ('11.11','22.22','33.33','44.44'); > > > $DATA{$dsku}[0] = '00.00'; > > > #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > > > $DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > > > #$DATA{$dsku}[1] = @prices[0]; > > > #$DATA{$dsku}[2] = @prices[1]; > > > #$DATA{$dsku}[3] = @prices[2]; > > > #$DATA{$dsku}[4] = @prices[3]; > > > $DATA{$dsku}[5] = '55.55'; > > > > > > for ( my $i = 0; $i < 6; $i++ ) > > > { > > > print "\$DATA{\$sku}[$i] = '$DATA{$dsku}[$i]'\n"; > > > } > > > ====> > > > $DATA{$sku}[0] = '00.00' > > > $DATA{$sku}[1] = '' > > > $DATA{$sku}[2] = '' > > > $DATA{$sku}[3] = '' > > > $DATA{$sku}[4] = '44.44' > > > $DATA{$sku}[5] = '55.55' > > > > > > --------------------------------------------------- > Procedure Computers_Move(var CPU_Turn :boolean); > var a:integer; > begin > writeln('Computer decides to skip this round. '); > CPU_Turn := False; > end; > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From lou at visca.com Fri May 5 14:55:06 2000 From: lou at visca.com (Lou Hevly) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: <380361039.957549871263.JavaMail.root@web302-mc.mail.com> Message-ID: <3.0.6.32.20000505205506.00833750@visca.com> At 14:04 05/05/00 -0400, Rob Garrett wrote: >Good morning - > >I'd appreciate a little help understanding the >behavior of the following script. > >I've included 3 versions of the same script >which are identical except for the subset of >lines which have been commented out. How 'bout a *hash* slice? Also, using Data::Dumper will help us visualize what's actually going on. ---- #!/usr/bin/perl -w use strict; use Data::Dumper; my %data; my $dsku = 'fred'; my @prices = ('00.00', '11.11','22.22','33.33','44.44'); @{$data{$dsku}} = @prices; for my $i (0.. $#{$data{$dsku}} ) { print "\$data{\$dsku}[$i] = '$data{$dsku}[$i]'\n"; } # or print Dumper %data; ---- RESULT: $data{$dsku}[0] = '00.00' $data{$dsku}[1] = '11.11' $data{$dsku}[2] = '22.22' $data{$dsku}[3] = '33.33' $data{$dsku}[4] = '44.44' $VAR1 = 'fred'; $VAR2 = [ '00.00', '11.11', '22.22', '33.33', '44.44' ]; ---- HTH. -- All the best (Ad?u-siau), Lou Hevly lou@visca.com http://www.visca.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From robg at techie.com Fri May 5 14:54:18 2000 From: robg at techie.com (Rob Garrett) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? Message-ID: <380295273.957556458961.JavaMail.root@web135-mc.mail.com> Thanks Joel and Ned - That's it! I wasn't seeing the forest for the trees (the array reference behind the subscripts). I was using the slice to "cast/transform/..." the @prices array into a list of exactly 4 elements regardless of the size of the array (and this seems to work). I could accomplish the same result by setting the array size prior to assigning its contents to %DATA? Thanks! Rob ------Original Message------ From: Joel To: spug-list@pm.org Sent: May 5, 2000 6:46:25 PM GMT Subject: Re: SPUG: Slice of an arrary within a hash? Replying to myself here... I now see you were talking about slices. If this is what you want, you could do one of the following 2 ways: #!/usr/bin/perl # You should always use strict use strict; my %DATA; my $dsku = 'fred'; my @prices = ('11.11','22.22','33.33','44.44'); # EITHER THIS $DATA{$dsku}[0] = '00.00'; @{ $DATA{$dsku} }[1..4] = @prices; $DATA{$dsku}[5] = '55.55'; # OR THIS @{ $DATA{$dsku} }[0..5] = ('00.00', @prices, '55.55'); #I also moved my $count++ so that it reflects 0-5, not 1-6 my $count = 0; for my $element ( @{ $DATA{$dsku} } ) { print "\$DATA{\$sku}[$count] = '$element'\n"; $count++; } __END__ HTH Joel ______________________________________________ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From cmeyer at helvella.org Fri May 5 16:40:32 2000 From: cmeyer at helvella.org (Colin Meyer) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: <200005051927.AA06259@dusya.osd.com> References: <200005051927.AA06259@dusya.osd.com> Message-ID: <20000505144032.H13772@hobart.helvella.org> Daniel, On Fri, May 05, 2000 at 12:27:54PM -0700, Daniel V. Ebert wrote: > > This thread has sparked a couple questions. > > 1. I haven't seen this type of thing before > @{ $DATA{$dsku} } > and was wondering if someone could write it out 'longhand' > > If there is a bit of the Camel or Llama book that covers it I can read it > myself, but didn't find one im my search. @{ $hashvar{key} } = (1..3) is spoken in another dialect as: $hashvar{key} = [1..3]; Personally, I find the latter version to be more clear. I use the first version when an array is specifically called for, such as with push: push @{$hashvar{key}}, 4..6; For more detail, look to: perldoc perlref perldoc perldata > > 2. I often see people saying "always use strict" ... is there some > recommended reading on that subject? perldoc strict -C. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From ced at carios2.ca.boeing.com Fri May 5 14:19:43 2000 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? Message-ID: <200005051919.MAA11670@carios2.ca.boeing.com> > #!/usr/bin/perl -w ^^^^^^ ^^^^^^ # enable warnings above. See -w # in action below: use strict; # this is important too. > %DATA; > $dsku = 'fred'; > @prices = ('11.11','22.22','33.33','44.44'); > $DATA{$dsku}[0] = '00.00'; > #$DATA{$dsku}[1 .. 4] = @prices[0 .. 3]; > #$DATA{$dsku}[1,2,3,4] = @prices[0,1,2,3]; > $DATA{$dsku}[1] = @prices[0]; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you'd used -w, you'd have been gently tipped about the assignment above; Scalar value @prices[0] better written as $prices[0] at line... Look at perldiag for that warning format and a completer explanation: perldoc perldiag Or simply use the diagnostics module at the top of your program to get the warning plus explanation during program execution: use diagnostics; Otherwise, a possible bit of streamlining: my %DATA; my @prices = ('11.11','22.22','33.33','44.44'); my $dsku = 'fred'; $DATA{$dsku} = [ '00.00', @prices, '55.55' ]; The Perl data structures cookbook is a great reference with plenty of examples of this kind of thing: perldoc perldsc Rgds, -- Charles DeRykus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From largest at largest.org Fri May 5 18:56:00 2000 From: largest at largest.org (Joel) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: <20000505144032.H13772@hobart.helvella.org> Message-ID: > ced@carios2.ca.boeing.com wrote > > #!/usr/bin/perl -w > ^^^^^^ > ^^^^^^ > # enable warnings above. See -w > # in action below: <$0.02> -w is a great tool, but I don't put it in the shebang line of my perl scripts. This is because it turns on warnings for *all* Perl involved in the script, which includes all use'd modules and all modules the use'd modules use, and so on. Also, it will sometimes warn me about things that I know are okay. You can turn off the warnings temporarily by local'izing the $^W variable around code you know might generate a warning. But at work there are some older modules that are crufty and generate lots of (allowable) warnings. So I get tired of reading a page of warnings I already know about every time I run the script. (yes I realize someone should go fix the old modules :-) My solution? When I'm stumped on a debug or want to verify my code before checking into production, I run perl -cw myscript which shows me the warnings. Joel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From ChrisM at courtlink.com Fri May 5 20:10:07 2000 From: ChrisM at courtlink.com (Christopher Maujean) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? Message-ID: On the other hand, I always use -w and use strict; I code to fit them both and have far fewer problems than I used to. There are (very very) few and far between cases where I explicitly need to turn off strict ref's or subs, etc for a small block of code, but I make sure I have a very good reason, I heavily document that reason in the code and turn full strict back on immediatly after that block. If a module can't pass strict and -w I won't be using it in production code. I try to write every program as if it were to be used by paying customers who will judge me by it. --Christopher Maujean ***NOT representing Courtlink or Data West Corporation in any way shape or form.*** -----Original Message----- From: Joel [mailto:largest@largest.org] Sent: Friday, May 05, 2000 4:56 PM To: spug-list@pm.org Subject: Re: SPUG: Slice of an arrary within a hash? > ced@carios2.ca.boeing.com wrote > > #!/usr/bin/perl -w > ^^^^^^ > ^^^^^^ > # enable warnings above. See -w > # in action below: <$0.02> -w is a great tool, but I don't put it in the shebang line of my perl scripts. This is because it turns on warnings for *all* Perl involved in the script, which includes all use'd modules and all modules the use'd modules use, and so on. Also, it will sometimes warn me about things that I know are okay. You can turn off the warnings temporarily by local'izing the $^W variable around code you know might generate a warning. But at work there are some older modules that are crufty and generate lots of (allowable) warnings. So I get tired of reading a page of warnings I already know about every time I run the script. (yes I realize someone should go fix the old modules :-) My solution? When I'm stumped on a debug or want to verify my code before checking into production, I run perl -cw myscript which shows me the warnings. Joel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From ced at carios2.ca.boeing.com Fri May 5 20:14:28 2000 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? Message-ID: <200005060114.SAA12882@carios2.ca.boeing.com> > -w is a great tool, but I don't put it in the > shebang line of my perl scripts. This is because > it turns on warnings for *all* Perl involved in > the script, which includes all use'd modules and > all modules the use'd modules use, and so on. > Also, it will sometimes warn me about things that > I know are okay. > You can turn off the warnings temporarily by > local'izing the $^W variable around code you > know might generate a warning. But at work > there are some older modules that are crufty > and generate lots of (allowable) warnings. > So I get tired of reading a page of warnings > I already know about every time I run the script. > (yes I realize someone should go fix the old > modules :-) > My solution? When I'm stumped on a debug or want > to verify my code before > checking into production, I run > perl -cw myscript Very true. I was delighted though to hear that 5.6 offers lexical warnings so you can control many of these toxic spills: For instance, I believe I remember: no warnings qw(uninitialied); ... will turn off those pesky "Use of uninitialized.." warnings while retaining others you do want to see. Rgds, -- Charles DeRykus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From stuart_poulin at yahoo.com Fri May 5 20:26:17 2000 From: stuart_poulin at yahoo.com (Stuart Poulin) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? Message-ID: <20000506012617.14826.qmail@web113.yahoomail.com> I feel the same, I feel -w is more for development phases. I sometimes add: BEGIN { $^W= $^W || $ENV{PERL_DEV} ? 1 : 0 ; } To my scripts. Then set PERL_DEV=true when I'm working on the scripts. --- Joel wrote: > > ced@carios2.ca.boeing.com wrote > > > > #!/usr/bin/perl -w > > ^^^^^^ > > ^^^^^^ > > # enable warnings above. See -w > > # in action below: > > > <$0.02> > > -w is a great tool, but I don't put it in the shebang line of my perl > scripts. This is because it turns on warnings for *all* Perl involved in > the script, which includes all use'd modules and all modules the use'd > modules use, and so on. Also, it will sometimes warn me about things that > I know are okay. > > You can turn off the warnings temporarily by local'izing the $^W variable > around code you know might generate a warning. But at work there are some > older modules that are crufty and generate lots of (allowable) warnings. > So I get tired of reading a page of warnings I already know about every > time I run the script. (yes I realize someone should go fix the old > modules :-) > > My solution? When I'm stumped on a debug or want to verify my code before > checking into production, I run > > perl -cw myscript > > which shows me the warnings. > > > > Joel > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From stuart_poulin at yahoo.com Fri May 5 20:29:49 2000 From: stuart_poulin at yahoo.com (Stuart Poulin) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? Message-ID: <20000506012949.15301.qmail@web113.yahoomail.com> Scripts that worked fine in 5.005_3 work fine in 5.6 but now toss warnings. Solution - turn of -w. use strict, yes always. --- Christopher Maujean wrote: > On the other hand, I always use > -w > and > use strict; > > I code to fit them both and have far fewer problems > than I used to. There are (very very) few and far > between cases where I explicitly need to turn off > strict ref's or subs, etc for a small block of code, > but I make sure I have a very good reason, I heavily > document that reason in the code and turn full strict > back on immediatly after that block. > > If a module can't pass strict and -w I won't be using it > in production code. I try to write every program as if it were > to be used by paying customers who will judge me by it. > > --Christopher Maujean > ***NOT representing Courtlink or Data West Corporation in any way shape or > form.*** > > > -----Original Message----- > From: Joel [mailto:largest@largest.org] > Sent: Friday, May 05, 2000 4:56 PM > To: spug-list@pm.org > Subject: Re: SPUG: Slice of an arrary within a hash? > > > > ced@carios2.ca.boeing.com wrote > > > > #!/usr/bin/perl -w > > ^^^^^^ > > ^^^^^^ > > # enable warnings above. See -w > > # in action below: > > > <$0.02> > > -w is a great tool, but I don't put it in the shebang line of my perl > scripts. This is because it turns on warnings for *all* Perl involved in > the script, which includes all use'd modules and all modules the use'd > modules use, and so on. Also, it will sometimes warn me about things that > I know are okay. > > You can turn off the warnings temporarily by local'izing the $^W variable > around code you know might generate a warning. But at work there are some > older modules that are crufty and generate lots of (allowable) warnings. > So I get tired of reading a page of warnings I already know about every > time I run the script. (yes I realize someone should go fix the old > modules :-) > > My solution? When I'm stumped on a debug or want to verify my code before > checking into production, I run > > perl -cw myscript > > which shows me the warnings. > > > > Joel > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From dean at ero.com Fri May 5 23:13:05 2000 From: dean at ero.com (Dean Hudson) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: ; from largest@largest.org on Fri, May 05, 2000 at 07:56:00PM -0400 References: <20000505144032.H13772@hobart.helvella.org> Message-ID: <20000505211304.C24990@ero.com> On Fri, May 05, 2000 at 07:56:00PM -0400, Joel wrote: > -w is a great tool, but I don't put it in the shebang line of my perl > scripts. This is because it turns on warnings for *all* Perl involved in > the script, which includes all use'd modules and all modules the use'd > modules use, and so on. Also, it will sometimes warn me about things that > I know are okay. I usually hack the module so it's -w clean (usually just locallizing $^W somewhere) and politely forward the author a patch... dean. -- my $email = qr{ dean(h)?@(?(1)verio\.net # @ work if h | ero\.com) }x; # other - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address From tim at consultix-inc.com Sat May 6 11:05:18 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: subject:unsubscribe Message-ID: <20000506090518.A24220@timji.consultix.wa.com> Sat May 6 09:05:18 PDT 2000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Sat May 6 11:05:26 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: subject:subscribe Message-ID: <20000506090526.A24226@timji.consultix.wa.com> Sat May 6 09:05:26 PDT 2000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Sat May 6 11:44:01 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: TESTING - Please Ignore Message-ID: <20000506094401.A24795@timji.consultix.wa.com> sub foo { "is here"; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From scott at sabmail.rresearch.com Sat May 6 11:50:37 2000 From: scott at sabmail.rresearch.com (Scott Blachowicz) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: TESTING - Please Ignore In-Reply-To: <20000506094401.A24795@timji.consultix.wa.com>; from tim@consultix-inc.com on Sat, May 06, 2000 at 09:44:01AM -0700 References: <20000506094401.A24795@timji.consultix.wa.com> Message-ID: <20000506095037.A1099@sabami.seaslug.org> On Sat, May 06, 2000 at 09:44:01AM -0700, Tim Maher/CONSULTIX wrote: > sub foo { "is here"; } Yeah! Let there be subs! :-) -- Scott Blachowicz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Sat May 6 11:55:31 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: New, Improved Majordomo Filters! Message-ID: <20000506095531.A24875@timji.consultix.wa.com> SPUGsters, Compliments of "Riley" (wormwood@speakeasy.org), I've come to realize that I as the maintainer of the spug-list am in control of the filtering rules that have previously caused difficulties when subscribers tried to post Perl "sub definitions", or use the word "subscribe". (I thought Perl Mongers HQ, owner of our majordomo service, would have to change their /etc/majordomo.cf file, but not so!) Accordingly, I've been re-writing the (Perl) filtering-rules for the majordomo "config" file to be more suitable to Perl-istic discussions, and am testing them today. Unless you hear otherwise from me shortly, you may henceforth assume that you are now free from the burden of reworking "sub" as "Zub", reworking "subscribe to Perl Journal" as "Zubscribe", etc. Hooray, and thanks again to Riley! *========================================================================* | Tim Maher, PhD Consultix & (206) 781-UNIX/8649 | | Pacific Software Gurus, Inc Email: tim@consultix-inc.com | | UNIX/Linux & Perl Training http://www.consultix-inc.com | | Classes; 5/16: UNIX 5/22: Basic Perl+Modules 6/12: Intermediate Perl | *========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From trance at drizzle.com Sat May 6 12:08:55 2000 From: trance at drizzle.com (Christopher/Shalah) Date: Wed Aug 4 00:07:16 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: <20000506012949.15301.qmail@web113.yahoomail.com> Message-ID: Thats like fixing a backfiring car by wearing earmuffs. Stuart said: >Scripts that worked fine in 5.005_3 work fine in 5.6 but now toss warnings. >Solution - turn of -w. > >use strict, yes always. > >--- Christopher Maujean wrote: > On the other hand, I always use > -w > and > use strict; > > I code to fit them both and have far fewer problems > than I used to. There are (very very) few and far > between cases where I explicitly need to turn off > strict ref's or subs, etc for a small block of code, > but I make sure I have a very good reason, I heavily > document that reason in the code and turn full strict > back on immediatly after that block. > > If a module can't pass strict and -w I won't be using it > in production code. I try to write every program as if it were > to be used by paying customers who will judge me by it. > > --Christopher Maujean > ***NOT representing Courtlink or Data West Corporation in any way shape or > form.*** > > > -----Original Message----- > From: Joel [mailto:largest@largest.org] > Sent: Friday, May 05, 2000 4:56 PM > To: spug-list@pm.org > Subject: Re: SPUG: Slice of an arrary within a hash? > > > > ced@carios2.ca.boeing.com wrote > > > > #!/usr/bin/perl -w > > ^^^^^^ > > ^^^^^^ > > # enable warnings above. See -w > > # in action below: > > > <$0.02> > > -w is a great tool, but I don't put it in the shebang line of my perl > scripts. This is because it turns on warnings for *all* Perl involved in > the script, which includes all use'd modules and all modules the use'd > modules use, and so on. Also, it will sometimes warn me about things that > I know are okay. > > You can turn off the warnings temporarily by local'izing the $^W variable > around code you know might generate a warning. But at work there are some > older modules that are crufty and generate lots of (allowable) warnings. > So I get tired of reading a page of warnings I already know about every > time I run the script. (yes I realize someone should go fix the old > modules :-) > > My solution? When I'm stumped on a debug or want to verify my code before > checking into production, I run > > perl -cw myscript > > which shows me the warnings. > > > > Joel > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From trance at drizzle.com Sat May 6 12:08:55 2000 From: trance at drizzle.com (Christopher/Shalah) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: <20000506012949.15301.qmail@web113.yahoomail.com> Message-ID: Thats like fixing a backfiring car by wearing earmuffs. Stuart said: >Scripts that worked fine in 5.005_3 work fine in 5.6 but now toss warnings. >Solution - turn of -w. > >use strict, yes always. > >--- Christopher Maujean wrote: > On the other hand, I always use > -w > and > use strict; > > I code to fit them both and have far fewer problems > than I used to. There are (very very) few and far > between cases where I explicitly need to turn off > strict ref's or subs, etc for a small block of code, > but I make sure I have a very good reason, I heavily > document that reason in the code and turn full strict > back on immediatly after that block. > > If a module can't pass strict and -w I won't be using it > in production code. I try to write every program as if it were > to be used by paying customers who will judge me by it. > > --Christopher Maujean > ***NOT representing Courtlink or Data West Corporation in any way shape or > form.*** > > > -----Original Message----- > From: Joel [mailto:largest@largest.org] > Sent: Friday, May 05, 2000 4:56 PM > To: spug-list@pm.org > Subject: Re: SPUG: Slice of an arrary within a hash? > > > > ced@carios2.ca.boeing.com wrote > > > > #!/usr/bin/perl -w > > ^^^^^^ > > ^^^^^^ > > # enable warnings above. See -w > > # in action below: > > > <$0.02> > > -w is a great tool, but I don't put it in the shebang line of my perl > scripts. This is because it turns on warnings for *all* Perl involved in > the script, which includes all use'd modules and all modules the use'd > modules use, and so on. Also, it will sometimes warn me about things that > I know are okay. > > You can turn off the warnings temporarily by local'izing the $^W variable > around code you know might generate a warning. But at work there are some > older modules that are crufty and generate lots of (allowable) warnings. > So I get tired of reading a page of warnings I already know about every > time I run the script. (yes I realize someone should go fix the old > modules :-) > > My solution? When I'm stumped on a debug or want to verify my code before > checking into production, I run > > perl -cw myscript > > which shows me the warnings. > > > > Joel > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe > Email to majordomo@pm.org: "action" spug-list your_address > > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe Email to majordomo@pm.org: "action" spug-list your_address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From bill at celestial.com Sat May 6 13:43:26 2000 From: bill at celestial.com (Bill Campbell) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Slice of an arrary within a hash? In-Reply-To: ; from trance@drizzle.com on Sat, May 06, 2000 at 10:08:55AM -0700 References: <20000506012949.15301.qmail@web113.yahoomail.com> Message-ID: <20000506114326.A32113@kstarr.celestial.com> On Sat, May 06, 2000 at 10:08:55AM -0700, Christopher/Shalah wrote: >Thats like fixing a backfiring car by wearing earmuffs. Or like a customer I had with a old VW Bug who shut off the heater because she didn't like the smell of gasoline, and got a fire in back. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ More laws, less justice. -- Marcus Tulius Ciceroca (42 BD) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From stuart_poulin at yahoo.com Sun May 7 19:59:55 2000 From: stuart_poulin at yahoo.com (Stuart Poulin) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Slice of an arrary within a hash? Message-ID: <20000508010000.12327.qmail@web125.yahoomail.com> The script is working fine - except now it tosses warnings. Should I rewrite the module or rewrite the script? Should I spend anytime on it? - it's working fine. I've been bit too many times by distributing scripts, that work fine, except some version of perl is tossing warnings, where as my system didn't. I wish I could upgrade/downgrade the world to one version of perl, all using the same version of modules. I'll continue to use -w as a development tool only. --- Christopher/Shalah wrote: > Thats like fixing a backfiring car by wearing earmuffs. > > Stuart said: > >Scripts that worked fine in 5.005_3 work fine in 5.6 but now toss warnings. > >Solution - turn of -w. > > > >use strict, yes always. > > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From todd at geospiza.com Mon May 8 14:09:12 2000 From: todd at geospiza.com (Todd Smith) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Re: References: <00042810331300.00433@mmertel3> Message-ID: <391710D8.4E8051D3@geospiza.com> Yo Mark, Did you use a perl script to send that message? I got six copies. Todd Mark Mertel wrote: > the perl: > > # perl -V > Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: > Platform: > osname=hpux, osvers=10.20, archname=PA-RISC1.1 > uname='hp-ux ural b.10.20 a 9000712 2015389465 two-user license ' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef useperlio=undef d_sfio=undef > Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: > Platform: > osname=hpux, osvers=10.20, archname=PA-RISC1.1 > uname='hp-ux ural b.10.20 a 9000712 2015389465 two-user license ' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef useperlio=undef d_sfio=undef > Compiler: > cc='cc', optimize='-O +Onolimit', gccversion= > cppflags='-Ae' > ccflags ='-Ae' > stdchar='unsigned char', d_stdstdio=define, usevfork=false > intsize=4, longsize=4, ptrsize=4, doublesize=8 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 > alignbytes=8, usemymalloc=y, prototype=define > Linker and Libraries: > ld='ld', ldflags ='' > libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib > libs=-lnsl_s -lndbm -ldld -lm -lc -lndir -lcrypt > libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a > Dynamic Linking: > dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferr > ed ' > cccdlflags='+z', lddlflags='-b -s -a shared' > > Characteristics of this binary (from libperl): > Built under hpux > Compiled at Feb 24 2000 12:24:57 > @INC: > /opt/perl5/lib/5.00503/PA-RISC1.1 > /opt/perl5/lib/5.00503 > /opt/perl5/lib/site_perl/5.005/PA-RISC1.1 > /opt/perl5/lib/site_perl/5.005 > . > > the test file : > > #!/usr/local/bin/perl > asubroutine(\@A,"B","C"); > asubroutine(\@D,"E","F"); > asubroutine(\@X,"Y","Z"); > > sub asubroutine{ > print "@_,\n"; > $x= shift @_; > $y= shift @_; > $z= shift @_; > } > > the output: > > ARRAY(0x40021a50) B C, > ARRAY(0x40021aa4) E F, > ARRAY(0x40021af8) Y Z, > > -- > Mark Mertel > mmertel@ix.netcom.com > 206.633.631 > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From trance at drizzle.com Mon May 8 14:21:26 2000 From: trance at drizzle.com (Christopher/Shalah) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Re: In-Reply-To: <391710D8.4E8051D3@geospiza.com> Message-ID: I got 7 copies, and tehy didnt get trapped by my SPUG filter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From bill at celestial.com Mon May 8 15:20:20 2000 From: bill at celestial.com (Bill Campbell) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Re: In-Reply-To: ; from trance@drizzle.com on Mon, May 08, 2000 at 12:21:26PM -0700 References: <391710D8.4E8051D3@geospiza.com> Message-ID: <20000508132020.A26052@kstarr.celestial.com> On Mon, May 08, 2000 at 12:21:26PM -0700, Christopher/Shalah wrote: > > >I got 7 copies, and tehy didnt get trapped by my SPUG filter I think that there were several originals since I got multiple copies in my regular mailbox, and multiple copies in the one reserved for duplicate message-ids. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``Never do your enemy a minor injury.'' - Machiavelli - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ced at carios2.ca.boeing.com Mon May 8 22:12:07 2000 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: re: slice Message-ID: <200005090312.UAA06986@carios2.ca.boeing.com> Replying to Rob G.'s question. Sorry to lose the thread... It's Monday :). > ...but I was surprised: > $DATA{ $key }[0] = $val; # same as $DATA{ $key }->[0] = $val; > is proper syntax to assign a value to a anon array ref stored in a hash, > correct? Right. Either works. > So I was expecting array slices to behave in the same manner by replacing a > single subscript with a range of subscripts. But this didn't seem to work: > $DATA{ $key }[1,2,3,4] = @prices[0,1,2,3]; > Thinking I understand and really understanding are !=. Is the difference > between the 2 lines that the slice turns the array operation into a list > operation? > And, therefore, the [1,2,3,4] no longer is telling perl that > $DATA{ $key } is an array reference? So perl thinks that I'm trying to do > what? I believe the $ in $DATA{}[] will propagate a scalar context for both the index [1,2,3,4] and the slice @prices[] on the RHS. In both cases, the list will reduce to the final element. So, the above becomes: $DATA[ $key }[4] = $prices[3]; A hash slice here would have to written: @{ $DATA{ $key } }[1,2,3,4] = @prices[0,1,2,3]; or, more virtuously, since you'd save keystrokes: @{ $DATA{ $key } }[1..4] = @prices[0..3]; A bit tricky because $DATA{ $key } is an array reference and the binding precedence won't allow you to get away with: @$DATA{ $key }[1,2,3,4] The tokener thinks $DATA alone contains the array ref. so you have to give it some help with the {}. Hope this isn't too far off the mark. Again, Perl Data Structure Cookbook probably has far better explanations. Rgds, -- Charles DeRykus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From Shamon22 at aol.com Mon May 8 23:15:55 2000 From: Shamon22 at aol.com (Shamon22@aol.com) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Mail::Mailer ...Help! Message-ID: Thanks for the good suggestions! But alas I still am not able to get the darn script to work right. Am I just way off in the way I wrote this script? I keep getting the error message: [Mon May 8 15:15:09 2000] [error] Premature end of script headers: /home/httpd/cgi -bin/contact2.cgi What is PERL trying to tell me? What does it mean "Premature end of script headers"? Here is the most current rendition of my script: *************************************************************** #!/usr/bin/perl -w # cgi-bin/contact.cgi:Information sending program. # TESTING --Send information (v2) use Mail::Mailer; $email ='email'; $mailto ='mailto'; $subject ='subject'; $body = 'body'; $mailer = Mail::Mailer->new("sendmail"); $mailer->open({ From => $email, To => $mailto, Subject => $subject, }) or die "Can't open: $!\n"; print $mailer $body; $mailer->close(); ****************************************************************** As a side note, if any of you all want to help answer my questions about virtual domain hosting please let me know! I can't get my Linux box to host virtual domains. Help! -Garrett - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From dougb at scalar.org Mon May 8 23:45:43 2000 From: dougb at scalar.org (Doug Beaver) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Mail::Mailer ...Help! In-Reply-To: ; from Shamon22@aol.com on Tue, May 09, 2000 at 12:15:55AM -0400 References: Message-ID: <20000508214543.A63036@scalar.org> On Tue, May 09, 2000 at 12:15:55AM -0400, Shamon22@aol.com wrote: > Thanks for the good suggestions! But alas I still am not able to get the darn > script to work right. > > Am I just way off in the way I wrote this script? I keep getting the error > message: > > [Mon May 8 15:15:09 2000] [error] Premature end of script headers: > /home/httpd/cgi > -bin/contact2.cgi > > What is PERL trying to tell me? What does it mean "Premature end of script > headers"? That's an error from Apache, it's telling you that the CGI isn't printing proper headers. Printing the proper headers in a CGI usually consists of printing the Content-Type header, the server should take care of the rest. You *do* need to print some sort of Content-Type header in order for the CGI to run okay. Here's a small CGI that just prints the Content-Type headers and exits: % cat d #!/usr/bin/perl use CGI; print CGI->header(); exit; % telnet scalar.org 80 GET /cgi-bin/d HTTP/1.0 HTTP/1.1 200 OK Date: Tue, 09 May 2000 04:28:22 GMT Server: Apache/1.3.9 (Unix) Connection: close Content-Type: text/html It ran okay and even though it didn't print anything after the HTTP headers like a normal CGI would, it didn't throw a server error either. If you comment out the "print CGI->header();" line in d, then you get: % telnet scalar.org 80 GET /cgi-bin/d HTTP/1.0 HTTP/1.1 500 Internal Server Error Date: Tue, 09 May 2000 04:31:35 GMT Server: Apache/1.3.9 (Unix) Connection: close Content-Type: text/html [ I'll skip the html that gets printed out after the HTTP headers. ] So, all you have to do is use the CGI module and print the Content-Type headers in your CGI and it shouldn't throw server errors anymore. You need to print the headers before you print anything else out from the script (otherwise you'll get more warnings about premature end of script headers). Doug > Here is the most current rendition of my script: > > *************************************************************** > #!/usr/bin/perl -w > # cgi-bin/contact.cgi:Information sending program. > # TESTING --Send information (v2) > > use Mail::Mailer; > > $email ='email'; > $mailto ='mailto'; > $subject ='subject'; > $body = 'body'; > $mailer = Mail::Mailer->new("sendmail"); > $mailer->open({ From => $email, > To => $mailto, > Subject => $subject, > }) > or die "Can't open: $!\n"; > print $mailer $body; > $mailer->close(); > ****************************************************************** > > As a side note, if any of you all want to help answer my questions about > virtual domain hosting please let me know! I can't get my Linux box to host > virtual domains. > > Help! > > -Garrett > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > -- Smithers: I'm afraid we have a bad image, Sir. Market research shows people see you as somewhat of an ogre. Burns: I ought to club them and eat their bones! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From schieber at wa.freei.net Tue May 9 09:17:53 2000 From: schieber at wa.freei.net (Brian Schieber) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? Message-ID: <015e01bfb9c1$5df61be0$08e50018@sttls1.wa.home.com> Hi, I have some tasks to do in PERL under Windows NT. Are there are any preferred development tools or editors used by this group? Thanks, Brian Schieber Tidemark Solutions Seattle - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ned at bike-nomad.com Tue May 9 10:20:21 2000 From: ned at bike-nomad.com (Ned Konz) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? References: <015e01bfb9c1$5df61be0$08e50018@sttls1.wa.home.com> Message-ID: <39182CB5.9F8BD4E@bike-nomad.com> Brian Schieber wrote: > I have some tasks to do in PERL under Windows NT. Are there are any > preferred development tools or editors used by this group? This is getting close to religious territory, but I use the following: * VIM editor (www.vim.org) (but only if you know the Unix vi command set). Available with internal Perl integration, and from OLE automation. * ptkdb debugger (Devel::ptkdb) (requires Tk). Allows debugging of CGI scripts, as well (though I've only tried this once). ActiveState has their PDK, as well, which is an IDE. There is at least one other IDE available for free, that ties in with ptkdb and a GUI builder. -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://www.bike-nomad.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From lorraine at nw.saic.com Tue May 9 11:42:58 2000 From: lorraine at nw.saic.com (Lorraine Johnson) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? Message-ID: <3.0.32.20000509094257.009115f0@zephyr.nw.saic.com> At 07:17 AM 5/9/00 -0700, Brian Schieber wrote: > I have some tasks to do in PERL under Windows NT. Are there are any >preferred development tools or editors used by this group? Hello, I haven't been doing Perl long, but I'll plug my favorite Windows editor, TextPad (www.textpad.com), which I've been using for years. The demo is fully functional - it just nags you periodically. It behaves beautifully under '95 and NT. It's reasonably-priced ($27), and has some great features. For example, you can add "clip libraries" - basically code snippets. You can write your own or download user-donated libraries from the TextPad site (there is a Perl clip library available). If you also download the perl2 syntax library, you can color-code your code. TextPad reads and writes PC, Unix, and Mac format, and large files, at that. (Useful, for example, if you have a 28Meg server log file which for some bizarre reason is in Mac format and you need to get it in Unix format for analysis.) Block select mode to move parts of sequential lines; flexible search/replace; macros; sort; find in files produces a listing which will open the mentioned file at the line the string is in; spelling checker (download your language preference).... In sum, loads of handy features in a rock-solid product. Lorraine ................................... J. Lorraine Johnson SAIC/Sea Technology lorraine@nw.saic.com v: (425) 482-3316 f: (425) 485-5566 http://www.nw.saic.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From PDarley at serviceintelligence.com Tue May 9 12:23:12 2000 From: PDarley at serviceintelligence.com (Peter Darley) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Delimited or fixed length text file reading Message-ID: <67AEB320B801D411AF6800902728A38001D716@SEAEX01> Friends, I need to open arbitrary fixed length or (preferably) delimited text data files for processing, and I was wondering if anyone knew of a DBD for them, or barring that, if there was some other module I could use to run SQL queries against them, or barring THAT, a module that just simplifies reading from them. I looked on CPAN, but didn't see anything that looked right. Thanks, Peter Darley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From jope-spug at n2h2.com Tue May 9 12:46:52 2000 From: jope-spug at n2h2.com (El JoPe Magnifico) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Delimited or fixed length text file reading In-Reply-To: <67AEB320B801D411AF6800902728A38001D716@SEAEX01> Message-ID: DBD::CSV On Tue, 9 May 2000, Peter Darley wrote: > I need to open arbitrary fixed length or (preferably) delimited > text data files for processing, and I was wondering if anyone knew of a > DBD for them, or barring that, if there was some other module I could > use to run SQL queries against them, or barring THAT, a module that just > simplifies reading from them. I looked on CPAN, but didn't see anything - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From todd at geospiza.com Tue May 9 12:46:57 2000 From: todd at geospiza.com (Todd Smith) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? References: <3.0.32.20000509094257.009115f0@zephyr.nw.saic.com> Message-ID: <39184F11.B8631D89@geospiza.com> There are also windows distributions of emacs and Xemacs - work just like unix except for the funny dos~.nam names. Todd Lorraine Johnson wrote: > At 07:17 AM 5/9/00 -0700, Brian Schieber wrote: > > I have some tasks to do in PERL under Windows NT. Are there are any > >preferred development tools or editors used by this group? > > Hello, > > I haven't been doing Perl long, but I'll plug my favorite Windows editor, > TextPad (www.textpad.com), which I've been using for years. The demo is > fully functional - it just nags you periodically. It behaves beautifully > under '95 and NT. It's reasonably-priced ($27), and has some great features. > > For example, you can add "clip libraries" - basically code snippets. You > can write your own or download user-donated libraries from the TextPad site > (there is a Perl clip library available). If you also download the perl2 > syntax library, you can color-code your code. > > TextPad reads and writes PC, Unix, and Mac format, and large files, at > that. (Useful, for example, if you have a 28Meg server log file which for > some bizarre reason is in Mac format and you need to get it in Unix format > for analysis.) > > Block select mode to move parts of sequential lines; flexible > search/replace; macros; sort; find in files produces a listing > which will open the mentioned file at the line the string is in; spelling > checker (download your language preference).... In sum, loads of handy > features in a rock-solid product. > > Lorraine > > ................................... > J. Lorraine Johnson > SAIC/Sea Technology > lorraine@nw.saic.com > v: (425) 482-3316 > f: (425) 485-5566 > http://www.nw.saic.com > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ned at bike-nomad.com Tue May 9 12:47:19 2000 From: ned at bike-nomad.com (Ned Konz) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? References: <39ADCF833E74D111A2D700805F1951EF176820C7@RED-MSG-06> <391847F6.883341FA@bike-nomad.com> Message-ID: <39184F27.B9F27A1@bike-nomad.com> Ned Konz wrote: > > I'd love to hear more about the last IDE you mentioned... I've been waiting > > for someone to do something (free) in Perl/Tk, etc. > > http://www.18rabbit.com has Tiki Artist > > http://linux.ece.uci.edu/~wangy/VisualPerl/vperl.html is Perl Composer Also, a commercial IDE is at http://helpconsulting.net/visiperl/ There's CodeMagic from http://www.petes-place.com/ There's spectcl at http://www.scriptics.com/spectcl (and specperl at http://www.keck.ucsf.edu/~kvale/specperl.html) for doing GUI design see http://www.skwc.com/essent/visualperl.html for configuring MS DevStudio to work with Perl Perl Builder - http://www.solutionsoft.com/perl.htm The Perl Scripting tool at http://www.perlscriptingtool.com/pst/ -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://www.bike-nomad.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From a-marky at microsoft.com Tue May 9 12:58:23 2000 From: a-marky at microsoft.com (Mark Yocom (Entex)) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? Message-ID: <7CD674FF54FBD21181D800805F57CD540D3A433C@RED-MSG-44> > Ned Konz wrote: > > > > I'd love to hear more about the last IDE you mentioned... > I've been waiting > > > for someone to do something (free) in Perl/Tk, etc. > > > > http://www.18rabbit.com has Tiki Artist > > > > http://linux.ece.uci.edu/~wangy/VisualPerl/vperl.html is > Perl Composer > > Also, a commercial IDE is at http://helpconsulting.net/visiperl/ > > There's CodeMagic from http://www.petes-place.com/ > > There's spectcl at http://www.scriptics.com/spectcl > (and specperl at http://www.keck.ucsf.edu/~kvale/specperl.html) for > doing GUI design > > see http://www.skwc.com/essent/visualperl.html for configuring MS > DevStudio to work with Perl > > Perl Builder - http://www.solutionsoft.com/perl.htm > > The Perl Scripting tool at http://www.perlscriptingtool.com/pst/ ...and my new favorite, PrimalSCRIPT, at http://www.sapien.com. Sadly, they don't have screenshots at their website, but they do have a 30-day trial. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ned at bike-nomad.com Tue May 9 13:27:14 2000 From: ned at bike-nomad.com (Ned Konz) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Delimited or fixed length text file reading References: <67AEB320B801D411AF6800902728A38001D716@SEAEX01> Message-ID: <39185882.EF1CF6E7@bike-nomad.com> Peter Darley wrote: > I need to open arbitrary fixed length or (preferably) delimited > text data files for processing, and I was wondering if anyone knew of a > DBD for them, or barring that, if there was some other module I could > use to run SQL queries against them, or barring THAT, a module that just > simplifies reading from them. I looked on CPAN, but didn't see anything > that looked right. Did DBD::CSV not fit your needs? -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://www.bike-nomad.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From markyesme at home.com Tue May 9 14:35:26 2000 From: markyesme at home.com (Mark Lybrand) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Re: Delimited or fixed length text file reading References: <67AEB320B801D411AF6800902728A38001D716@SEAEX01> Message-ID: <001d01bfb9ed$ba121c40$53ce1318@olmpi1.wa.home.com> In addition to DBD::CSV there is also Sprite.pm you might want to check out. Mark :) http://www.latin-connection.com ----- Original Message ----- From: "Peter Darley" To: "SPUG (E-mail)" Sent: Tuesday, May 09, 2000 10:23 AM Subject: SPUG: Delimited or fixed length text file reading > Friends, > I need to open arbitrary fixed length or (preferably) delimited > text data files for processing, and I was wondering if anyone knew of a > DBD for them, or barring that, if there was some other module I could > use to run SQL queries against them, or barring THAT, a module that just > simplifies reading from them. I looked on CPAN, but didn't see anything > that looked right. > Thanks, > Peter Darley > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From damian at cs.monash.edu.au Tue May 9 14:39:33 2000 From: damian at cs.monash.edu.au (Damian Conway) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? References: <39ADCF833E74D111A2D700805F1951EF176820C7@RED-MSG-06> <391847F6.883341FA@bike-nomad.com> Message-ID: <200005091939.FAA18831@indy05.csse.monash.edu.au> > Ned Konz wrote: > > > > I'd love to hear more about the last IDE you mentioned... > > > I've been waiting for someone to do something (free) in > > > Perl/Tk, etc. > > [Numerous tools snipped] There's also LlamaCard, which I'll be unveiling at this year's TPC: LlamaCard: a Stack-based, Hypermedia, WYSIWYG, Persistent, Platform-independent, Object-oriented, Event-driven, Rapid Software Development Environment by Damian Conway & Aaron Wigley This paper describes a WYSIWYG rapid application development system that is written in, and scripted using, the Perl programming language. The system is based on the "stack" metaphor made popular by Apple HyperCard and its successors, and allows the designer to interactively generate and use event-driven applications with Tk-based graphical user interfaces. Damian - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ned at bike-nomad.com Tue May 9 14:48:01 2000 From: ned at bike-nomad.com (Ned Konz) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? References: <39ADCF833E74D111A2D700805F1951EF176820C7@RED-MSG-06> <391847F6.883341FA@bike-nomad.com> <200005091939.FAA18831@indy05.csse.monash.edu.au> Message-ID: <39186B71.AD4457E6@bike-nomad.com> Damian Conway wrote: > There's also LlamaCard, which I'll be unveiling at this year's TPC: > > LlamaCard: a Stack-based, Hypermedia, WYSIWYG, Persistent, > Platform-independent, Object-oriented, Event-driven, Rapid > Software Development Environment Sounds great! And _very_ buzzword compliant! I've been thinking about making a Smalltalk-like browser/workspace environment for Perl using Tk. Did you have any major problems with the Tk environment for your project? -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://www.bike-nomad.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From damian at cs.monash.edu.au Tue May 9 15:45:00 2000 From: damian at cs.monash.edu.au (Damian Conway) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: PC Perl Development Environment? References: <39ADCF833E74D111A2D700805F1951EF176820C7@RED-MSG-06> <391847F6.883341FA@bike-nomad.com> <200005091939.FAA18831@indy05.csse.monash.edu.au> Message-ID: <200005092045.GAA18993@indy05.csse.monash.edu.au> > > There's also LlamaCard, which I'll be unveiling at this year's TPC: > > Sounds great! And _very_ buzzword compliant! Indeed. Remember that every extra buzz-word adds another 0 when we IPO ;-) > I've been thinking about making a Smalltalk-like browser/workspace > environment for Perl using Tk. Did you have any major problems with > the Tk environment for your project? My co-conspirator Aaron Wigley handled the implementation, including the Tk side of things. I'm sure he'd be happy to discuss it with you. Damian - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From PDarley at serviceintelligence.com Tue May 9 17:05:20 2000 From: PDarley at serviceintelligence.com (Peter Darley) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Re: Delimited or fixed length text file reading Message-ID: <67AEB320B801D411AF6800902728A38001D71D@SEAEX01> Friends, Thanks for your help. DBD::CSV is exactly what I need. The name just didn't jump out at me as a module for dealing with text databases. Thanks! Peter D. -----Original Message----- From: Mark Lybrand [mailto:markyesme@home.com] Sent: Tuesday, May 09, 2000 12:35 PM To: Peter Darley; SPUG (E-mail) Subject: SPUG: Re: Delimited or fixed length text file reading In addition to DBD::CSV there is also Sprite.pm you might want to check out. Mark :) http://www.latin-connection.com ----- Original Message ----- From: "Peter Darley" To: "SPUG (E-mail)" Sent: Tuesday, May 09, 2000 10:23 AM Subject: SPUG: Delimited or fixed length text file reading > Friends, > I need to open arbitrary fixed length or (preferably) delimited > text data files for processing, and I was wondering if anyone knew of a > DBD for them, or barring that, if there was some other module I could > use to run SQL queries against them, or barring THAT, a module that just > simplifies reading from them. I looked on CPAN, but didn't see anything > that looked right. > Thanks, > Peter Darley > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ajalis at cobaltgroup.com Tue May 9 20:05:56 2000 From: ajalis at cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: Extreme Programming Talk Message-ID: <200005100105.SAA03724@krypton.cobaltgroup.com> I am posting this announcement for the Seattle Extreme Programming (XP) meeting to the SPUG list because: * Several SPUG folks have expressed an interest in XP. * With Extreme Programming strategies it is possible to build large Perl programs really fast and with very few errors. This stuff mixes well with Perl. If you are interested in this stuff and want to keep getting announcements like this, subscribe to the Seattle XP list by sending e-mail to: extremeprogramming-seattle-subscribe@egroups.com For more general discussions that are not not specific to Seattle subscribe to the general XP list by sending e-mail to: extremeprogramming-subscribe@egroups.com Finally, here is the announcement: ---- The Seattle Extreme Programming group has a meeting this Thursday (May 11) at 7pm. Here are the details of the meeting. Title : Overview of XP Speaker : Bruce Winegarden Date : 7pm, Thursday, May 11 2000 Location : Saltmine Conference Room Bellevue Plaza Center 600 108th Ave NE, Suite 800 Bellevue, WA 98004 Directions : Take I-405 towards downtown Bellevue Take the NE 8th (West) exit On the ramp turn west towards downtown Bellevue. Park near 110th Ave NE. Here is an excerpt from Bruce Winegarden's message about his presentation: > I am interested in giving an overview presentation of XP to this > group, to cover all of the ingredients and how the values and > practices of XP work together. Some of this comes through in Kent's > book and also from the Immersion Training I had the opportunity to > attend. I felt the training brought out the verbal tradition of XP > with some different emphasis than the book, because it included live > interactions with and between XP's main proponents (Kent Beck, Ron > Jefferies, Martin Fowler, Ward Cunningham, Robert Martin). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Thu May 11 01:31:32 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: May 16 Meeting: Extending Perl with C Message-ID: <20000510233132.A16256@timji.consultix.wa.com> MAY 2000 Seattle Perl User's Group Meeting ------------------------------------------------------ Topic: Intro. to Extending Perl with the C Language Speaker: Brian Ingerson, EpixTech Time: May 16th 2000 (Third Tuesday), 7pm-9pm LOCATION: Union Bank of California Bldg, 5th Floor Mtg Room Cost: Free Brian Ingerson (b.ingerson@epixtech.com) will cover the basics of writing Perl Modules in the C language. Attendees are encouraged to familiarize themselves with the concepts underlying Perl Modules, and the UNIX "make" utility. Prior experience with the C language is helpful, but not necessary. Suggested reading includes chapters 18 and 20 from "Advanced Perl Programming", and the following entries (accessed via the man or perldoc commands) from the online Perl documentation: perlmod, perlmodinstall, perlxs, perlxstut, perlguts, perlapi, ExtUtils::MakeMaker, and h2xs Brian will explain the relevant UNIX concepts, write a couple of "hello, world" type programs, and demonstrate a meatier extension of an existing API. Admission is free and open to the general public. Attendees are encouraged to arrive at the building's 5th & Madison door by 6:45pm, which might be impassable at other times. Parking Parking is available in an underground garage beneath the building, at the price of $4 for the entire 4pm - 11pm period. Additional parking is available at other ground-level lots and on the street. Pre/Post-Meeting Gathering Place Come and pass the pre-meeting time with other SPUGsters at the Rock Bottom brewpub, at 1333 5th Ave., (206) 623-3070, in downtown Seattle. Look to your left, near the bar or pool table, for bizarre yet strangely appealing characters wielding laptops and hearty ales. For more information, including driving directions and street addresses, see http://www.halcyon.com/spug/. *========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649 | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | CLASSES; 5/16: UNIX 5/22: Basic Perl+Modules 6/12: Intermediate Perl | | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | *========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ajalis at cobaltgroup.com Thu May 11 02:20:27 2000 From: ajalis at cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:07:17 2004 Subject: SPUG: XML/XSLT Presentation Slides Message-ID: <200005110720.AAA05335@krypton.cobaltgroup.com> The slides from the XML/XSLT presentation at the last ESPUG meeting can be viewed at: http://www.cobaltgroup.com/~ajalis/xml Probably because they were generated straight from Powerpoint they work much better with IE than with Netscape. Asim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Thu May 11 02:25:45 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides In-Reply-To: <200005110720.AAA05335@krypton.cobaltgroup.com>; from ajalis@cobaltgroup.com on Thu, May 11, 2000 at 12:20:27AM -0700 References: <200005110720.AAA05335@krypton.cobaltgroup.com> Message-ID: <20000511002545.A16483@timji.consultix.wa.com> On Thu, May 11, 2000 at 12:20:27AM -0700, Asim Jalis wrote: > The slides from the XML/XSLT presentation > at the last ESPUG meeting can be viewed at: > http://www.cobaltgroup.com/~ajalis/xml > > Probably because they were generated > straight from Powerpoint they work much > better with IE than with Netscape. On behalf of all those who couldn't attend, including me, thanks for posting these! -Tim > Asim > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > -- *========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649 | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | CLASSES; 5/16: UNIX 5/22: Basic Perl+Modules 6/12: Intermediate Perl | | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | *========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From dpommert at courtlink.com Thu May 11 10:04:38 2000 From: dpommert at courtlink.com (Daniel Pommert) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Perl run time error Message-ID: (For those who can get their hands on the source more easily than I:) I have a large server application that takes a request, forks, processes a bunch of data, generating a lot of internal structures and then writes the results. When it is done, it attempts to clip its reference cycles to the best of its (actual my) ability so that the final garbage collection will go as quickly as possible. I also do this so that a non-forking engine version of this server will not have (so much of) a memory leak. Whenever my process completes and is in its DESTROY and garbage collection phase, I get one or two lines of: Attempt to free non-existent shared string during global destruction. splain has not heard of this error message, apparently. It is interesting that I get one line of this message if the server only gets one sub-request but it writes two lines if it gets two or three sub-requests. With each sub-request, another module is require'd, depending on the type of the sub-request. As it presently turns out, all of the sub-requests for a given request will require the same file. As another note, this is a largish app of about 100,000 lines and about 30,000 lines of non-comment, non-POD, non-blank code running in 20MB-40MB. Any ideas? -- Daniel Pommert BESTnet.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From dpommert at courtlink.com Thu May 11 10:33:28 2000 From: dpommert at courtlink.com (Daniel Pommert) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Re: Perl run time error Message-ID: Oops. I forgot: My perl -V is: Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=solaris, osvers=2.6, archname=sun4-solaris uname='sunos depotserv 5.6 generic_105181-15 sun4u sparc sunw,ultra-5_10 ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='gcc', optimize='-O2', gccversion=2.8.1 cppflags='' ccflags ='' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc -lcrypt libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib' Characteristics of this binary (from libperl): Built under solaris Compiled at Oct 14 1999 15:49:22 %ENV: PERL5OPT="-I/opt/dpommert/Apollo/apollo/lib" @INC: /opt/dpommert/Buffalo/buffy/lib /usr/local/lib/perl5/5.00503/sun4-solaris /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/sun4-solaris /usr/local/lib/perl5/site_perl/5.005 . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From bill at celestial.com Thu May 11 15:39:18 2000 From: bill at celestial.com (Bill Campbell) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides In-Reply-To: <200005110720.AAA05335@krypton.cobaltgroup.com>; from ajalis@cobaltgroup.com on Thu, May 11, 2000 at 12:20:27AM -0700 References: <200005110720.AAA05335@krypton.cobaltgroup.com> Message-ID: <20000511133917.A15600@kstarr.celestial.com> On Thu, May 11, 2000 at 12:20:27AM -0700, Asim Jalis wrote: >The slides from the XML/XSLT presentation >at the last ESPUG meeting can be viewed at: >http://www.cobaltgroup.com/~ajalis/xml > >Probably because they were generated >straight from Powerpoint they work much >better with IE than with Netscape. Asim Any possibility of putting them in html so that they can be viewed nicely on Real Computers instead of Redmond Viruses? Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``Perhaps, when committing your first federal crime, it would be unwise to slap your name and address on it and mail it to 10,000 people.'' --Dogbert - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From slagel at geospiza.com Thu May 11 16:52:37 2000 From: slagel at geospiza.com (Joe Slagel) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides References: <200005110720.AAA05335@krypton.cobaltgroup.com> <20000511133917.A15600@kstarr.celestial.com> Message-ID: <391B2BA5.9D4273EC@geospiza.com> Bill Campbell wrote: > > Asim > > Any possibility of putting them in html so that they can be viewed > nicely on Real Computers instead of Redmond Viruses? > Anyone out there willing to load me a computer running W$Doze and IE so that I can actually view these slides? (Boy, I just can't understand why nobody else on the web but Microsoft can follow standards for browsers...) Joe -- Joe Slagel Geospiza, Inc. 619 N 35th Street Suite 101M (206) 633-4403 slagel@geospiza.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Thu May 11 17:10:48 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides In-Reply-To: <391B2BA5.9D4273EC@geospiza.com>; from slagel@geospiza.com on Thu, May 11, 2000 at 02:52:37PM -0700 References: <200005110720.AAA05335@krypton.cobaltgroup.com> <20000511133917.A15600@kstarr.celestial.com> <391B2BA5.9D4273EC@geospiza.com> Message-ID: <20000511151048.A19073@timji.consultix.wa.com> On Thu, May 11, 2000 at 02:52:37PM -0700, Joe Slagel wrote: > (Boy, I just can't understand why nobody else > on the web but Microsoft can follow standards for browsers...) I think you meant: (Boy, I just can't understand why *everybody* else on the web but Microsoft can follow standards for browsers...) > > Joe > -- > Joe Slagel > Geospiza, Inc. > 619 N 35th Street Suite 101M > (206) 633-4403 > slagel@geospiza.com *========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649 | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | CLASSES; 5/16: UNIX 5/22: Basic Perl+Modules 6/12: Intermediate Perl | | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | *========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ajalis at cobaltgroup.com Thu May 11 19:28:33 2000 From: ajalis at cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides Message-ID: <200005120028.RAA06583@krypton.cobaltgroup.com> Bill Campbell writes: > On Thu, May 11, 2000 at 12:20:27AM -0700, Asim Jalis wrote: > > The slides from the XML/XSLT presentation > > at the last ESPUG meeting can be viewed at: > > http://www.cobaltgroup.com/~ajalis/xml > > > > Probably because they were generated > > straight from Powerpoint they work much > > better with IE than with Netscape. > > Any possibility of putting them in html so > that they can be viewed nicely on Real Computers > instead of Redmond Viruses? Right. I should look into that. The older versions of PowerPoint actually support this feature (they are able to generate plain HTML). The newest one (which is what I have) does not. I'll try to get my hands on an older PowerPoint in the next few days. Asim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From starfire at zipcon.net Thu May 11 19:44:50 2000 From: starfire at zipcon.net (Richard Anderson) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides References: <200005110720.AAA05335@krypton.cobaltgroup.com> <20000511133917.A15600@kstarr.celestial.com> Message-ID: <008501bfbbab$4b891520$d087c7cd@adcom133> IE runs on Solaris and HP-UX, give it a try. (I spent nine months working on this port, so I don't want it to be forgotten. Maybe MS will get its ass in gear and do the Linux port some day ...) Richard.Anderson@raycosoft.com www.zipcon.net/~starfire/home (personal) www.raycosoft.com (corporate) ----- Original Message ----- From: "Bill Campbell" To: Sent: Thursday, May 11, 2000 1:39 PM Subject: Re: SPUG: XML/XSLT Presentation Slides > On Thu, May 11, 2000 at 12:20:27AM -0700, Asim Jalis wrote: > >The slides from the XML/XSLT presentation > >at the last ESPUG meeting can be viewed at: > >http://www.cobaltgroup.com/~ajalis/xml > > > >Probably because they were generated > >straight from Powerpoint they work much > >better with IE than with Netscape. > > Asim > > Any possibility of putting them in html so that they can be viewed > nicely on Real Computers instead of Redmond Viruses? > > Bill > -- > INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. > UUCP: camco!bill PO Box 820; 6641 E. Mercer Way > FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 > URL: http://www.celestial.com/ > > ``Perhaps, when committing your first federal crime, it would be unwise to > slap your name and address on it and mail it to 10,000 people.'' --Dogbert > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From bill at celestial.com Thu May 11 19:47:55 2000 From: bill at celestial.com (Bill Campbell) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides In-Reply-To: <008501bfbbab$4b891520$d087c7cd@adcom133>; from starfire@zipcon.net on Thu, May 11, 2000 at 05:44:50PM -0700 References: <200005110720.AAA05335@krypton.cobaltgroup.com> <20000511133917.A15600@kstarr.celestial.com> <008501bfbbab$4b891520$d087c7cd@adcom133> Message-ID: <20000511174755.A31008@kstarr.celestial.com> On Thu, May 11, 2000 at 05:44:50PM -0700, Richard Anderson wrote: >IE runs on Solaris and HP-UX, give it a try. (I spent nine months working >on this port, so I don't want it to be forgotten. Maybe MS will get its ass >in gear and do the Linux port some day ...) Hmmm. I have a Sparc IPX around here somewhere... Where did I put that thing? Oh, there it is under the desk with the file boxes piled on top. I guess I could drag that out, set it up, find Internet Exploder for it, and use that. I don't think so. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``Things in our country run in spite of government. Not by aid of it!'' Will Rogers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From moonbeam at catmanor.com Thu May 11 20:04:38 2000 From: moonbeam at catmanor.com (William Julien) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides In-Reply-To: Mail from 'Asim Jalis ' dated: Thu, 11 May 2000 00:20:27 -0700 Message-ID: <200005120104.SAA14973@catmanor.com> > >The slides from the XML/XSLT presentation >at the last ESPUG meeting can be viewed at: >http://www.cobaltgroup.com/~ajalis/xml > >Probably because they were generated >straight from Powerpoint they work much >better with IE than with Netscape. > >Asim > It amazes me how badly Microsoft can screw up a standard. I found that you can at least read the content by using this url: http://personal.cobaltgroup.com/~ajalis/xml/xml2_files/ Not only do they write bad html, they also don't know how to properly setup a web site. The content is there, just no fancy formatting. William Julien _,'| _.-''``-...___..--'; moonbeam@catmanor.com /, \'. _..-' , ,--...--''' vi is my shepherd; < \ .`--''' ` /| i shall not font. `-,;' ; ; ; __...--'' __...--_..' .;.' (,__....----''' (,..--'' perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From mcglk at itchy.serv.net Thu May 11 20:19:04 2000 From: mcglk at itchy.serv.net (Ken McGlothlen) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides In-Reply-To: <200005120028.RAA06583@krypton.cobaltgroup.com> Message-ID: On Thu, 11 May 2000, Asim Jalis wrote: | Bill Campbell writes: | > On Thu, May 11, 2000 at 12:20:27AM -0700, Asim Jalis wrote: | > > Probably because they were generated | > > straight from Powerpoint they work much | > > better with IE than with Netscape. | > | > Any possibility of putting them in html so | > that they can be viewed nicely on Real Computers | > instead of Redmond Viruses? | | Right. I should look into that. If anyone's interested, I already typed up a text paraphrase of all the slides. Since there's no real non-text information in the slides, it's pretty complete. The paraphrasing is pretty close to the original, just with some streamlined grammar. I won't send it out without Asim's permission, of course, since he has copyright on it, but I could send it to Asim for him to review for accuracy and any further changes, and then he could mail it to the list if he likes. Asim? ---Ken - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From bill at celestial.com Thu May 11 20:22:18 2000 From: bill at celestial.com (Bill Campbell) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides In-Reply-To: <200005120028.RAA06583@krypton.cobaltgroup.com>; from ajalis@cobaltgroup.com on Thu, May 11, 2000 at 05:28:33PM -0700 References: <200005120028.RAA06583@krypton.cobaltgroup.com> Message-ID: <20000511182218.A979@kstarr.celestial.com> On Thu, May 11, 2000 at 05:28:33PM -0700, Asim Jalis wrote: ... >Right. I should look into that. The older versions of >PowerPoint actually support this feature (they are able >to generate plain HTML). The newest one (which is what >I have) does not. > >I'll try to get my hands on an older PowerPoint in the >next few days. I think that the presentation package in Applix can read PP files. I have that here, and could give it a try. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ It is necessary for the welfare of society that genius should be privileged to utter sedition, to blaspheme, to outrage good taste, to corrupt the youthful mind, and generally to scandalize one's uncles. -- George Bernard Shaw - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From largest at largest.org Thu May 11 20:29:18 2000 From: largest at largest.org (Joel) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: simple script to convert powerpoint to HTML Message-ID: I teach a class where some students like powerpoint and some like HTML. Some like IE and some like Netscape (and some were using other browsers). I initially used the "save as HTML" option in powerpoint, but the resulting pages choked some of the browsers. So I saved the presentation as GIF images into a folder and wrote a script (attached to this email) to create HTML pages with simple navigation. To see the output, visit: http://www.largest.org/slides/ where I have a sample presentation. Joel William Julien wrote: >The slides from the XML/XSLT presentation >at the last ESPUG meeting can be viewed at: >http://www.cobaltgroup.com/~ajalis/xml > >Probably because they were generated >straight from Powerpoint they work much >better with IE than with Netscape. > >Asim > It amazes me how badly Microsoft can screw up a standard. I found that you can at least read the content by using this url: http://personal.cobaltgroup.com/~ajalis/xml/xml2_files/ Not only do they write bad html, they also don't know how to properly setup a web site. The content is there, just no fancy formatting. William Julien _,'| _.-''``-...___..--'; moonbeam@catmanor.com /, \'. _..-' , ,--...--''' vi is my shepherd; < \ .`--''' ` /| i shall not font. `-,;' ; ; ; __...--'' __...--_..' .;.' (,__....----''' (,..--'' perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' -------------- next part -------------- #!/usr/local/bin/perl #------------------------------------------------------------------- # Makes a slideshow of the GIFs exported from powerpoint. # # Assumes # # 1. the powerpoint presentation has been saved as GIF images # into a directory in public_html/data/. # [ex: public_html/data/foobar/] # # 2. the HTML pages will live in a subdir under public_html/slides/ # [ex: public_html/slides/foobar/] # # 3. you're running *nix (for the symlink call--could delete this for # win32) # # Run the script like this: # # ./make-slideshow foobar # # joel@largest.org #------------------------------------------------------------------- use strict; my $input_dir = "../data/"; my $subdir = shift || die "I need a subdir name to use under [$input_dir]"; my $input_path = $input_dir.$subdir; my $output_path = "../slides/$subdir"; # Setup the output path if ( -d $output_path ) { print "$output_path already exists! Use this dir anyway? "; chomp (my $answer = ); exit unless ( $answer =~ /^[yY]$/ ); } else { mkdir ($output_path, 0755) || die "Couldn't mkdir [$output_path]: $!"; } # Figure out the total number of slides (assigned to $max) my $max; for my $gif_file ( glob "$input_path/*.GIF" ) { my ($num) = $gif_file =~ /(\d+)\.GIF$/; # sanity check unless ($num) { warn "Problem with [$gif_file], skipping.\n"; next; } $max = $num unless ( $num < $max ); } # Now build the HTML pages for my $num ( 1..$max ) { my $html_file = "$output_path/$num.html"; open (OUT, ">$html_file") || die "Can't open [$html_file]: $!"; print OUT< Largest Industries: "$subdir" slideshow: slide $num
End_of_HTML # Construct the navigation line ("Prev|Home|Next"), and store in $nav my $previous = $num - 1; my $next = $num + 1; my $nav = "[ "; $nav .= ($num == 1) ? # are we on the first page? "<- Prev" : # then don't hyperlink to previous qq{<- Prev}; $nav .= qq{ | }. # add home hyperlink qq{Home}. qq{ | }; $nav .= ($num == $max) ? # are we on the last page? "Next ->" : # then don't hyperlink to next qq{Next ->}; $nav .= " ]"; print OUT qq{
Slide $num/$max
$nav
}. qq{
$nav}. qq{
}; close OUT; } # Finally, make symlink to index.html my $symlink = "$output_path/index.html"; if ( -e $symlink ) { # Get rid of old symlink, if it exists system ("rm $symlink") == 0 || die "Couldn't rm old symlink: $?"; } system ("ln -s 1.html $output_path/index.html") == 0 || die "Couldn't make symbolic link: $?"; __END__ From phillipneal at hotmail.com Thu May 11 20:46:49 2000 From: phillipneal at hotmail.com (Phillip Neal) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: April DBI talk html is available Message-ID: <20000512014650.55002.qmail@hotmail.com> Dear Spugsters, The presentation from the April SPUG talk on the Perl DBI/DBD (the shortest SPUG-Talk in recorded history) is online at: http://philly.tensegrity.net/spug2/pdbi.htm Ok,ok,ok. .htm .. so what !!! Phil ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From phillipneal at hotmail.com Thu May 11 20:57:46 2000 From: phillipneal at hotmail.com (Phillip Neal) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Correction: That was the "MARCH" meeting Message-ID: <20000512015746.8954.qmail@hotmail.com> Dear Spugsters, My last message about the html for the "April" DBI talk should have said for the "March" DBI talk. My apologies for any confusion. For as we all know, "Time flies like an arrow. Fruit flies like a banana." Phil ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From davec at icthus.net Thu May 11 23:43:41 2000 From: davec at icthus.net (David Corcoran) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Where to go for freelance work Message-ID: <200005120443.VAA03329@mail15.bigmailbox.com> Spugers, I'm a perl programmer who can spare about 16 to 20 hours a week for short projects. Does anyone know where a good site may be to pick up some side or freelance work? David ------------------------------------------------------------ Get your FreeMail @ Icthus.Net - http://freemail.icthus.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From jdevlin at stadiumdistrict.com Fri May 12 04:20:39 2000 From: jdevlin at stadiumdistrict.com (Joe Devlin) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Where to go for freelance work Message-ID: <01BFBBB8.E0F82A80@tac-lx100-ip1.nwnexus.net> http://jobs.perl.org ---------- From: David Corcoran[SMTP:davec@icthus.net] Sent: Thursday, May 11, 2000 9:43 PM To: spug-list@pm.org Subject: SPUG: Where to go for freelance work Spugers, I'm a perl programmer who can spare about 16 to 20 hours a week for short projects. Does anyone know where a good site may be to pick up some side or freelance work? David ------------------------------------------------------------ Get your FreeMail @ Icthus.Net - http://freemail.icthus.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From LaurenS at bsquare.com Fri May 12 11:35:38 2000 From: LaurenS at bsquare.com (Lauren Smith) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Price of admission Message-ID: <75514FC5ECC8D2118C8D00A0C9ED54DB9144B2@obcmail1.bsquare.com> Hi mongers, I didn't notice on the web page (maybe I didn't read well enough), so I was wondering if there is a cost of admission to SPUG events. Or beyond that, a membership fee. Thanks, Lauren Smith -- bSquare QA Engineer (425) 519-5253 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ajalis at cobaltgroup.com Fri May 12 11:38:19 2000 From: ajalis at cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Slides Message-ID: <200005121638.JAA07233@krypton.cobaltgroup.com> Ken McGlothen writes: > If anyone's interested, I already typed up a text paraphrase of all > the slides. Since there's no real non-text information in the > slides, it's pretty complete. The paraphrasing is pretty close to > the original, just with some streamlined grammar. > > I won't send it out without Asim's permission, of course, since he > has copyright on it, but I could send it to Asim for him to review > for accuracy and any further changes, and then he could mail it to > the list if he likes. Thanks for the offer, Ken. However, after I read your e-mail it occurred to me that I had typed out the whole talk in plain text and then cut-and-pasted it into powerpoint -- since emacs is much easier to think in than powerpoint. So I can just go ahead and post *that* on the web. This is verbatim what's in the slides mod some tiny edits. And in fact this might be more readable than the slides; the flow is more natural. I will go ahead and put that text on my web-site. Here is the URL I will use: http://www.cobaltgroup.com/~ajalis/xmltext Check this URL around 10 am today (Friday). It should be up by then. Asim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tnight at ironworx.com Fri May 12 11:51:54 2000 From: tnight at ironworx.com (Terry Nightingale) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Where to go for freelance work References: <01BFBBB8.E0F82A80@tac-lx100-ip1.nwnexus.net> Message-ID: <391C36AA.26988880@ironworx.com> www.asynchrony.com www.elance.com www.ework.com www.freeagent.com www.guru.com Joe Devlin wrote: > > http://jobs.perl.org > > ---------- > From: David Corcoran[SMTP:davec@icthus.net] > Sent: Thursday, May 11, 2000 9:43 PM > To: spug-list@pm.org > Subject: SPUG: Where to go for freelance work > > Spugers, > > I'm a perl programmer who can spare about 16 to 20 hours a week for > short projects. Does anyone know where a good site may be to pick up > some side or freelance work? > > David > > ------------------------------------------------------------ > Get your FreeMail @ Icthus.Net - http://freemail.icthus.net > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address -- Terry Nightingale Principal Consultant, IronWorx LLC +1-425-649-9304(v) / +1-425-643-7112(f) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From andy at n2h2.com Fri May 12 11:54:30 2000 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Price of admission In-Reply-To: <75514FC5ECC8D2118C8D00A0C9ED54DB9144B2@obcmail1.bsquare.com> Message-ID: Egads! No way. Nothing. Nada. Zip. Zilch. Zero. Well, other than the cost of getting yourself to the event and having to endure said event. :) On May 12, 2000 @ 9:35am, Lauren Smith wrote: > I didn't notice on the web page (maybe I didn't read well enough), so I was > wondering if there is a cost of admission to SPUG events. Or beyond that, a > membership fee. -- Andrew Sweger | N2H2, Incorporated Systems Architect | 900 Fourth Avenue, Suite 3400 Advanced Technologies Division | Seattle WA 98164-1059 v=206.336.2947 f=206.336.1541 | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From ajalis at cobaltgroup.com Fri May 12 12:03:53 2000 From: ajalis at cobaltgroup.com (Asim Jalis) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: XML/XSLT Presentation Text Message-ID: <200005121703.KAA07333@krypton.cobaltgroup.com> The text version of the talk is up. The URL is http://www.cobaltgroup.com/~ajalis/xmltext In case people are curious, no, I did not use XSLT to generate it. There is a deep irony in there somewhere :-) Asim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Fri May 12 12:18:57 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Price of admission In-Reply-To: ; from andy@n2h2.com on Fri, May 12, 2000 at 09:54:30AM -0700 References: <75514FC5ECC8D2118C8D00A0C9ED54DB9144B2@obcmail1.bsquare.com> Message-ID: <20000512101857.A1096@timji.consultix.wa.com> On Fri, May 12, 2000 at 09:54:30AM -0700, Andrew Sweger wrote: > On May 12, 2000 @ 9:35am, Lauren Smith wrote: > > > I didn't notice on the web page (maybe I didn't read well enough), so I was > > wondering if there is a cost of admission to SPUG events. Or beyond that, a > > membership fee. > Egads! No way. Nothing. Nada. Zip. Zilch. Zero. > > Well, other than the cost of getting yourself to the event and having to > endure said event. :) (And pay for your beer afterwards . . .) There's no charge, but there is a general idea that those attending lots of SPUG meetings should eventually give back to the group by preparing a talk for a meeting. We're an "educational cooperative", dedicated to helping each other learn more about Perl, and this format depends on activite participation of the membership. Incidentally, all meetings from August onward are open for volunteer speakers! 8-} -Tim ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From rerwin at ricochet.net Sun May 14 04:42:19 2000 From: rerwin at ricochet.net (Ryan Erwin) Date: Wed Aug 4 00:07:18 2004 Subject: ESPUG::May::Meeting::Suggestions? Message-ID: <005701bfbd88$b488f660$3c00a8c0@Inspiron> e?SPUGers- As many of you have no doubt noticed, our May meeting is rapidly approaching. The meeting is scheduled for the 24th at 7:00 pm. As I write this message, that meeting is just over 10 full days away. Unfortunately, we do not yet have a topic for the meeting. If you have any suggestions for possible meeting topics or if there is any topic that you would be interested in presenting, please email me as soon as possible. Some topics I'm personally interested in at the moment include: * GUI Applications * Can "attractive" GUI apps be developed with Perl/TK? * Anyone used plFLTK, the Perl interface to FLTK the Fast Light ToolKit? * using XPFE the Mozilla Toolkit for standalone perl apps? * unique looking "Sonique like" apps in Perl? * Cross Platform Development * Differences between Win32 and Unix? * MacPerl Development? * XML * XML SOAP [simple object access protocol / serializing objects in XML and sending over HTTP/SMTP/...] * XML::DOM * Text::Balanced * Coy ;) If any of these spark your interest, or if there is something else that you would like to speak and/or hear about, please contact me. Also, I mentioned at the last espug meeting that the espug.pm.org site as well as my personal email would be down for the rest of the week. Well, it's been about 3 weeks now and i still don't have everything going yet. My apologies for not having the site back up as scheduled, but it should be there before the next meeting. Ryan Erwin ESPUG Emperor rerwin@ricochet.net BTW: don't forget to call your mom today! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Sun May 14 12:38:12 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:18 2004 Subject: ESPUG::May::Meeting::Suggestions? In-Reply-To: <005701bfbd88$b488f660$3c00a8c0@Inspiron>; from rerwin@ricochet.net on Sun, May 14, 2000 at 02:42:19AM -0700 References: <005701bfbd88$b488f660$3c00a8c0@Inspiron> Message-ID: <20000514103812.A2051@timji.consultix.wa.com> n Sun, May 14, 2000 at 02:42:19AM -0700, Ryan Erwin wrote: > e?SPUGers- > > As many of you have no doubt noticed, our May meeting is rapidly > approaching. The meeting is scheduled for the 24th at 7:00 pm. As I > write this message, that meeting is just over 10 full days away. > Unfortunately, we do not yet have a topic for the meeting. If you have > any suggestions for possible meeting topics or if there is any topic > that you would be interested in presenting, please email me as soon as > possible. Speaking as the "SPUG Meeting Director", I know that topics for meetings are actually easy to come by, but speakers to go with them quite a bit harder 8-} . Many (E-)?SPUG members know Perl pretty well, but don't have much experience in structuring live presentations, or in the particular application areas that might make for the most exciting meeting topics. To deal with this situation, SPUG has found it useful to nominate a chapter or two from the "Perl Cookbook" for an upcoming meeting, and ask volunteers to come forward to lead the discussion. This provides a "pre-fab script" for the meeting, and an audience that is predisposed to help spark discussions by bringing specific questions along with them. I'd list the following Perl books as possible candidates for E-SPUG meeting fodder; anybody want to nominate others? * "Effective Perl Programming", by Joseph Hall & "some other guy", which is my favorite of the "here's how real Perl Programmers actually use Perl" variety, * "Advanced Perl Programming" by Sriram Srinivasan, which is unique in delving into areas rarely touched by other Perl authors (RPC calls, TK, extending & embedding Perl) * "OO Perl", by "our own" Damian Conway. (Although APP also shows a way of doing OOP in Perl, Damian's book describes an OOP style that is indisputably the new de-facto standard). * Lincoln Stein's book on CGI.pm, but unless a new edition is out that corrects the egregious typesetting errors I've heard about, it would be best to delay its use (to delay SPUGster purchases until then) Another option, which has the added benefit of being much *cheaper*, is to cover a particular (non-trivial, and technique-oriented) Perl *man page* at a meeting, such as "man perldsc (Data Structures Cookbook), man perltooot (OO tutorial), etc. I'm sure there are (E-)?SPUG lurkers out there who have had to scrutinize some of these documents for a programming project, become fairly expert on their contents, and happy to leverage their expertise for the benefit of the group. If I weren't unavailable, I'd personally volunteer to speak at that meeting, just to sample these "free cookies" I'm hearing so much about, and to demonstrate that "man perldsc" or similar can work as an effective meeeting topic, but alas, it won't be feasible for me on that date. (I hope the rest of you also have good alibis!) > (snip) > > Ryan Erwin > ESPUG Emperor > rerwin@ricochet.net > > BTW: don't forget to call your mom today! Thank you Ryan, you may have saved my life with that reminder! 8-} *========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | CLASSES; 5/16: UNIX 5/22: Basic Perl+Modules 6/12: Intermediate Perl | | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | *========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Sun May 14 13:30:12 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Estimating Attendance for CONWAY $EMINARS Message-ID: <20000514113012.C2051@timji.consultix.wa.com> "Polling of Interest" in Damian Conway PERL SEMINARS, Kirkland, WA, July 2000 After SPUG secured Damian Conway as a speaker for July, he indicated an interest in presenting Perl seminars on "Adv. OOP" and "Text Parsing" while in the area. Since my company is in the business of staging such events (usually featuring "me"), we volunteered to arrange his seminars. (FULL DETAILS are provided in an attachment.) As the organizer of these events, it's important to me to have a reasonably accurate forecast of the likely attendance, so we don't get caught short by late registrants causing a conference-room overflow, and an associated last-minute attempt to shift the meeting to a larger venue - during the 4th of July holiday period! So I'd be grateful if SPUGsters who think they might attend would please drop me an Email letting me know, so I can begin making plans to book a larger room if necessary (and by all means if you're serious about attending, please register soon so you'll be assured a seat). The prices have been set to match the EarlyBird-discounted prices you'd pay for the same seminars at "The Perl Conference 4.0", but of course you wouldn't need to pay for airplanes or hotels if you're local and you attend in Kirkland. And if you'd be attending TPC anyway, attending Damian's seminars before the conference would free-up valuable conference time for attending other events, and also allow you to receive greater personal attention by attending with a smaller group. (Incidentally, attending here also allows a much greater proportion of your tutorial fee to go to the speaker rather than to conference overhead, which Damian would undoubtedly appreciate.) This is the first time my company has "sponsored" a presentation by an outside speaker, so if you have any comments at all on this endeavor, I'd be grateful to hear them! Thanks, *========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649 | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | CLASSES; 5/16: UNIX 5/22: Basic Perl+Modules 6/12: Intermediate Perl | | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | *========================================================================* -------------- next part -------------- ADVANCED OBJECT-ORIENTED PERL Dr. Damian Conway July 6, 2000, Kirkland, WA USA Web Version: http://www.consultix-inc.com/advoop.html Sponsored by CONSULTIX, http://www.consultix-inc.com SPEAKER: Dr Damian Conway School of Computer Science and Software Engineering, Monash University, Clayton, 3168 AUSTRALIA TARGET AUDIENCE: Perl programmers who have either completed Tom Christiansen's introductory object-oriented Perl tutorial, read and absorbed Chapters 1 through 3 of "Object Oriented Perl", taken the Consultix "Intermediate Perl Programming" class, or who have otherwise acquired a basic familiarity with simple OO Perl. WHAT ATTENDEES WILL LEARN: This tutorial will show you how to build on the basic object-oriented Perl techniques you already know and unlock more of the power of Perl's OO capabilities. Attendees will learn: * how to use pseudo-hashes and the standard fields.pm and base.pm modules; * how (and when) to bless arrays and scalars; * three different ways to implement data hiding for Perl objects (including the Tie::SecureHash module); * how Perl implements inheritance and polymorphism (and how you can change the rules of either); * how to simulate scalars, arrays, hashes, and typeglobs using ties; * the features (and traps) of operator overloading in Perl; * two easy ways to build complete classes (semi-)automatically; * how to do design-by-contract programming in OO Perl (using the Class::Contract module); * two ways to do generic programming in Perl; * how to use the Class::Classless module to build OO programs without classes; * how to use multiple dispatch (polymorphism on steroids) to implement event-driven class hierarchies for simulation and GUI applications. SEMINAR OUTLINE: * Review of Perl OO basics - packages, references, blessing - the three rules - Example: a dog-tag class * Non-hash-based objects - arrays as objects - scalars as objects - Examples: hash re-iterators; OO bitstrings * Pseudo-hashes - what they are, how to use them as objects - the fields.pm module - compile-time type checking * Automating class construction - Class::Struct - Other class construction modules - Example: A CD library * Inheritance - revision of concepts - how they work in Perl - @ISA, isa(), can(), SUPER - Example: a restricted transceiver class * Polymorphism - When and how to use it - Variations on the theme - Example: OO lexical analysis - Examples: a safer transceiver class * Encapsulation - the pros and cons of data hiding - encapsulation via closures - encapsulation via scalars - encapsulation via the Tie::SecureHash module - Example: the dog-tag class thrice revisited * Inheritance revisited - tricks with inherited constructors and destructors - abstract methods - attribute collisions - inheritance and pseudohashes: the base.pm module * Ties - simulating implementing scalars and hashes - scalar examples (a bounded scalar; proxies) - hash example (a multi-iterable hash) * Operator overloading - overview and limitations of mechanism - overloading operations, conversions, and constants - problems with references - Example: Klingon arithmetic * Grafting other OO models onto Perl - classless programming with Class::Classless - design-by-contract with Class::Contract - Examples: Classless network control; Contractual threading * Generic programming - Why you don't need it in Perl - How to do it anyway - Examples: generic lists; generic trees * Multiple dispatch - when regular polymorphism isn't enough - cascaded polymorphism - table driven dispatch - Class::Multimethods - Example: GUI event-loop programming SPEAKER BIOGRAPHY: Damian Conway holds a Ph.D. in Computer Science and is a Senior Lecturer in Computer Science and Software Engineering at Monash University, Melbourne, Australia. He is the author of numerous well-known modules including: Parse::RecDescent, Text::Balanced, Lingua::EN::Inflect, Class::Multimethods, and Coy (all available from your local CPAN mirror). Damian was the winner of both the 1998 and 1999 Larry Wall Awards for Practical Utility. He is a member of the technical committee for The Perl Conference 4.0, the convener of the annual Perl haiku contest, a columnist for The Perl Journal, and author of the book "Object Oriented Perl". -------------- next part -------------- BEYOND REGEXES: Text Parsing with Perl Modules Dr. Damian Conway July 7, 2000, Kirkland, WA USA Web Version: http://www.consultix-inc.com/parsing.html Sponsored by CONSULTIX, http://www.consultix-inc.com SPEAKER: Dr Damian Conway School of Computer Science and Software Engineering, Monash University, Clayton, 3168 AUSTRALIA TARGET AUDIENCE: Perl programmers who are familiar with simple regular expressions and the use of modules. The techniques presented will be useful to anyone who needs to process structured text of any kind. WHAT ATTENDEES WILL LEARN: This seminar will show you how to use a range of standard Perl features and several CPAN modules (in particular, Parse::RecDescent) to decipher and process a variety of complex data and command formats. It's a practical introduction to the techniques of grammar-based recursive-descent parsing. You will learn: * how to design and build parsers to process Apache configuration files and log data, * how to process structured expressions (e.g. search engine queries), * how to balance nested brackets and match delimiters without a regular expression, * how to fold, spindle and mutilate the comments in a C program, * how to dissect C++ type declarations with a self-adapting parser, * how to allow embedded Perl code in your own data format or command language, * how convert natural language queries into SQL. * how to design and build self-modifying parsers to process Apache configuration files and log data; * how to pull pesky unmatched

tags from HTML; * how to deal with ambiguous data by parsing it in multiple universes simultaneously; * how to get Parse::RecDescent to write most of your grammar for you; * how to parse modular text (e.g. with source with #includes in it); * how to pre-filter your source code by tricking Perl into (nearly) parsing Perl; * how to debug Parse::RecDescent parsers efficiently and how to improve the efficiency of your Parse::RecDescent grammars; There'll even be some useful stuff, like how to write a program that does stand-up comedy. You'll also discover the psychedelic secrets of Randal's beatnik poetry generator, and learn how to earn thousands in your spare time by generating scholarly articles for modern Philosophy journals. SEMINAR OUTLINE: * A brief history of parsing - grammars, rules, recursive descent, etc. * Implementing parsers - top-down vs bottom-up approaches * Useful tools - Text::Balanced, Parse::Yapp, perl-byacc, Parse::RecDescent * Simple parsing - Parsing delimited text, parsing Perl subsets * Parsing data - Parsing Apache log files - optional subrules, list parsing - run-time parser generation * Parsing input - The Text::Query modules - OO parsing - operator precedence, lists, look-ahead, rejections, etc. * Parsing code - parsing C and C++ - stateful grammars - porting yacc grammars (including left-recursion) - self-extending parsers, committing rules, deferred actions - grammar precompilation * Parsing natural language - generating SQL queries for natural language input - synthetic stand-up via reciprocal parsers * Miscellaneous advanced features of Text::Balanced - precompiling delimiter extractions - extracting tagged text - extracting Perl variables - extracting mixed components * Miscellaneous extra features of Parse::RecDescent - Named items (the %item array) - Debugging grammars: , , , and - Context information: $thisline, $lastoffset, @itempos, etc. - Extreme prejudice: the directive * Non-deterministic parsing - tracking "goodness-of-match" - the and directives * Pre-tokenization - the directive - token-based parsing * Automatic grammar generation - autoactions - autostubbing - autotrees - the , , and directives * Generic rules - the directive - subrule arguments: @arg and %arg * Handling distributed text - processing file inclusions recursively - processing file inclusions by input modification - other uses of input modification * Semi-grammatical parsing - when Parse::RecDescent is overkill and regexes don't appeal - CSV revisited, text interpolation, simple command interfaces * Self-modification - Run-time parser generation and self-extending parsers revisited - A self-modifying Apache config/log file parser * (Nearly) parsing Perl - parsing with Text::Balanced on Occam's Razor - source code filtering * Metagrammars - building a grammar for parsing grammars - beat poetry and postmodern literature SPEAKER BIOGRAPHY: Damian Conway holds a Ph.D. in Computer Science and is a Senior Lecturer in Computer Science and Software Engineering at Monash University, Melbourne, Australia. He is the author of numerous well-known modules including: Parse::RecDescent, Text::Balanced, Lingua::EN::Inflect, Class::Multimethods, and Coy (all available from your local CPAN mirror). Damian was the winner of both the 1998 and 1999 Larry Wall Awards for Practical Utility. He is a member of the technical committee for The Perl Conference 4.0, the convener of the annual Perl haiku contest, a columnist for The Perl Journal, and author of the book "Object Oriented Perl". -------------- next part -------------- From: Tim Maher, CONSULTIX RE: Tuition Discounts Expiring; Details on Conway Seminars NOTE: For List Removal, see below DAMIAN CONWAY SEMINARS Consultix is sponsoring Perl Guru Dr. Damian Conway in July for two one-day Perl seminars, on "Adv. OOP" and "Text Parsing". Complete seminar outlines are provided as attachments to this message. Short descriptions of these seminars are also provided below, after the course schedule (full details available at http://www.consultix-inc.com). NOTE: The only other place to attend these seminars is at "The Perl Conference 4.0", held in California. Why attend in Seattle? * if already in Pacific NorthWest, no need to travel to California * the seminars won't be cheaper at the Conference * if attending Conference anyway, attending in Kirkland frees up valuable conference time for other tutorials in same time-slot DISCOUNTS EXPIRING The "Early-Bird Discounts" (worth 10%) for the "Intermediate Perl" and "Advanced Pattern Matching" classes (see below) expire today, 5/12. Call today with your charge-card information to obtain the discounts! (Prices listed at http://www.consultix-inc.com/reg.html) -------------------------------------------------------------------- SPRING/SUMMER 2000 CLASS SCHEDULE, Kirkland WA Course Dates Days UNIX Fundamentals 05/16-05/19 4 - CLASS FULL Perl Programming, plus Modules 05/22-05/25 4 Intermediate Perl Programming 06/12-06/15 3.5 Adv. Pattern Matching with Perl 06/15-06/16 1.5 Int. Perl Programming + Adv. PM 06/12-06/16 5 Advanced Object Oriented Perl 7/6 1 (Damian Conway) Parsing with Perl Modules 7/7 1 (Damian Conway) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ BEYOND REGEXES: TEXT PARSING WITH PERL MODULES, by D. Conway July 7, 2000. Kirkland, WA USA DESCRIPTION: This seminar will show you how to use a range of standard Perl features and several CPAN modules (in particular, Parse::RecDescent) to decipher and process a variety of complex data and command formats. It's a practical introduction to the techniques of grammar-based recursive-descent parsing. You'll also discover the psychedelic secrets of Randal's beatnik poetry generator, and how to write a program that does stand-up comedy. Details attached, and also available at: http://www.consultix-inc.com/parsing.html ------------------------------------------------------------ ADVANCED OBJECT-ORIENTED PERL, by Damian Conway July 6, 2000. Kirkland, WA USA DESCRIPTION: This seminar will show you how to build on the basic object-oriented Perl techniques you already know and unlock more of the power of Perl's OO capabilities. Topics include Pseudo-hashes, fields.pm, base.pm, data hiding, Tie::SecureHash, inheritance, polymorphism, operator overloading, automatic class creation, design-by-contract programming, generic programming, Class::Classless, and multiple dispatch. Details attached, and also available at: http://www.consultix-inc.com/advoop.html ----------------------------------------------------------------------- ON-LINE RESOURCES On-Site training information: http://www.consultix-inc.com/on-site.html Course Listings: UNIX/Shell, http://www.consultix-inc.com/unixlist.html AWK/Perl, http://www.consultix-inc.com/perllist.html Instructor Evaluations: http://www.consultix-inc.com/evals.html Registration and Pricing: http://www.consultix-inc.com/reg.html *========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649 | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | CLASSES; 5/16: UNIX 5/22: Basic Perl+Modules 6/12: Intermediate Perl | | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | *========================================================================* From damian at cs.monash.edu.au Mon May 15 02:06:45 2000 From: damian at cs.monash.edu.au (Damian Conway) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Hey, buddy, I'm *talking* here! Message-ID: <200005150706.RAA05297@indy05.csse.monash.edu.au> Dear SPUGsters, There seems to be no clear consensus on what I should talk about at my second evening talk on July 6 (the one in Redmond, WA). Tim suggested that we could simplify the process if I posted two possible topics and then you just chose between them. For each talk, I've provided both a psychodelic left-brain panegyric and a pin-striped right-brain abstract. Feel free to read whichever one unnerves you less. The actual talk will try to steer a course *between* the hysterical and the catatonic. If you're intending to come to the Redmond talk, *please* reply to this message (which reply will go to Tim) and indicate either "Talk A" or "Talk B". Thanks, Damian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name: Damian Conway addr: School of Computer Science email: damian@conway.org and Software Engineering web: http://www.cs.monash.edu.au/~damian Monash University fax: +61-3-9905-5146 Clayton 3168, AUSTRALIA -------cut-----------cut-----------cut-----------cut-----------cut---------- Proposed Talk A "Multimethods: Polymorphism Gone Mad" Tonight: A world gone crazy, as method calls throw off their shackles and start telling objects "Who ya gonna call?" Plus the secret shame of subroutine overloading. In Perl! A sober and serious talk discussing the technique of multiple dispatch of object methods, and its implementation in Perl. Ad hoc approaches will be described and dismissed, and use of the Class::Multimethods module advocated and explained. The implications of the multimethod construct as a mechanism for signature-based subroutine overloading will also be mirthlessly pondered. -------cut-----------cut-----------cut-----------cut-----------cut---------- Proposed Talk B: "Stwing machink for tha leksicograficly chalunged" See Jarrko's String::Approx and Damian's String::EditDistance modules battle for supremacy amongst the illiterate! And on the same bill: "Michael Mania II"! A no-holds-barred, knock-down-drag-out free-for-all as Michael Schwern's Text::Metaphone takes on Mike Stok's Text::Soundex. Which of these four CPAN heavyweights will emerge as the Fuzzy String Comparison Champion of the World??? A grave and earnest analysis of the information theory underlying Approximate String Matching and Phonetic Approximate String Matching. A careful comparison of the various relevant modules available on the CPAN, with particular attention to efficiency, portability, robustness, and task-orientation. -------cut-----------cut-----------cut-----------cut-----------cut---------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From jdevlin at stadiumdistrict.com Tue May 16 01:18:26 2000 From: jdevlin at stadiumdistrict.com (Joe Devlin) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: cgi method popup_menu Message-ID: <01BFBEC3.E2121800@tac-lx100-ip47.nwnexus.net> If I make a call to the cgi method popup_menu more than once in a particular namespace it remembers the previous labels that were sent to it, then prints the previous popup_menu labels plus the new ones. I fixed the 'problem' by calling popup_menu inside a subroutine then passing the resulting text back to the calling routine. Apparently exiting the subroutine destroys the method. Is there a way to reuse the popup_menu without putting it in a subroutine? Joe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From debert at osd.com Tue May 16 10:51:12 2000 From: debert at osd.com (Daniel V. Ebert) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: cgi method popup_menu In-Reply-To: <01BFBEC3.E2121800@tac-lx100-ip47.nwnexus.net> References: <01BFBEC3.E2121800@tac-lx100-ip47.nwnexus.net> Message-ID: <200005161551.AA07926@osd.com> I usually create a hash of values and display labels for each pop-up menu I want on a form. This should give you two seperate, unrelated pop-up menus. I usually create the hash outside of the 'displayForm' subroutine so I can use the labels in output generated by other subroutines. This might not be the best way to do it, but it works :) #!/usr/bin/perl -w use CGI qw/:standard/; $medalLabels{bronze} = "Bronze"; $medalLabels{silver} = "Silver"; $medalLabels{gold} = "Gold"; @medalKeys = keys %medalLabels; $ribbonLabels{white} = "White"; $ribbonLabels{red} = "Red"; $ribbonLabels{blue} = "Blue"; @ribbonKeys = keys %ribbonLabels; if (param()) { processForm(); } else { displayForm(); } sub displayForm { print header, start_html(-title =>'Test CGI', -bgcolor =>'#FFFFFF'), start_form; print popup_menu(-name=>'medal', -values=> \@medalKeys, -labels=> \%medalLabels), p; print popup_menu(-name=>'ribbon', -values=> \@ribbonKeys, -labels=> \%ribbonLabels), p; print submit(-name=>' Process Form ')," ", defaults(-name=>' Reset Form '); print end_form, end_html; } #END displayForm SUB sub processForm { #DO WHATEVER YOU WANT WITH THE FORM ENTRIES } #END processForm You wrote: > If I make a call to the cgi method popup_menu more than > once in a particular namespace it remembers the previous > labels that were sent to it, then prints the previous popup_menu > labels plus the new ones. > > I fixed the 'problem' by calling popup_menu inside a subroutine > then passing the resulting text back to the calling routine. > Apparently exiting the subroutine destroys the method. > > Is there a way to reuse the popup_menu without putting it > in a subroutine? > > Joe > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > --- Dan Ebert Seanet Internet Services (206)343-7828 ============== "Comparing information and knowledge is like asking whether the fatness of a pig is more or less green than the designated hitter rule." -- David Guaspari - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From andyj at microsoft.com Tue May 16 11:54:02 2000 From: andyj at microsoft.com (Andy Jacobs) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: LWP::Simple too simple? Message-ID: <39ADCF833E74D111A2D700805F1951EF17682100@RED-MSG-06> I've had a script that uses get() from LWP::Simple. It's been working great, until sometime about last week. Now, the GIF's that I retrieve with get() are only showing a few course lines at the top (like GIFs look in a browser when it first starts to download them, in browsers that show the progressive data). I looked (briefly) at the Simple.PM file, and saw a timeout of 60 (I assume seconds). When my script runs, it is spending much less than 60 seconds on each get(), leading me to believe it's not timing out. When I bring up a web page that references the same GIFs, from the same machine running the script, they appear in full. This is happening consistently for GIFs from at least two unrelated sites. My script mails a Web page with GIFs via SMTP. Last week, I changed it from using Net::SMTP explicitly, to using MIME::Lite's SMTP features (which weren't present when I first wrote the script). This is about the time I noticed the change, but can't be sure that this did it (and don't have a copy of my previous version). Any ideas what might be going wrong or how to fix it? Thanks. - Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20000516/13017406/attachment.htm From lorraine at nw.saic.com Tue May 16 12:14:09 2000 From: lorraine at nw.saic.com (Lorraine Johnson) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: cgi method popup_menu Message-ID: <3.0.32.20000516101408.00909650@zephyr.nw.saic.com> Wild...it's true. In the following code, I have three calls to popup_menu, the third form element has the same name as the first. The third call to popup_menu produces a different menu than the first. When the user clicks the Submit button, one expects CGI.pm to only keep the second set. If I select zucchini, pear, and peas, then the result gives me "zucchinipeas" for the vegetable result. I guess you just don't want to use the same name twice if you can help it. (Do you really need the space?) Lorraine ################################## This code: ################################## #!perl -w use strict; use CGI qw(:standard :html3); my $title = "Vegetables"; print header(); print start_html( -title=>$title, -bgcolor=>'#ffffff'); print h1($title), "\n"; if (!param()) { print start_form(), "\n"; print popup_menu(-name=>'vegetable', -value=>[qw(okra squash zucchini cauliflower)], -default=>'squash'), "\n

"; print popup_menu(-name=>'fruits', -value=>[qw(pear peach pineapple)], -default=>'pineapple'), "\n

"; print popup_menu(-name=>'vegetable', -value=>[qw(beans peas carrots)], -default=>'beans'), "\n

"; print submit(-name=>"Submit"), " ", reset(-name=>"Clear"), "\n"; print end_form(); } else { print "Vegetable is ", param('vegetable'), "\n

"; print "Fruit is ", param('fruits'), "\n

"; } print end_html(); ################################## Produces this html: ################################## Vegetables

Vegetables

################################## Select zucchini, pear, and peas, and you get: ################################## Vegetables

Vegetables

Vegetable is zucchinipeas

Fruit is pear

################################## At 11:18 PM 5/15/00 -0700, Joe Devlin wrote: >If I make a call to the cgi method popup_menu more than >once in a particular namespace it remembers the previous >labels that were sent to it, then prints the previous popup_menu >labels plus the new ones. > >I fixed the 'problem' by calling popup_menu inside a subroutine >then passing the resulting text back to the calling routine. >Apparently exiting the subroutine destroys the method. > >Is there a way to reuse the popup_menu without putting it >in a subroutine? > >Joe ................................... J. Lorraine Johnson SAIC/Sea Technology lorraine@nw.saic.com v: (425) 482-3316 f: (425) 485-5566 http://www.nw.saic.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From neil_best at yahoo.com Tue May 16 12:45:35 2000 From: neil_best at yahoo.com (Neil Best) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: May 16 Meeting: Extending Perl with C Message-ID: <20000516174535.24849.qmail@web2004.mail.yahoo.com> Hello, all. I am curious about the topic of tonight's meeting, but I'm not sure if it will address my particular interest. I am hoping to ellicit some comments from the collective. My colleague has developed a nice piece of fortran code for hydrodynamic simulations, but it is rather cumbersome to use, as you might imagine, requiring preparation of input text files and parsing of massive output files. Perl has helped immensely in this respect, but I imagine a brave future of radio buttons and drop-down menus for this software. Does perl do fortran? I once corresponded with an astronomer in Oklahoma who said that he could wrap a fortran sub with C and call it from perl, but it turned out to be too slow for his purposes. How can we come up with something that is viable for high-performance computing? Who can convince me to attend? Thanks. Neil Best Ocean Engineer nbest@oceanspar.com nbest@alum.mit.edu ................................................... tel:206/7800992x122 cel:206/2506012 fax:206/8551750 ................................................... Ocean Spar Technologies / Nor'Easter Trawl Systems http://www.oceanspar.com http://www.net-sys.com 7910 NE Day Rd. Bainbridge Island, WA 98110 ................................................... --- Tim Maher/CONSULTIX wrote: > MAY 2000 Seattle Perl User's Group > Meeting > > ------------------------------------------------------ > Topic: Intro. to Extending Perl with the C > Language > Speaker: Brian Ingerson, EpixTech > Time: May 16th 2000 (Third Tuesday), 7pm-9pm > LOCATION: Union Bank of California Bldg, 5th Floor > Mtg Room > Cost: Free > > Brian Ingerson (b.ingerson@epixtech.com) will cover > the basics of > writing Perl Modules in the C language. __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From bill at celestial.com Tue May 16 13:21:57 2000 From: bill at celestial.com (Bill Campbell) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: cgi method popup_menu In-Reply-To: <3.0.32.20000516101408.00909650@zephyr.nw.saic.com>; from lorraine@nw.saic.com on Tue, May 16, 2000 at 10:14:09AM -0700 References: <3.0.32.20000516101408.00909650@zephyr.nw.saic.com> Message-ID: <20000516112157.A13986@kstarr.celestial.com> On Tue, May 16, 2000 at 10:14:09AM -0700, Lorraine Johnson wrote: >Wild...it's true. > >In the following code, I have three calls to popup_menu, the third form >element has the same name as the first. The third call to popup_menu >produces a different menu than the first. When the user clicks the Submit >button, one expects CGI.pm to only keep the second set. If I select >zucchini, pear, and peas, then the result gives me "zucchinipeas" for the >vegetable result. I guess you just don't want to use the same name twice >if you can help it. (Do you really need the space?) Lorraine I haven't tried this, but I have used cgi scripts that return multiple instances of the same variable name. These are ancient scripts that date well before the perl CGI modules so I'm parsing the input myself. I create two perl variables for each name on the input, a scalar that contains the last setting, and an array containing all entries. I've hacked getopt.pl to do the same thing with $opt_? and @opt_? which I did originally for a front-end to groff where multiple -r options are common. There are places where having an array of variables is useful. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ It is necessary for the welfare of society that genius should be privileged to utter sedition, to blaspheme, to outrage good taste, to corrupt the youthful mind, and generally to scandalize one's uncles. -- George Bernard Shaw - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From lorraine at nw.saic.com Tue May 16 15:31:24 2000 From: lorraine at nw.saic.com (Lorraine Johnson) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: cgi method popup_menu Message-ID: <3.0.32.20000516133123.00927630@zephyr.nw.saic.com> Bill, I'm sorry, but I haven't been using Perl long, and so I'm not sure I follow what you are saying. If you have two instances of the same variable *name* (say, $myvar and @myvar) they're still not the same *variable*. I think Joe is (sort-of) writing to the same *variable* with the repeated calls to popup_menu. (Corrections gladly accepted!) I recently replaced a Unix Web server with an NT box and needed to either translate some old C CGI into Windows (ack!) or learn another language. I went with Perl since there is so much information available. I've been working with the CGI.pm module as it is highly recommended and easy to use. No regrets so far! The module has a feature where the form elements are "sticky" (Stein's word) so that they are remembered from one invocation to the next (sounds odd, but it works). It seems to me that Joe's difficulty is an unexpected side effect of this feature. But there's a method in the madness. With the sticky form elements, you can validate a user's input and, if anything's missing, redisplay the (partially-filled-out) form and prompt for the missing info without the awkwardness of saying "use your back button and fix x, y, or z." It also enables you to do multi-page forms, where a subsequent form presented to the user may depend on earlier input (see http://www.wiley.com/compbooks/stein/source.html "loan.pl: Multi-page questionnaire (listing 2.3, page 70)"). Lorraine At 11:21 AM 5/16/00 -0700, Bill Campbell wrote: >I haven't tried this, but I have used cgi scripts that return multiple >instances of the same variable name. These are ancient scripts that date >well before the perl CGI modules so I'm parsing the input myself. I create >two perl variables for each name on the input, a scalar that contains the >last setting, and an array containing all entries. I've hacked getopt.pl >to do the same thing with $opt_? and @opt_? which I did originally for a >front-end to groff where multiple -r options are common. > >There are places where having an array of variables is useful. ................................... J. Lorraine Johnson SAIC/Sea Technology lorraine@nw.saic.com v: (425) 482-3316 f: (425) 485-5566 http://www.nw.saic.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From B.Ingerson at epixtech.com Tue May 16 17:16:04 2000 From: B.Ingerson at epixtech.com (B.Ingerson@epixtech.com) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: cgi method popup_menu Message-ID: FYI, popup_menu(-name=>'foo', -values => \@foo, -override => 'force', ) This will override the sticky pop-up feature. Brian lorraine@nw.saic.com (Lorraine Johnson)@pm.org on 05/16/2000 01:31:24 PM Sent by: owner-spug-list@pm.org To: spug-list@pm.org cc: Subject: Re: SPUG: cgi method popup_menu Bill, I'm sorry, but I haven't been using Perl long, and so I'm not sure I follow what you are saying. If you have two instances of the same variable *name* (say, $myvar and @myvar) they're still not the same *variable*. I think Joe is (sort-of) writing to the same *variable* with the repeated calls to popup_menu. (Corrections gladly accepted!) I recently replaced a Unix Web server with an NT box and needed to either translate some old C CGI into Windows (ack!) or learn another language. I went with Perl since there is so much information available. I've been working with the CGI.pm module as it is highly recommended and easy to use. No regrets so far! The module has a feature where the form elements are "sticky" (Stein's word) so that they are remembered from one invocation to the next (sounds odd, but it works). It seems to me that Joe's difficulty is an unexpected side effect of this feature. But there's a method in the madness. With the sticky form elements, you can validate a user's input and, if anything's missing, redisplay the (partially-filled-out) form and prompt for the missing info without the awkwardness of saying "use your back button and fix x, y, or z." It also enables you to do multi-page forms, where a subsequent form presented to the user may depend on earlier input (see http://www.wiley.com/compbooks/stein/source.html "loan.pl: Multi-page questionnaire (listing 2.3, page 70)"). Lorraine At 11:21 AM 5/16/00 -0700, Bill Campbell wrote: >I haven't tried this, but I have used cgi scripts that return multiple >instances of the same variable name. These are ancient scripts that date >well before the perl CGI modules so I'm parsing the input myself. I create >two perl variables for each name on the input, a scalar that contains the >last setting, and an array containing all entries. I've hacked getopt.pl >to do the same thing with $opt_? and @opt_? which I did originally for a >front-end to groff where multiple -r options are common. > >There are places where having an array of variables is useful. ................................... J. Lorraine Johnson SAIC/Sea Technology lorraine@nw.saic.com v: (425) 482-3316 f: (425) 485-5566 http://www.nw.saic.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From chris at smalldognet.com Wed May 17 11:57:55 2000 From: chris at smalldognet.com (Chris Sutton) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Support Network Message-ID: <3922CF93.8C40E40A@smalldognet.com> Hello all, I've been a lurker here for several months now (I even managed to lurk at one meeting so far) and some things have come up in my work as a lone Perl developer that maybe others in the community have dealt with before. Anyway, I've been hacking away here for about 2 years and have evolved to the point where I am using the following for all of my projects. Linux Apache mod_perl Postgres These "tools" have been great for all of the small and medium sized projects I have done and are practical for those clients who can't afford to pay for an Oracle license (plus I don't know Oracle). So far they have also seemed to scale and perform very well. The problem I'm running into is that because I'm using these "non Microsoft/shrinkwrapped" tools, and that I'm the only one who "knows how it all work", and if I get hit by a bus or decided that computers are not my game anymore and I move to Idaho to become a farmer, that they will be SOL in a big way. I've tried to assure my clients that these are very common tools and that there are lots of people out there that along with the proper documentation during development could come on board and take over a project. Of course these people exists, but clients feel better if they have names.. So, I was thinking yesterday, there has to be a bunch (or at least some) people in the Seattle area who are using the same tools that I am, and are running into the same problems. We could band together, use each other as resources, references, learn from each other, and try and overthrow the IIS,ASP,MS SQL monster that seems to be growing out of control. Seriously though, are there others out there like me that would be interested in something like this? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Thu May 18 00:57:18 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: elecommuting Perl Job Message-ID: <20000517225718.A9046@timji.consultix.wa.com> This one is missing a few desirable details, but what the hell, I've got a large queue of delayed job postings, so here it comes! -Tim The company is called TIAS.com. They are the leading 'fixed price' and 'largest' antique and collectible mall on the internet. They have a good stock option package. The salary is dependent upon experience, the TIAS.com is using Administaff.com to staff its personnel. There are three Perl positions open. Each of them will be programming in a Unix/Linux environment, using mySQL, Apache, and miscellaneous eCommerce packages (TBD). Candidates must be self motivated & able to work in a virtual team environment. Each project has a vertical flavor. That is, the engineer will have to be responsible for all aspects of the project from design until it is released. Then possibly until the code becomes stable enough to allow for customer service personal to use the code. The company is looking for a couple of years of experience in Perl, mySQL, CGI, HTML, some Javascripting as required. Some traveling to Houston is required about every three to six months for engineering reviews. The working at home position requires that the candidate have an office and high speed connection at home. The company currently does not have a central knowledge base. (I simply do lots of reading on the internet, or email/phone someone else on the project.) If you like, you can send them to me @ kldavis40@home.com for me to pre-screen before routing them to the lead engineer. I was in Houston for the review, which is the reason why I missed Perl class this last Monday. The company is doing something just a little different than eBay, but close to the same thing, only not in an auction format. These are really cool jobs. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Thu May 18 08:43:15 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: Perl Job, Lk Oswego OR, E-commerce, Data Appliances Message-ID: <20000518064315.A9900@timji.consultix.wa.com> Required Skills? Team player, Perl, OOP, DBI + SQL, Dynamic web content (CGI), Unix, SCM (Perforce), and Apache Duration? Position is permanent with excellent insurance and stock options. Tax Reporting Status: W-2 Location? Lake Oswego, Oregon Telecommuting? No, onsite necessary. Teamwork vital. Product/Service? Qsent is developing eCommerce technology and solutions for the wireless data appliance market. This includes wireless PDAs (Palm VII & such), plus web enabled cell phones (WAP/WML/HDML devices). Background Qsent is fully funded and growing fast, aiming to be on the leading edge of the wireless web market in the US. Our current tight and hard working team needs to grow, and we're looking for hot Perl people who get just as much thrill working with a great team as they do making a cool regex sit up and do tricks. Don't worry, the team will recognize and appreciate your regex trick too as long as it's not an obfuscation prize candidate :^) If you like what you see here, and love to play with cool wireless toys, contact me with a resume. Tim Holt Qsent tim.holt@qsent.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From lorraine at nw.saic.com Thu May 18 11:08:36 2000 From: lorraine at nw.saic.com (Lorraine Johnson) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: cgi method popup_menu Message-ID: <3.0.32.20000518090836.0090e260@zephyr.nw.saic.com> Howdy, I've been experimenting and reading a bit and I think I know what the problem is. The popup_menu method (and the other form elements) don't make assignments to the CGI query object, they just put together the html to write out. Once the user clicks the submit button, the browser encodes the form results which are parsed by CGI.pm. If I am following the method call path correctly (new, init, parse_params, add_parameter?), the choices are added to the parameter list with a push, not an assignment. So, naturally, if you have a second form element with the same name, you get the union of both lists. The -override attribute of the popup_menu method doesn't reset the parameters (since it's not an assignment method). Normally, on a re-display of the form element, any user selection is displayed. The -override attribute ensures that the default is displayed, instead. (See Stein, "Official Guide to Programming with CGI.pm," pp 246-7.) Hope this helps, Lorraine ................................... J. Lorraine Johnson SAIC/Sea Technology lorraine@nw.saic.com v: (425) 482-3316 f: (425) 485-5566 http://www.nw.saic.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From axhard2 at uswest.com Thu May 18 13:14:10 2000 From: axhard2 at uswest.com (Alyssa Harding) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: 'my' question :) Message-ID: <392432F2.530B2CAE@uswest.com> I encountered something wierd yesterday and I wonder if someone could explain why this happens. I had a script which was doing something like this: #!/usr/bin/perl -w ... foreach $pair (@pairs){ ($name, $value) = split(/&/, $buffer); $hash{$name} = $value; } ... This got me a nice hash with values and everything. Okay, not too complicated or anything, but it wasn't using strict (and it had no reason for not doing so). So I changed it to use strict; #!/usr/bin/perl -w use strict; ... my %hash; foreach my $pair( @pairs ){ my($name, $value) = split(/&/, $buffer ); $hash{$name} = $value; } The resulting hash gets only one key/value pair - $pairs[0] - and nothing else. Can someone please explain why this happens? Shouldn't it work just as well? I changed it to: #!/usr/bin/perl use strict; ... my(%hash, $pair); foreach $pair( @pairs ){ etc. etc. } and it worked just fine. A. -- Alyssa W. Harding Web Programmer U S WEST Creative Services phon: (206) 345-4073 cell: (206) 769-8735 ------------------------------------------------------------------- People who didn't need people needed people around to know that they were the kind of people who didn't need people. -- (Terry Pratchett, Maskerade) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From axhard2 at uswest.com Thu May 18 15:21:33 2000 From: axhard2 at uswest.com (Alyssa Harding) Date: Wed Aug 4 00:07:18 2004 Subject: [Fwd: SPUG: 'my' question :)] Message-ID: <392450CD.11AE9B9C@uswest.com> Sorry, that was a typo on my part, I did mean to split( /&/, $pair ) A. Damian Conway wrote: > > > foreach $pair (@pairs){ > > ($name, $value) = split(/&/, $buffer); > > $hash{$name} = $value; > > } > > Unless you're doing something very tricky, no matter how any pairs are > in @pair, this is always going to split $buffer and assign the same > thing to $hash{$name} each time. > > Are you sure the loop only executes once and not multiple times with one > effect? > > Or did you mean: > > foreach $pair (@pairs){ > ($name, $value) = split(/&/, $pair); > $hash{$name} = $value; > } > > I'd like to help, but I need to understand first. :-) > > BTW, I get no difference between the my'd and unmy'd versions under > 5.00503 under Unix. > > Damian -- Alyssa W. Harding Web Programmer U S WEST Creative Services phon: (206) 345-4073 cell: (206) 769-8735 ------------------------------------------------------------------- Racism was not a problem on the Discworld, because -- what with trolls and dwarfs and so on -- speciesism was more interesting. Black and white lived in perfect harmony and ganged up on green. -- (Terry Pratchett, Witches Abroad) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From andy at n2h2.com Thu May 18 15:29:31 2000 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:07:18 2004 Subject: [Fwd: SPUG: 'my' question :)] In-Reply-To: <392450CD.11AE9B9C@uswest.com> Message-ID: Damian Conway wrote: > > BTW, I get no difference between the my'd and unmy'd versions under > 5.00503 under Unix. See? I told you he didn't just use Perl on a Macintosh. So there. ;) (or might that be "Unix" on a Macintosh? Hmmmm.) -- Andrew Sweger | N2H2, Incorporated Systems Architect | 900 Fourth Avenue, Suite 3400 Advanced Technologies Division | Seattle WA 98164-1059 v=206.336.2947 f=206.336.1541 | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From axhard2 at uswest.com Thu May 18 15:39:46 2000 From: axhard2 at uswest.com (Alyssa Harding) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: re: 'my' question Message-ID: <39245512.F946471F@uswest.com> Okay, sorry, there was a typo in there, I was trying to split $pair, not $buffer in the first foreach loop, the quoted text below is now correct. A. Alyssa Harding wrote: > > I encountered something wierd yesterday and I wonder if someone > could explain why this happens. > > I had a script which was doing something like this: > #!/usr/bin/perl -w > > ... > > foreach $pair (@pairs){ > ($name, $value) = split(/&/, $pair); > $hash{$name} = $value; > } > > ... > This got me a nice hash with values and everything. > > Okay, not too complicated or anything, but it wasn't using strict > (and it had no reason for not doing so). So I changed it to use > strict; > > #!/usr/bin/perl -w > > use strict; > > ... > my %hash; > foreach my $pair( @pairs ){ > my($name, $value) = split(/&/, $pair); > $hash{$name} = $value; > } > > > The resulting hash gets only one key/value pair - $pairs[0] - and > nothing else. > Can someone please explain why this happens? Shouldn't it work > just as well? > > I changed it to: > > #!/usr/bin/perl > > use strict; > ... > my(%hash, $pair); > foreach $pair( @pairs ){ > etc. etc. > } > > and it worked just fine. > > A. > -- > Alyssa W. Harding > Web Programmer > U S WEST Creative Services > phon: (206) 345-4073 > cell: (206) 769-8735 > ------------------------------------------------------------------- > People who didn't need people needed people around to know that they > were > the kind of people who didn't need people. > -- (Terry Pratchett, Maskerade) > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address -- Alyssa W. Harding Web Programmer U S WEST Creative Services phon: (206) 345-4073 cell: (206) 769-8735 ------------------------------------------------------------------- Shadwell hated all southerners and, by inference, was standing at the North Pole. -- (Terry Pratchett & Neil Gaiman, Good Omens) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From damian at cs.monash.edu.au Thu May 18 16:51:50 2000 From: damian at cs.monash.edu.au (Damian Conway) Date: Wed Aug 4 00:07:18 2004 Subject: [Fwd: SPUG: 'my' question :)] Message-ID: <200005182151.HAA17456@indy05.csse.monash.edu.au> > > BTW, I get no difference between the my'd and unmy'd versions under > > 5.00503 under Unix. > > See? I told you he didn't just use Perl on a Macintosh. So there. ;) Had no choice in this case. MacPerl is still 5.004 and doesn't support lexical 'for' iterators. > (or might that be "Unix" on a Macintosh? Hmmmm.) No. On my trusty SGI Indy. :-) Damian - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From PFarrall at getthere.com Thu May 18 17:54:14 2000 From: PFarrall at getthere.com (Paul Farrall) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: re: 'my' question Message-ID: <7B9018C6292CD311A6550090274F3C5B024D752F@hq-mail1.getthere.com> This works fine on my machine ( v5.6.0 built for sun4-solaris). Perhaps there is something in the '...' section that makes @pairs not what you think it is? Paul Farrall --- #!/usr/local/bin/perl -w use strict; my @pairs = ( "a&b", "c&d", "e&f"); my %hash; foreach my $pair( @pairs ){ my($name, $value) = split(/&/, $pair ); $hash{$name} = $value; } foreach (keys %hash) { print "$_: $hash{$_}\n"; } --- $ ./s.pl a: b c: d e: f --- -----Original Message----- From: Alyssa Harding [mailto:axhard2@uswest.com] Sent: Thursday, May 18, 2000 1:40 PM To: SPUG Subject: SPUG: re: 'my' question Okay, sorry, there was a typo in there, I was trying to split $pair, not $buffer in the first foreach loop, the quoted text below is now correct. A. Alyssa Harding wrote: > > I encountered something wierd yesterday and I wonder if someone > could explain why this happens. > > I had a script which was doing something like this: > #!/usr/bin/perl -w > > ... > > foreach $pair (@pairs){ > ($name, $value) = split(/&/, $pair); > $hash{$name} = $value; > } > > ... > This got me a nice hash with values and everything. > > Okay, not too complicated or anything, but it wasn't using strict > (and it had no reason for not doing so). So I changed it to use > strict; > > #!/usr/bin/perl -w > > use strict; > > ... > my %hash; > foreach my $pair( @pairs ){ > my($name, $value) = split(/&/, $pair); > $hash{$name} = $value; > } > > > The resulting hash gets only one key/value pair - $pairs[0] - and > nothing else. > Can someone please explain why this happens? Shouldn't it work > just as well? > > I changed it to: > > #!/usr/bin/perl > > use strict; > ... > my(%hash, $pair); > foreach $pair( @pairs ){ > etc. etc. > } > > and it worked just fine. > > A. > -- > Alyssa W. Harding > Web Programmer > U S WEST Creative Services > phon: (206) 345-4073 > cell: (206) 769-8735 > ------------------------------------------------------------------- > People who didn't need people needed people around to know that they > were > the kind of people who didn't need people. > -- (Terry Pratchett, Maskerade) > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address -- Alyssa W. Harding Web Programmer U S WEST Creative Services phon: (206) 345-4073 cell: (206) 769-8735 ------------------------------------------------------------------- Shadwell hated all southerners and, by inference, was standing at the North Pole. -- (Terry Pratchett & Neil Gaiman, Good Omens) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From cmeyer at helvella.org Thu May 18 20:12:05 2000 From: cmeyer at helvella.org (Colin Meyer) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: April DBI talk html is available In-Reply-To: <20000512014650.55002.qmail@hotmail.com> References: <20000512014650.55002.qmail@hotmail.com> Message-ID: <20000518181205.H27081@hobart.helvella.org> Just wanted to let you know that the notes from my dbi talk (summer 98) are still available: http://www.zipcon.net/~cmeyer/intro_dbi/ -C. p.s. the sample programming isn't running anymore...it seems that one of the modules can't be loaded. My isp prolly upgraded perl w/o me noticing... I might fix it if I get a chance. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From axhard2 at uswest.com Fri May 19 13:34:00 2000 From: axhard2 at uswest.com (Alyssa Harding) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: re: 'my' question References: <39245512.F946471F@uswest.com> <39246897.D5394F5E@unforgettable.com> Message-ID: <39258918.68965BCC@uswest.com> I am quite sure it was changing the script to strict that caused the problem with the 'my $pair(@pairs)'. I found out the OS and stuff. It was FreeBSD, Perl 5.005_03 on Apache. I'm glad I wasn't crazy when I was thinking that should work - don't know why it didn't but thank goodness TMTOWTDI! A. Adrian Hands wrote: > > Are you sure ? This seems to give the expected result: > > #!/usr/bin/perl -w > > use strict; > > my @pairs = qw{ one&uno two&dos three&tres }; > > #... > my %hash; > foreach my $pair( @pairs ){ > my($name, $value) = split(/&/, $pair); > $hash{$name} = $value; > } > > use Data::Dumper; > print Dumper(\%hash); > > $ ./foo.pl > $VAR1 = { > 'three' => 'tres', > 'two' => 'dos', > 'one' => 'uno' > }; > $ > > Alyssa Harding wrote: > > > > Okay, sorry, there was a typo in there, I was trying to split $pair, > > not $buffer in the first foreach loop, the quoted text below is now > > correct. > > > > A. > > > > Alyssa Harding wrote: > > > > > > I encountered something wierd yesterday and I wonder if someone > > > could explain why this happens. > > > > > > I had a script which was doing something like this: > > > #!/usr/bin/perl -w > > > > > > ... > > > > > > foreach $pair (@pairs){ > > > ($name, $value) = split(/&/, $pair); > > > $hash{$name} = $value; > > > } > > > > > > ... > > > This got me a nice hash with values and everything. > > > > > > Okay, not too complicated or anything, but it wasn't using strict > > > (and it had no reason for not doing so). So I changed it to use > > > strict; > > > > > > #!/usr/bin/perl -w > > > > > > use strict; > > > > > > ... > > > my %hash; > > > foreach my $pair( @pairs ){ > > > my($name, $value) = split(/&/, $pair); > > > $hash{$name} = $value; > > > } > > > > > > > > > The resulting hash gets only one key/value pair - $pairs[0] - and > > > nothing else. > > > Can someone please explain why this happens? Shouldn't it work > > > just as well? > > > > > > I changed it to: > > > > > > #!/usr/bin/perl > > > > > > use strict; > > > ... > > > my(%hash, $pair); > > > foreach $pair( @pairs ){ > > > etc. etc. > > > } > > > > > > and it worked just fine. > > > > > > A. > > > -- > > > Alyssa W. Harding > > > Web Programmer > > > U S WEST Creative Services > > > phon: (206) 345-4073 > > > cell: (206) 769-8735 > > > ------------------------------------------------------------------- > > > People who didn't need people needed people around to know that they > > > were > > > the kind of people who didn't need people. > > > -- (Terry Pratchett, Maskerade) > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > > > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > > > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > > > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > > > -- > > Alyssa W. Harding > > Web Programmer > > U S WEST Creative Services > > phon: (206) 345-4073 > > cell: (206) 769-8735 > > ------------------------------------------------------------------- > > Shadwell hated all southerners and, by inference, was standing at > > the > > North Pole. > > -- (Terry Pratchett & Neil Gaiman, Good Omens) > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address -- Alyssa W. Harding Web Programmer U S WEST Creative Services phon: (206) 345-4073 cell: (206) 769-8735 ------------------------------------------------------------------- It was the sort of thing you expected in the Street of Alchemists. The neighbours *preferred* explosions, which were at least identifiable and soon over. They were better than the smells, which crept up on you. -- (Terry Pratchett, Moving Pictures) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From goldov at sounddomain.com Mon May 22 22:46:05 2000 From: goldov at sounddomain.com (Kim Goldov) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: PERL5LIB is tainted Message-ID: I have set up a test Apache server for doing development on 2 of our web sites. One of the sites uses "require ..." statements to pull in library functions. The library directories are pushed onto the @INC path in each CGI script. However, our development machine has the libraries in a different location since I am hosting two sites. As a workaround, I decided to set PERL5LIB to the test library location in the httpsd.conf file using the Apache directive, SetEnv. This works to set the PERL5LIB variable, however with taint checking active in the scripts, the PERL5LIB variable is ignored (doesn't produce a taint violation) and does not affect the @INC path. Is there some way I can launder PERL5LIB before perl tries to add it to the @INC path, or must I try a different approach to solve my problem? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From torin at daft.com Tue May 23 03:20:49 2000 From: torin at daft.com (Darren/Torin/Who Ever...) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: PERL5LIB is tainted In-Reply-To: "Kim Goldov"'s message of "Mon, 22 May 2000 20:46:05 -0700" References: Message-ID: <874s7pd6e6.fsf@perv.daft.com> Kim Goldov, in an immanent manifestation of deity, wrote: >As a workaround, I decided to set PERL5LIB to the test library location in >the httpsd.conf file using the Apache directive, SetEnv. This works to set >the PERL5LIB variable, however with taint checking active in the scripts, >the PERL5LIB variable is ignored (doesn't produce a taint violation) and >does not affect the @INC path. Is there some way I can launder PERL5LIB >before perl tries to add it to the @INC path, or must I try a different >approach to solve my problem? There is no way to launder PERL5LIB before Perl tries to add it to the @INC path. Something that occurred to me as I read this though. Warning: I didn't test this all together although I've done each of the parts at different times. 1) Create two files, Dev_Host1.pm and Dev_Host2.pm Dev_Host1.pl: use lib "/usr/local/path-to-first-host-require-dir"; Dev_Host2.pl: use lib "/usr/local/path-to-second-host-require-dir"; Inside your apache configuration files: PerlRequire Dev_Host1.pl PerlRequire Dev_Host2.pl Then start up apache with either: $ apache -DDEV_HOST1 or $ apache -DDEV_HOST2 as appropriate. This should handle the taint just fine. Darren -- Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996 @ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @ @ Make a little hot-tub in your soul. @ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From goldov at sounddomain.com Tue May 23 10:45:58 2000 From: goldov at sounddomain.com (Kim Goldov) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: PERL5LIB is tainted In-Reply-To: <874s7pd6e6.fsf@perv.daft.com> Message-ID: This sounded like a good approach. Unfortunately, it appears that the perl interpreter that handles the "PerlRequire" in the Apache conf file terminates before perl is again started to interpret the CGI script. I was not able to affect the @INC array and I also was unable to set a global variable for use in the CGI script. -----Original Message----- From: Darren/Torin/Who Ever... [mailto:torin@daft.com] Sent: Tuesday, May 23, 2000 1:21 AM To: Kim Goldov Cc: spug-list@pm.org; Jonathan Gardner; Alex Algard Subject: Re: SPUG: PERL5LIB is tainted Kim Goldov, in an immanent manifestation of deity, wrote: >As a workaround, I decided to set PERL5LIB to the test library location in >the httpsd.conf file using the Apache directive, SetEnv. This works to set >the PERL5LIB variable, however with taint checking active in the scripts, >the PERL5LIB variable is ignored (doesn't produce a taint violation) and >does not affect the @INC path. Is there some way I can launder PERL5LIB >before perl tries to add it to the @INC path, or must I try a different >approach to solve my problem? There is no way to launder PERL5LIB before Perl tries to add it to the @INC path. Something that occurred to me as I read this though. Warning: I didn't test this all together although I've done each of the parts at different times. 1) Create two files, Dev_Host1.pm and Dev_Host2.pm Dev_Host1.pl: use lib "/usr/local/path-to-first-host-require-dir"; Dev_Host2.pl: use lib "/usr/local/path-to-second-host-require-dir"; Inside your apache configuration files: PerlRequire Dev_Host1.pl PerlRequire Dev_Host2.pl Then start up apache with either: $ apache -DDEV_HOST1 or $ apache -DDEV_HOST2 as appropriate. This should handle the taint just fine. Darren -- Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996 @ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @ @ Make a little hot-tub in your soul. @ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From andy at n2h2.com Tue May 23 11:11:56 2000 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:07:18 2004 Subject: SPUG: PERL5LIB is tainted In-Reply-To: Message-ID: Darren's example would be specific to mod_perl and CGI scripts run within Apache::Registry (again, under mod_perl). mod_perl provides the persistent interpreter environment. On May 23, 2000 @ 8:45am, Kim Goldov wrote: > This sounded like a good approach. Unfortunately, it appears that the perl > interpreter that handles the "PerlRequire" in the Apache conf file > terminates before perl is again started to interpret the CGI script. I was > not able to affect the @INC array and I also was unable to set a global > variable for use in the CGI script. -- Andrew Sweger | N2H2, Incorporated Systems Architect | 900 Fourth Avenue, Suite 3400 Advanced Technologies Division | Seattle WA 98164-1059 v=206.336.2947 f=206.336.1541 | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From axhard2 at uswest.com Tue May 23 13:56:41 2000 From: axhard2 at uswest.com (Alyssa Harding) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Calling all LDAP gurus Message-ID: <392AD469.C40B3074@uswest.com> I'm having a problem doing a search on our company's corporate LDAP and I need some help! My goal is this. I have a fairly large table from an existing database and I need to verify some of the entries against those in the corporate LDAP. I have no problems with DBI, getting the records from the existing database out, the problem is the LDAP search. Here's some code - $LDAP_host and $LDAP_port are defined correctly, I'll just skip that part: ... use Net::LDAP; use strict; my $ldap = Net::LDAP->new( $LDAP_host, port => $LDAP_port) or print "Couldn't create LDAP connection $!
\n"; $ldap->bind or print "Couldn't bind successfully $!
\n"; my $mesg = $ldap->search( base => 'c=uswest.com,ou=People', filter => '(uid=axhard2)', attrs => [ 'cn', 'mail', 'st' ] ) or print "Problem with search $!
"; ... Okay, now I know that when the search comes back, it's a Net::LDAP::Search object. I also know that, were the search successful, I would be able to get entries out of the object using entry() and be able to find out how many entries there are using count(). I have verified that the uid value above (my own uid) works correctly when I query the corporate LDAP through the web server they have set up, and the three attributes do indeed exist for all records (not just mine). The problem is, I don't get any results back. The search object returned looks like this after the $ldap->search() above: $VAR1 = bless( { 'matchedDN' => '', 'mesgid' => 2, 'resultCode' => 32, 'parent' => bless( { 'net_ldap_resp' => {}, 'net_ldap_mesg' => {}, 'net_ldap_async' => '0', 'net_ldap_version' => 2, 'net_ldap_host' => 'ldap.uswc.uswest.com', 'net_ldap_debug' => '0', 'net_ldap_socket' => bless( \*Symbol::GEN0, 'IO::Socket::INET' ) }, 'Net::LDAP' ), 'callback' => undef, 'errorMessage' => '' }, 'Net::LDAP::Search' ); No entries, no error messages, nothin' :( Can someone please help? A. -- Alyssa W. Harding Web Programmer U S WEST Creative Services phon: (206) 345-4073 cell: (206) 769-8735 ------------------------------------------------------------------- He had a unique stride: it looked as though his body was being dragged forward and his legs had to flail around underneath it, landing wherever they could find room. It wasn't so much a walk as a collapse, indefinitely postponed. -- (Terry Pratchett, Maskerade) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From axhard2 at uswest.com Tue May 23 18:31:30 2000 From: axhard2 at uswest.com (Alyssa Harding) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Calling all LDAP gurus Message-ID: <392B14D2.A97DA458@uswest.com> Okay, I figured out the problem :) I had the base wrong in the search parameters. It should have been base => 'o=uswest.com' Thanks anyway! A. Alyssa Harding wrote: > > I'm having a problem doing a search on our company's corporate LDAP > and I need some help! > > My goal is this. I have a fairly large table from an existing > database and I need to verify some of the entries against those in > the corporate LDAP. I have no problems with DBI, getting the > records from the existing database out, the problem is the LDAP > search. > > Here's some code - $LDAP_host and $LDAP_port are defined correctly, > I'll just skip that part: > ... > use Net::LDAP; > use strict; > > my $ldap = Net::LDAP->new( $LDAP_host, port => $LDAP_port) or > print "Couldn't create LDAP connection $!
\n"; > > $ldap->bind or print "Couldn't bind successfully $!
\n"; > > my $mesg = $ldap->search( base => 'c=uswest.com,ou=People', > filter => '(uid=axhard2)', > attrs => [ 'cn', 'mail', 'st' ] > ) or print "Problem with search $!
"; > > ... > > Okay, now I know that when the search comes back, it's a > Net::LDAP::Search object. I also know that, were the search > successful, I would be able to get entries out of the object using > entry() and be able to find out how many entries there are using > count(). > > I have verified that the uid value above (my own uid) works > correctly when I query the corporate LDAP through the web server > they have set up, and the three attributes do indeed exist for all > records (not just mine). > > The problem is, I don't get any results back. The search object > returned looks like this after the $ldap->search() above: > > $VAR1 = bless( { > 'matchedDN' => '', > 'mesgid' => 2, > 'resultCode' => 32, > 'parent' => bless( { > 'net_ldap_resp' => {}, > 'net_ldap_mesg' => {}, > 'net_ldap_async' => '0', > 'net_ldap_version' => 2, > 'net_ldap_host' => > 'ldap.uswc.uswest.com', > 'net_ldap_debug' => '0', > 'net_ldap_socket' => bless( > \*Symbol::GEN0, 'IO::Socket::INET' ) > }, 'Net::LDAP' ), > 'callback' => undef, > 'errorMessage' => '' > }, 'Net::LDAP::Search' ); > > No entries, no error messages, nothin' :( > > Can someone please help? > > A. > -- > Alyssa W. Harding > Web Programmer > U S WEST Creative Services > phon: (206) 345-4073 > cell: (206) 769-8735 > ------------------------------------------------------------------- > He had a unique stride: it looked as though his body was being > dragged > forward and his legs had to flail around underneath it, landing > wherever > they could find room. It wasn't so much a walk as a collapse, > indefinitely > postponed. > -- (Terry Pratchett, Maskerade) > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address -- Alyssa W. Harding Web Programmer U S WEST Creative Services phon: (206) 345-4073 cell: (206) 769-8735 ------------------------------------------------------------------- "Luck is my middle name," said Rincewind, indistinctly. "Mind you, my first name is Bad." -- (Terry Pratchett, Interesting Times) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From smorton at pobox.com Tue May 23 19:31:52 2000 From: smorton at pobox.com (Sanford Morton) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Choosing an object's method at runtime Message-ID: <14635.8952.270344.893481@evrtwa1-ar4-128-245.dsl.gtei.net> I'm feeling particularly dense today. I want to choose an object's method at run time: $object = new Some_Class; $method = 'stop'; But then $object->$method; gets a syntax error, whereas $object->$method(); seems not to. Does anyone know which man page covers this? I'm clueless. I need more sleep. --Sandy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From bill at celestial.com Wed May 24 00:19:33 2000 From: bill at celestial.com (Bill Campbell) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Choosing an object's method at runtime In-Reply-To: <14635.8952.270344.893481@evrtwa1-ar4-128-245.dsl.gtei.net>; from smorton@pobox.com on Tue, May 23, 2000 at 05:31:52PM -0700 References: <14635.8952.270344.893481@evrtwa1-ar4-128-245.dsl.gtei.net> Message-ID: <20000523221933.A20875@kstarr.celestial.com> Without looking deeper into this I would suggest using ``eval'' on the method to determine whether it's valid or not without terminating the program if it isn't. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ Government spending? I don't know what it's all about. I don't know any more about this thing than an economist does, and, God knows, he doesn't know much. -- Will Rogers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From rerwin at ricochet.net Wed May 24 11:01:05 2000 From: rerwin at ricochet.net (Ryan Erwin) Date: Wed Aug 4 00:07:19 2004 Subject: ESPUG::Meeting::Tonight->topic = 'Open Forum' Message-ID: <001b01bfc599$46943750$7792bfce@Inspiron> e?SPUGers- It's time once again for another ESPUG meeting. Tonight, we will be having an open forum. In case you have never attended, ESPUG is completely free of monetary charges and open to anyone interested in Perl. Tonight, I just ask that you bring one perl related question or comment that you are comfortable sharing during the meeting. Some discussion topics that other espuggers have already mentioned include "How Perl works internally" (perlguts) and "Perl & MySQL" (DBI/DBD::mysql). Thanks to David Patterson, the meeting space is provided at Lucent Technologies in Redmond. Lucent Technologies 6464 185th Ave NE Redmond, WA 98052 Take 520 East to Redmond-Fall City Road (last exit before end of 520 freeway) Go Right on "Redmond-Fall City Road" (east) Straight through 2 lights then left on 185th Ave (halfway up hill, hard left) Go one short block to the top of the hill and the Lucent Technologies logo will be plainly visible above the main entrance of the building (to the right) If you get to the Fire Station, you have gone a bit too far. Doors open at 6:45 and the meeting starts at 7:00. After the meeting, we travel down to the Red Robin at the Redmond Towne Center for refreshments. See you there! Ryan Erwin ESPUG Emperor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From marty.d.cudmore at boeing.com Wed May 24 11:13:00 2000 From: marty.d.cudmore at boeing.com (Marty D. Cudmore) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Choosing an object's method at runtime Message-ID: <01BFC560.33771E00@winpooter.ca.boeing.com> Using the $obj->$meth() syntax is the ONLY way, I've ever gotten this to work. I'm not sure of a manpage, but the syntax is outlined on page 254 of the Camel under Symbolic References. Cheers, Marty ---------- From: Sanford Morton[SMTP:smorton@pobox.com] Sent: Tuesday, May 23, 2000 5:31 PM To: spug-list@pm.org Subject: SPUG: Choosing an object's method at runtime I'm feeling particularly dense today. I want to choose an object's method at run time: $object = new Some_Class; $method = 'stop'; But then $object->$method; gets a syntax error, whereas $object->$method(); seems not to. Does anyone know which man page covers this? I'm clueless. I need more sleep. --Sandy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From asherr at cs.unm.edu Wed May 24 11:52:39 2000 From: asherr at cs.unm.edu (Aryeh "Cody" Sherr) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Choosing an object's method at runtime In-Reply-To: <14635.8952.270344.893481@evrtwa1-ar4-128-245.dsl.gtei.net> Message-ID: man perlsub is what you are looking for ()s are only optional if the function is predeclared essentially, $foo->$func looks like a reference to a scalar. I *think* &$foo->$method should work (but pass $method your @_ array!), as well as $foo->$method(); These both make it unambiguous. hope this helps. cody On Tue, 23 May 2000, Sanford Morton wrote: >I'm feeling particularly dense today. I want to choose an object's >method at run time: > $object = new Some_Class; > $method = 'stop'; >But then > $object->$method; >gets a syntax error, whereas > $object->$method(); >seems not to. > >Does anyone know which man page covers this? I'm clueless. I need more >sleep. --Sandy > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From markyesme at home.com Wed May 24 14:27:39 2000 From: markyesme at home.com (Mark Lybrand) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Choosing an object's method at runtime References: <01BFC560.33771E00@winpooter.ca.boeing.com> Message-ID: <009e01bfc5b6$20318820$53ce1318@olmpi1.wa.home.com> You can also use the can method which returns a reference to the method if is available to a particular object. Mark :) ----- Original Message ----- From: "Marty D. Cudmore" To: ; "'Sanford Morton'" Sent: Wednesday, May 24, 2000 9:13 AM Subject: RE: SPUG: Choosing an object's method at runtime > Using the $obj->$meth() syntax is the ONLY way, I've ever gotten this to work. I'm not sure of a manpage, but the syntax is outlined on page 254 of the Camel under Symbolic References. > > Cheers, > > Marty > > > ---------- > From: Sanford Morton[SMTP:smorton@pobox.com] > Sent: Tuesday, May 23, 2000 5:31 PM > To: spug-list@pm.org > Subject: SPUG: Choosing an object's method at runtime > > I'm feeling particularly dense today. I want to choose an object's > method at run time: > $object = new Some_Class; > $method = 'stop'; > But then > $object->$method; > gets a syntax error, whereas > $object->$method(); > seems not to. > > Does anyone know which man page covers this? I'm clueless. I need more > sleep. --Sandy > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From torin at daft.com Thu May 25 01:41:49 2000 From: torin at daft.com (Darren/Torin/Who Ever...) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Calling all LDAP gurus In-Reply-To: Alyssa Harding's message of "Tue, 23 May 2000 23:31:30 +0000" References: <392B14D2.A97DA458@uswest.com> Message-ID: <87puqb872q.fsf@perv.daft.com> Alyssa Harding, in an immanent manifestation of deity, wrote: >Okay, I figured out the problem :) >I had the base wrong in the search parameters. It should have been > >base => 'o=uswest.com' >> my $mesg = $ldap->search( base => 'c=uswest.com,ou=People', Most likely, you'll still want to narrow it to the people. Your likely base is 'ou=People,o=uswest.com,c=US'. That's Organizational Unit = People, Organization = uswest.com Country = US (this is always uppercase) It would be unusual for the c=US to not be there. While possible, it'd be going against best common practice. It's always more specific to less specific in a dn or Distinguished Name in the same way that a domain name is structured. Darren -- Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996 @ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @ @ Make a little hot-tub in your soul. @ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From smorton at pobox.com Thu May 25 10:03:08 2000 From: smorton at pobox.com (Sanford Morton) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Choosing an object's method at runtime In-Reply-To: <009e01bfc5b6$20318820$53ce1318@olmpi1.wa.home.com> References: <01BFC560.33771E00@winpooter.ca.boeing.com> <009e01bfc5b6$20318820$53ce1318@olmpi1.wa.home.com> Message-ID: <14637.16556.10788.197743@evrtwa1-ar4-128-245.dsl.gtei.net> Thanks for the many helpful comments on runtime method choice. A natural followup question is: > I'm storing a list of methods in an array > > @methods = qw (go stop); > > which I'd like to call on an object which I know has those methods > > $p->$methods[0](); > > But this generates a syntax error, and I can't find a combination of > braces which doesn't. What does work is a temporary variable: > > $meth = $methods[0]; > $p->$meth(); Damian Conway wrote privately that Perl's lexer doesn't permit what I had wanted to do, since it requires a simple variable immediately followed by a parenthesis in this construct. A compact expression is $p->$_() for $methods[0]; Thanks again for all your comments. Sandy Morton - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From smorton at pobox.com Thu May 25 10:07:34 2000 From: smorton at pobox.com (Sanford Morton) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Damian Conway Hike Message-ID: <14637.16822.526382.74083@evrtwa1-ar4-128-245.dsl.gtei.net> Damian Conway and I are planning a day hike sometime between 1-3 July, depending on his schedule and perhaps the weather. SPUGers are invited to join us. Possible destination is Camp Muir on Mt Ranier, 4-6 hours up a snow field, though other suggestions are welcome. If you have an interest in joining us, please reply to me off the list. Sandy Morton - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From keith at photoworks.com Thu May 25 17:13:29 2000 From: keith at photoworks.com (Keith Aaron) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: How do I fix myself up? Message-ID: I'm a Perl neophyte, but things were working OK on my old PC the way it was set up. I've move applications to a new PC and want to use the same procedures I did before. I installed the newest ActivePerl release (ActivePerl-5.6.0.613.msi..msi) and the ppmfix for it. When I tried to execute the command below ... C:\WINNT\system32\cmd.exe /c ftpget.pl -g -C -d "filmworks:/acct/filmworks/BCS/BCS.BP/BCS.TRANS.IN" "C:/acct/filmworks/BCS/BCS.BP/BCS.TRANS.IN" ... I got an error which I don't remember (something about Net.pm), which seemed to indicate that I needed to install another module. I did "ppm install libnet", which seemed to work fine. I made the mistake of answering Yes to rebuilding the config, but I took all the defaults, which is what I assume it used on the initial install. When I try it again I get the following: C:\WINNT\system32\cmd.exe /c ftpget.pl -g -C -d "filmworks:/acct/filmworks/BCS/BCS.BP/BCS.TRANS.IN" "C:/acct/filmworks/BCS/BCS.BP/BCS.TRANS.IN" syntax error at C:/Perl/site/lib/Net/Config.pm line 86, near ">" Compilation failed in require at C:/Perl/site/lib/Net/FTP.pm line 21. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/FTP.pm line 21. Compilation failed in require at C:\VimLocal\bin\ftpget.pl line 29. BEGIN failed--compilation aborted at C:\VimLocal\bin\ftpget.pl line 29. 255 returned Hit any key to close this window... I haven't a clue where to go from here. Please help. -- Keith W. (Aaron) Roberts (206) 281-1390 x761 Vmail: x475 PhotoWorks, Inc. [formerly Seattle FilmWorks, Inc.] keith@photoworks.com Home: kaaron@worldnet.att.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20000525/3b829c24/attachment.htm From tim at consultix-inc.com Fri May 26 16:57:33 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Volunteer Web-site Work Message-ID: <20000526215733.B23013@timji.consultix.wa.com> From: Jason Omenn Subject: Cap & Gown Hi there, In addition to my existence in the internet world, I have spent a good chunk of my spare time for the last 1 1/2 years building a non-profit mentoring program called Cap & Gown. We are currently working with 6th graders at Denny Middle school in West Seattle and are affiliated with Big Brothers/Big Sisters of King County. Our hope is to grow the program to other schools in different parts of the city. In order to grow, we could benefit from having a platform for information exchange, both as a means to recruit new mentors and to promote events of programs in conjunction with Cap & Gown. I am looking for someone to put together a simple web site which one of my friends will then be able to augment once it is up. Anyone interested in donating their expertise and time can reach me at work (see below) or at home 206-323-2146. Thanks, Jason Omenn (877) 336-9527 x 8307 (206) 219-8307 direct jason@yachtworld.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From marlin at 3hats.com Fri May 26 20:01:27 2000 From: marlin at 3hats.com (marlin) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Procmail Message-ID: <392F1E67.AF65B2B9@3hats.com> Anybody out there know how to make Procmail pipe an imcoming email (with "inventory" as subject) to a Perl script? Here's what doesn't work... :0 * ^Subject:.*inventory | /path/to/script.pl Pseudo-Perl is like this... while (<>) { $msg .= $_; } process $msg; Thanks, Marlin -- 3 Hats Design INTERNET PRINT ILLUSTRATION 5201 15 Ave NW Suite 220 Seattle, WA 98107 206.784.1641 phone 206.784.2231 fax marlin@3hats.com http://www.3hats.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From andy at n2h2.com Fri May 26 19:59:24 2000 From: andy at n2h2.com (Andrew Sweger) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Procmail In-Reply-To: <392F1E67.AF65B2B9@3hats.com> Message-ID: Check your procmail log to see if the pattern is matching at all (is it calling the script). Then you can workout if the script is working correctly or not. Note that once the message is piped off to your perl script, it is considered delivered and no further processing of the original message is done in the procmail recipe (unless you set up some other settings in the recipe). Also, the output of the perl script is not considered by procmail for any processing (can't remember if there's an option to enable that, however). Otherwise, your recipe below should work as advertised. On May 26, 2000 @ 6:01pm, marlin wrote: > Anybody out there know how to make Procmail pipe an imcoming email > (with "inventory" as subject) to a Perl script? > > Here's what doesn't work... > > :0 > * ^Subject:.*inventory > | /path/to/script.pl > > Pseudo-Perl is like this... > > while (<>) { > $msg .= $_; > } > process $msg; -- Andrew Sweger | N2H2, Incorporated Systems Architect | 900 Fourth Avenue, Suite 3400 Advanced Technologies Division | Seattle WA 98164-1059 v=206.336.2947 f=206.336.1541 | http://www.n2h2.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From bill at celestial.com Sat May 27 10:02:01 2000 From: bill at celestial.com (Bill Campbell) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Procmail In-Reply-To: <392F1E67.AF65B2B9@3hats.com>; from marlin@3hats.com on Fri, May 26, 2000 at 06:01:27PM -0700 References: <392F1E67.AF65B2B9@3hats.com> Message-ID: <20000527080201.A3488@kstarr.celestial.com> On Fri, May 26, 2000 at 06:01:27PM -0700, marlin wrote: >Anybody out there know how to make Procmail pipe an imcoming email >(with "inventory" as subject) to a Perl script? I use deliver instead of procmail, and deliver will execute a perl script, $HOME/.deliver, (or any other language for that matter). I prefer this to procmail because (a) I don't have to learn yet another language, and (b) it gives me a lot more flexibility. Deliver reads the standard output of your script to determine what to do with the mail, and you can do anything you want. I use it to screen incoming messages for duplicates by maintaining a history database on message-id:, put mail in separate boxes, etc. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``We shouldn't elect a President; we should elect a magician.'' Will Rogers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From trey at anvils.org Mon May 29 12:11:51 2000 From: trey at anvils.org (Trey Valenta) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Procmail In-Reply-To: marlin "SPUG: Procmail" (May 26, 18:01) Message-ID: <20000529171151.9248.qmail@zipcon.net> On 2000 May 26, 18:01, marlin wrote: } Subject: SPUG: Procmail > Anybody out there know how to make Procmail pipe an imcoming email > (with "inventory" as subject) to a Perl script? > > Here's what doesn't work... > > :0 > * ^Subject:.*inventory > | /path/to/script.pl > > Pseudo-Perl is like this... > > while (<>) { > $msg .= $_; > } > process $msg; To start, you can put this in your .procmailrc file to get some logs. VERBOSE=on LOGFILE=$HOME/.proclog I think I've come across this before and fixed it by changing below to while () { I haven't delved into why <> doesn't work and what procmail does when opening filehandles. And then again, I could be wrong on the answer anyway. It's early and been a while since I ran into this. /trey -- trey valenta trey@anvils.org seattle (maybe a) random quote--v Love is a grave mental disease. -- Plato - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From marlin at 3hats.com Mon May 29 14:34:29 2000 From: marlin at 3hats.com (marlin) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Procmail References: Message-ID: <3932C644.A51C5484@3hats.com> Thanks to those who replied so far. Here is log entry when I send mail to the address in question... *************************** procmail: 1 at /home/pws_sales_inv/Procmail/grabdata.pl line 9, <> chunk 26. >From marlingreene@mindspring.com Mon May 29 11:44:25 2000 Subject: inventory Folder: /var/spool/mail/pws_sales_inv 1098 *************************** The ref to "line 9, <> chunk 26" is at the "while (<>)" statement in the Perl script. What seems to be happening is that the script hiccups at the <> and the mail then is delivered to standard box for the address. Any ideas? Marlin Andrew Sweger wrote: > > Check your procmail log to see if the pattern is matching at all (is it > calling the script). Then you can workout if the script is working > correctly or not. Note that once the message is piped off to your perl > script, it is considered delivered and no further processing of the > original message is done in the procmail recipe (unless you set up some > other settings in the recipe). Also, the output of the perl script is not > considered by procmail for any processing (can't remember if there's an > option to enable that, however). Otherwise, your recipe below should work > as advertised. > > On May 26, 2000 @ 6:01pm, marlin wrote: > > > Anybody out there know how to make Procmail pipe an imcoming email > > (with "inventory" as subject) to a Perl script? > > > > Here's what doesn't work... > > > > :0 > > * ^Subject:.*inventory > > | /path/to/script.pl > > > > Pseudo-Perl is like this... > > > > while (<>) { > > $msg .= $_; > > } > > process $msg; > > -- > Andrew Sweger | N2H2, Incorporated > Systems Architect | 900 Fourth Avenue, Suite 3400 > Advanced Technologies Division | Seattle WA 98164-1059 > v=206.336.2947 f=206.336.1541 | http://www.n2h2.com/ > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address -- 3 Hats Design INTERNET PRINT ILLUSTRATION 5201 15 Ave NW Suite 220 Seattle, WA 98107 206.784.1641 phone 206.784.2231 fax marlin@3hats.com http://www.3hats.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From dougb at scalar.org Mon May 29 14:30:39 2000 From: dougb at scalar.org (Doug Beaver) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Procmail In-Reply-To: <3932C644.A51C5484@3hats.com>; from marlin@3hats.com on Mon, May 29, 2000 at 12:34:29PM -0700 References: <3932C644.A51C5484@3hats.com> Message-ID: <20000529123039.A68928@scalar.org> On Mon, May 29, 2000 at 12:34:29PM -0700, marlin wrote: > Thanks to those who replied so far. > > Here is log entry when I send mail to the address in question... > > *************************** > procmail: > 1 at /home/pws_sales_inv/Procmail/grabdata.pl line 9, <> chunk 26. > >From marlingreene@mindspring.com Mon May 29 11:44:25 2000 > Subject: inventory > Folder: > /var/spool/mail/pws_sales_inv 1098 > > *************************** > > The ref to "line 9, <> chunk 26" is at the "while (<>)" > statement in the Perl script. What seems to be happening is > that the script hiccups at the <> and the mail then is > delivered to standard box for the address. What does line 26 of the email say? When perl says chunk 26, it means line 26 (or if you've redefined $/, the 26th block of text, hence the name chunk). Are you calling die() or warn() there? You said below that the code you provided was pseudocode, can you post the actual script itself? Doug > Andrew Sweger wrote: > > > > Check your procmail log to see if the pattern is matching at all (is it > > calling the script). Then you can workout if the script is working > > correctly or not. Note that once the message is piped off to your perl > > script, it is considered delivered and no further processing of the > > original message is done in the procmail recipe (unless you set up some > > other settings in the recipe). Also, the output of the perl script is not > > considered by procmail for any processing (can't remember if there's an > > option to enable that, however). Otherwise, your recipe below should work > > as advertised. > > > > On May 26, 2000 @ 6:01pm, marlin wrote: > > > > > Anybody out there know how to make Procmail pipe an imcoming email > > > (with "inventory" as subject) to a Perl script? > > > > > > Here's what doesn't work... > > > > > > :0 > > > * ^Subject:.*inventory > > > | /path/to/script.pl > > > > > > Pseudo-Perl is like this... > > > > > > while (<>) { > > > $msg .= $_; > > > } > > > process $msg; > > > > -- > > Andrew Sweger | N2H2, Incorporated > > Systems Architect | 900 Fourth Avenue, Suite 3400 > > Advanced Technologies Division | Seattle WA 98164-1059 > > v=206.336.2947 f=206.336.1541 | http://www.n2h2.com/ > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > -- > 3 Hats Design > INTERNET PRINT ILLUSTRATION > 5201 15 Ave NW > Suite 220 > Seattle, WA 98107 > 206.784.1641 phone > 206.784.2231 fax > marlin@3hats.com > http://www.3hats.com > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > -- Smithers: I'm afraid we have a bad image, Sir. Market research shows people see you as somewhat of an ogre. Burns: I ought to club them and eat their bones! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From marlin at 3hats.com Mon May 29 15:36:05 2000 From: marlin at 3hats.com (marlin) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Procmail problem Message-ID: <3932D4B5.23B224BB@3hats.com> Thanks to all who replied concerning my Procmail puzzle. Turns out to be a permissions issue, not a problem with Procmail at all. The folder where the mail is to be saved (if the Procmail filter conditions are met) must be owned by the email addressee. Further, the only permissions setting on the folder that works for me is dwrxrw-r-x (765 I believe) Once the ownership and permissions were set as above my mail wound up in the folder as expected. I hope this will be helpful to someone else. Marlin Greene -- 3 Hats Design INTERNET PRINT ILLUSTRATION 5201 15 Ave NW Suite 220 Seattle, WA 98107 206.784.1641 phone 206.784.2231 fax marlin@3hats.com http://www.3hats.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From smorton at pobox.com Mon May 29 17:02:02 2000 From: smorton at pobox.com (Sanford Morton) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Dealing with version incompatibility Message-ID: <14642.59610.993941.970764@evrtwa1-ar4-128-245.dsl.gtei.net> Here's a longish question on dealing with version incompatibility. I am revising my Chart::Plot module, which is an interface to GD to draw charts. GD has a complicated history in the image formats it can draw. Early versions could draw only gif, recent versions could draw only png, and the latest version can draw both jpeg and png. Chart::Plot should work with all GD versions and has a single draw() method to use the (or any available) GD drawing format. It can accept an argument to specify the format (returning an error if the format is invalid; another method returns a list of valid formats for the local GD version) but I would like to have a default format which requires no argument. There is no obvious choice about what format to use as default. I initially thought the default should vary depending on the GD version, on the grounds that a default should at least be valid. However a user wrote: I'm not so keen on having a default value change dependant upon the level of an external library. IMHO it would be best to stick with the 'gif' default, and enforce explicit changes to png or jpeg. ... [E]xternal programs ... are expecting specific image types to be generated. It seems a little overkill to have to load a module just to find out what it's going to generate! ... [T]he documentation only gets read when something doesn't work, and it's better that it doesn't work on installation, than 6 months down the line... This seems like a good argument, though on a server, the installer may not be the only user of Chart::Plot; also someone else may upgrade GD after installation. This is likely to be a script breaking issue, since the user must know the type to save to a file with the correct extension (on some platforms) or to return the correct content type from a cgi script. Further, a number of users persist in older versions of GD which write gif files (myself included) so making png the default independent of GD version, assuming older versions will be little used, will break a lot of scripts. So, what's a module writer to do? I'd appreciate comments on what users are likely to find most rational and convenient. Below is a current draft of the relevant pod section. Thanks, Sandy Morton ======================= pod ============================= Draw the image: draw() $img->draw(); $img->draw('png') or die "$img->error()"; This method draws the image and returns it as a string, which you can print to a file or to STDOUT. (This should be the last method called from the $img object.) You will generally need to know which image format your version of GD supports: if it supports png, then to save the image in a file: open (WR,'>plot.png') or die ("Failed to open file: $!"); binmode WR; # for DOSish platforms print WR $img->draw(); close WR; Of course, if you have a version of GD which supports only gif, change the file extension to gif. Versions of GD 1.19 and below supported only gif image format. Versions between 1.20 and 1.26 support only png format. $img->draw() will use whatever format your version of GD supports. Yet often, you must know the type to write the correct file extension or to return the correct content type from a cgi script. If you are not sure, or suspect the GD version may change, you can use $extension = $img->image_type(); open (WR,">plot.$extension"); to return the type, 'png' or 'gif'. GD version 1.27 supports both png and jpeg image formats. For this version, $img->draw() will default to 'png' unless you supply 'jpeg' as the argument. $img->image_type() will return 'png' in scalar context and the list (png,jpeg) in array context. If $img->draw() fails, it will return undef and an error messgae will be set. $img->error() will return 'The image format ... is not supported by this version ... of GD.' or whatever error message is returned by GD (such as an out of memory error). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From dougb at scalar.org Mon May 29 20:08:06 2000 From: dougb at scalar.org (Doug Beaver) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Dealing with version incompatibility In-Reply-To: <14642.59610.993941.970764@evrtwa1-ar4-128-245.dsl.gtei.net>; from smorton@pobox.com on Mon, May 29, 2000 at 03:02:02PM -0700 References: <14642.59610.993941.970764@evrtwa1-ar4-128-245.dsl.gtei.net> Message-ID: <20000529180806.A71083@scalar.org> On Mon, May 29, 2000 at 03:02:02PM -0700, Sanford Morton wrote: > Here's a longish question on dealing with version incompatibility. > > I am revising my Chart::Plot module, which is an interface to GD to > draw charts. GD has a complicated history in the image formats it can > draw. Early versions could draw only gif, recent versions could draw > only png, and the latest version can draw both jpeg and png. [snip] > There is no obvious choice about what format to use as default. I > initially thought the default should vary depending on the GD version, > on the grounds that a default should at least be valid. However a user > wrote: > > I'm not so keen on having a default value change dependant upon the > level of an external library. IMHO it would be best to stick with > the 'gif' default, and enforce explicit changes to png or jpeg. ... > [E]xternal programs ... are expecting specific image types to be > generated. It seems a little overkill to have to load a module just > to find out what it's going to generate! ... [T]he documentation > only gets read when something doesn't work, and it's better that it > doesn't work on installation, than 6 months down the line... > > This seems like a good argument, though on a server, the installer may > not be the only user of Chart::Plot; also someone else may upgrade GD > after installation. The other thing is that they might never even have the gif version of GD installed, so you wouldn't be able to make gif the default anyways. This is a tough call, but I think you should change the interface for your module so that the user is expected to call $self->image_type() in a list context in order to figure out what formats are supported. Then they can pick which one they like and call $self->image_type('gif') if their GD supports gif or $self->image_type('png') if theirs supports png. I think it makes more sense to set the output format through the image_type() method instead of the draw() method, so that users of your module would do this: use Chart::Plot; my $plot = new Chart::Plot; $plot->setData(\@data); $plot->setGraphOptions ( 'horGraphOffset' => 75, 'vertGraphOffset' => 100, 'title' => 'My Graph Title', 'horAxisLabel' => 'my X label', 'vertAxisLabel' => 'my Y label' ); my @favored_format_order = qw/gif png jpeg/; my %image_types = map { $_ => 1 } $plot->image_type(); my $image_format; for my $format (@favored_format_order) { if ($image_types{$format}) { $image_format = $format; last; } } $plot->image_type($image_format); my $image = "$image.$image_format"; open(OUT, ">$image") || die "Can't write $image: $!"; print OUT $plot->draw; close OUT; __END__ Of course, then they have to write code to select which format they want. But you could easily write a couple of methods that let them input the formats they want in preferential order and then the module could figure out what formats are supported and return the best choice for the user. Maybe something like this: $plot->setPreferredImageTypes(qw/gif png jpeg/); my $output_format = $plot->pickBestImageType; $plot->image_type($output_format); print $plot->draw; That way, they could pick by hand if they wanted to by passing an argument to the image_type() method, or they could just pass a list to the module and let it pick the best format for them. Feel free to ignore what I said, I just went and took a quick look at the pod below and the current module's interface and made a few quick suggestions based on what sort of interface I'd like to use if I was using the module on a regular basis... Doug > This is likely to be a script breaking issue, since the user must know > the type to save to a file with the correct extension (on some > platforms) or to return the correct content type from a cgi script. > Further, a number of users persist in older versions of GD which write > gif files (myself included) so making png the default independent of > GD version, assuming older versions will be little used, will break a > lot of scripts. > > So, what's a module writer to do? I'd appreciate comments on what > users are likely to find most rational and convenient. Below is a > current draft of the relevant pod section. > > > Thanks, > Sandy Morton > > ======================= pod ============================= > > Draw the image: draw() > > $img->draw(); > $img->draw('png') or die "$img->error()"; > > This method draws the image and returns it as a string, which you can > print to a file or to STDOUT. (This should be the last method called > from the $img object.) You will generally need to know which image > format your version of GD supports: if it supports png, then to save > the image in a file: > > open (WR,'>plot.png') or die ("Failed to open file: $!"); > binmode WR; # for DOSish platforms > print WR $img->draw(); > close WR; > > Of course, if you have a version of GD which supports only gif, change > the file extension to gif. Versions of GD 1.19 and below supported > only gif image format. Versions between 1.20 and 1.26 support only png > format. $img->draw() will use whatever format your version of GD > supports. Yet often, you must know the type to write the correct file > extension or to return the correct content type from a cgi script. If > you are not sure, or suspect the GD version may change, you can use > > $extension = $img->image_type(); > open (WR,">plot.$extension"); > > to return the type, 'png' or 'gif'. > > GD version 1.27 supports both png and jpeg image formats. For this > version, $img->draw() will default to 'png' unless you supply 'jpeg' > as the argument. $img->image_type() will return 'png' in scalar > context and the list (png,jpeg) in array context. > > If $img->draw() fails, it will return undef and an error messgae will > be set. $img->error() will return 'The image format ... is not > supported by this version ... of GD.' or whatever error message is > returned by GD (such as an out of memory error). > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > -- Smithers: I'm afraid we have a bad image, Sir. Market research shows people see you as somewhat of an ogre. Burns: I ought to club them and eat their bones! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Tue May 30 17:40:56 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Spring TPJ Arrived Yet? Message-ID: <20000530154056.B8313@timji.consultix.wa.com> SPUG-o-philes, Every quarter, I have the same argument with my advertising rep at "The Perl Journal"; she's asking me whether I want to subscribe in the next issue, and I'm saying stuff like "The Spring issue, that was supposed to ship in April, still hasn't arrived yet in Seattle, and it's nearly June - the same month you claim the Summer issue will start "shipping"! And half the courses I advertised in the Spring issue were for May, which was a complete waste, since the magazine won't appear until June. She says, in so many words, my subscription must be broken, because everybody else has had the magazine for weeks. But I looked at a few bookstores last week that regularly carry TPJ and didn't spot a single copy on the shelves, which I take as confirmation for my belief that it just hasn't hit the Puget Sound yet. So I ask you SPUGsters who subscribe to TPJ, did you receive your issues yet? If so, when? (Please reply directly to me, and I'll summarize the results for the list.) Thanks, -Tim *========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | CLASSES; 6/12-> Intermediate Perl 6/15-> Adv. Pattern Matching w/Perl | | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | *========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From scott at sabmail.rresearch.com Tue May 30 18:07:23 2000 From: scott at sabmail.rresearch.com (Scott Blachowicz) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Spring TPJ Arrived Yet? In-Reply-To: <20000530154056.B8313@timji.consultix.wa.com>; from tim@consultix-inc.com on Tue, May 30, 2000 at 03:40:56PM -0700 References: <20000530154056.B8313@timji.consultix.wa.com> Message-ID: <20000530160723.A9311@sabami.seaslug.org> On Tue, May 30, 2000 at 03:40:56PM -0700, Tim Maher/CONSULTIX wrote: > > Every quarter, I have the same argument with my advertising rep at "The > Perl Journal"; she's asking me whether I want to subscribe in the next > issue, and I'm saying stuff like "The Spring issue, that was supposed > to ship in April, still hasn't arrived yet in Seattle, and it's nearly > June - the same month you claim the Summer issue will start "shipping"! I got mine a while ago...well...long enough for me to start reading it, set it down in my "reading pile" for several days, then finish it over the weekend. So, I've probably had that Spring 2000 issue for about 2 weeks now. -- Scott Blachowicz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From markyesme at home.com Tue May 30 20:13:30 2000 From: markyesme at home.com (Mark Lybrand) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Re: Spring TPJ Arrived Yet? References: <20000530154056.B8313@timji.consultix.wa.com> Message-ID: <012801bfca9d$6ee8f3e0$53ce1318@olmpi1.wa.home.com> Haven't received it yet, but the B&N here in Oly's already got it. Mark :) ----- Original Message ----- From: "Tim Maher/CONSULTIX" To: Sent: Tuesday, May 30, 2000 3:40 PM Subject: SPUG: Spring TPJ Arrived Yet? > SPUG-o-philes, > > Every quarter, I have the same argument with my advertising rep at "The > Perl Journal"; she's asking me whether I want to subscribe in the next > issue, and I'm saying stuff like "The Spring issue, that was supposed > to ship in April, still hasn't arrived yet in Seattle, and it's nearly > June - the same month you claim the Summer issue will start "shipping"! > > And half the courses I advertised in the Spring issue were for May, > which was a complete waste, since the magazine won't appear until June. > She says, in so many words, my subscription must be broken, because > everybody else has had the magazine for weeks. But I looked at a few > bookstores last week that regularly carry TPJ and didn't spot a single > copy on the shelves, which I take as confirmation for my belief that it > just hasn't hit the Puget Sound yet. > > So I ask you SPUGsters who subscribe to TPJ, did you receive your > issues yet? If so, when? > > (Please reply directly to me, and I'll summarize the results for the > list.) > > Thanks, > -Tim > > *========================================================================* > | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | > | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | > | CLASSES; 6/12-> Intermediate Perl 6/15-> Adv. Pattern Matching w/Perl | > | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | > *========================================================================* > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ > For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Tue May 30 20:40:03 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Spring TPJ Arrived Yet? In-Reply-To: <20000530154056.B8313@timji.consultix.wa.com>; from tim@consultix-inc.com on Tue, May 30, 2000 at 03:40:56PM -0700 References: <20000530154056.B8313@timji.consultix.wa.com> Message-ID: <20000530184003.A9145@timji.consultix.wa.com> Here's the tally regarding "Perl Journal" arrivals: 6/9: arrived from 7-14 days ago 3/9: hasn't arrived yet As one respondent pointed out, and others confirmed, the entire initial publishing run had to be junked due to an error, and redone. That's undoubtedly a factor contributing to the tardy arrivals, but it's still surprising to see a variation in arrival times ranging from "two weeks ago" to "not yet", all in the same metropolitan area! ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Wed May 31 11:50:54 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Downtown Seattle Perl Jobs, short/long term Message-ID: <20000531095054.A12254@timji.consultix.wa.com> PERL/CGI, databases, relational databases Permanent employment positions, with highly competitive benefits Short-term employment positions (3 to 6 months) for expert level programmers, $50 per hour, no benefits; W-2 status Downtown Seattle location, no telecommuting Innovative Content for the World... NeoInformaticsTM is revolutionizing the way people use the web. Our company specializes in making our clients' websites the authorities in their fields by providing them with the largest, most authoritive, innovative, useful and continually growing databases ever known. See: www.neoinformatics.com Contact: kathy.lebarron@neoinformatics.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Wed May 31 11:57:56 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Perl/Python Developers, Seattle Message-ID: <20000531095756.B12254@timji.consultix.wa.com> Greetings. Our firm, IDCertify, is a well-funded, full-service Certification Authority located in Seattle, WA. We develop Digital Signature and Digital Certificate solutions. We're currently in rapid growth mode and in need of permanent talent at all levels. Ours is a PreIPO business model with a very short-term timeframe to offering. Compensation is competitive/DOE and includes stock options. Please take a look at the description below as well as our web site: www.IDCertify.com. I'd be eager to chat with you to see if our needs match your objectives. Best regards, J.Ward Manager of Recruiting www.IDCertify.com jward@IDCertify.com ID CERTIFY, Inc. TITLE: Systems Programmer(s) LOCATION: Seattle, WA DESCRIPTION: Position is responsible for generalist programming and support in a rapidly changing technical environment. RESPONSIBILITIES: ? Design and implement network services ? Design and implement all CGI scripts using Perl? Assist in debugging system problems and work closely with Operations and Engineering ? Interface with business customers to provide tech support QUALIFICATIONS: ? At least 4 years generalist programmer experience (Perl/Python ANDOR C/C++) ? Experience with SQL programming (Pref PL-SQL) ? Familiarity with network services based on Unix and/or NT ? Familiarity with the IETF Process (RFC) ? Ability to work in a fast-paced and dynamic environment ? Strong interpersonal skills; team player ? Ability to be self-directed and work independently PLUSES: ? Experience with Digital Signature technology or cryptography a plus. ? Certifications ? Experience working with commercial API's and interfaces ? Visual Basic for Applications ? BS/MA in computer science or related field ? Internet firewalls/router configuration ? GNU/Linux, Solaris, FreeBSD, NT ----- End forwarded message ----- -- *========================================================================* | Dr. Tim Maher, CEO, Consultix (206) 781-UNIX/8649; ask for FAX# | | Email: tim@consultix-inc.com Web: http://www.consultix-inc.com | | CLASSES; 6/12-> Intermediate Perl 6/15-> Adv. Pattern Matching w/Perl | | DAMIAN CONWAY Seminars; Adv. OO Perl: 7/6, Parsing with Modules: 7/7 | *========================================================================* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address From tim at consultix-inc.com Wed May 31 12:09:33 2000 From: tim at consultix-inc.com (Tim Maher/CONSULTIX) Date: Wed Aug 4 00:07:19 2004 Subject: SPUG: Perl/Java Web Dev., Seattle Message-ID: <20000531100933.C12254@timji.consultix.wa.com> Note on following job ad: In the enclosed job description it states that you have to travel 75% of the time, which is the case for candidates living outside of the Seattle market place. Those living in the Seattle area will only have to travel about 5% of the time. This opportunity will allow candidates that work on a 1099 basis to work a 4 day work week, W-2's will work a 5 day work week. They are looking to add at least 8 people in Seattle per month for the next 6 months for a total of 48 people. Any SPUGsters taking the job, please make it clear that you heard about the opportunity from the SPUG-list, so the group can obtain a small placement commission for use in funding future projects. NOTE: This job is being offered by a placement agency. ========================================================== | Tim Maher, Ph.D. Tel/Fax: (206) 781-UNIX | | SPUG Founder & Leader Email: spug@halcyon.com | | Seattle Perl Users Group HTTP: www.halcyon.com/spug | ========================================================== Come join San Diego's most innovative e-Business solutions providers for both Fortune 1000 and .com client companies that are looking to harness the power of the internet to give them a competitive advantage that will catapult them above and beyond the competition. Our firm is experiencing explosive growth due to the huge demand for our total e-Business enterprise application suite. Our growth is only limited to how fast we can find top notch consultants that want to enjoy the benefits of a 4 day work week and traveling to our client companies that are located in Boston, New York, San Francisco, and Seattle. You will be part of a team that will help develop a Web-based enterprise application suite using both Java, shell scripting, and Perl web applications that will enable us to deliver high performance end-to-end e-enterprise solutions in record times and cost savings to our clients. The Web Based applications that you will help create will allow organizations to deliver a personalized buying experience for its consumers on the internet by allowing them to customize any items that they want to purchase. The benefit to the consumer is that they will have unlimited options and selections for the merchandise they want to purchase. It will be customized and manufactured for them to their specifications. The results of your efforts will change the way that people shop, while offering cost savings to our client companies. Experience they will consider: The ideal person will have at least 1 year of Java and perl experience. They will consider candidates that know Perl without Java, and candidate that know Java with Shell Scripting backgrounds. The ideal candidate has to meet the above criteria and must have excellent communications skills and willing to travel up to 75% of the time. H1-B candidates and Corp to Corp candidates will be able to work a 4 day work week, others will have to do a 5 day work week. If your candidate is willing to travel they can be based anywhere in the US, but to pass along cost savings to the client and reduce the amount of travel to the candidate the most desirable candidates will be located in the Boston, New York, Seattle, or San Francisco. The World headquarters is located in San Diego. Other information: The assignment will be a guaranteed assignment of 6 months, up to 2 years. Pay Rate: $30 to $65 per hour. Contact Mark Wheaton at 858-558-6990 Email: mark.wheaton@rhic.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/ For Subscriptions, Email to majordomo@pm.org: ACTION spug-list EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address