From alan at ufies.org Thu Nov 14 13:52:16 2002 From: alan at ufies.org (Alan) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: mod_perl download handler help needed Message-ID: <20021114195216.GB16945@ufies.org> Hi folks, been working on a little project and I've run into a bit of a snag. What I'm doing is designing a file tracker for a client. Basically when someone downloads a a file (/files/foo.pdf) it pops up a window, gets a name and email, then (when that is complete) gives them the file. To do this what I've done is put a handler on /files that: - checks to make sure the file exists and is readable - displays an html page with a form action of /files/$filename and a hidden field of 'returnto' set to $filename - when the submit button is pressed, it submits back to /files/$filename, and because the handler is on /files it catches it again - if the name and email are not filled in, displays the form again - if they are filled in, it sends an email to whoever gets the job of watching for file downloads, and then uses the following code to display the file: my $filepath = $r->document_root . "/files/" . $params{returnto}; $r->send_http_header($r->lookup_file($filepath)->content_type); my $fh = Apache::gensym(); open($fh, "$filepath") || return NOT_FOUND; $r->send_fd($fh); close($fh); return OK; This all works just great..... *until the user tries to download the file*. Because the browser doesn't grab from the cache (tried both ie6 and mozilla) the file that is downloaded is the html form because I assume, it's seeing the request again, and sending back the html form. I've tried sticking the parameters on the URL (foo.com/files/foo.pdf?name=abc&email=bcd), but then it seems to send me back a file with a mime type of httpd/unix-directory (sending the /files directory I'm guessing). Is there a better way to do this? I'd rather not have the download link be something like "download.cgi?file=foo.pdf", but if needed I'll revert to that. I'd just rather have it work a little more seamlessly than that. Anyway, if anyone has any ideas I'd love to hear them :) alan -- Alan - http://arcterex.net --------------------------------------------------------------------- "The only thing that experience teaches us is that experience teaches us nothing. -- Andre Maurois (Emile Herzog) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Thu Nov 14 14:20:45 2002 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: mod_perl download handler help needed In-Reply-To: <20021114195216.GB16945@ufies.org> References: <20021114195216.GB16945@ufies.org> Message-ID: <20021114202045.GR28539@ifokr.org> > This all works just great..... *until the user tries to download the > file*. Because the browser doesn't grab from the cache (tried both ie6 > and mozilla) the file that is downloaded is the html form because I > assume, it's seeing the request again, and sending back the html form. set the no-cache HTTP header for the document. For example if you had sub handler { local $r = Apache::Request->new(shift); $r->content_type('text/html'); ... change it to sub handler { local $r = Apache::Request->new(shift); $r->content_type('text/html'); $r->no_cache(1); That should disable any caching. -- Brian Hatch A day without fusion Systems and is like a day Security Engineer without sunshine. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20021114/2e1d1c9f/attachment.bin From ryanparr at thejamescompany.com Thu Nov 14 14:31:23 2002 From: ryanparr at thejamescompany.com (Ryan Parr) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Re: mod_perl download handler help needed References: <20021114195216.GB16945@ufies.org> Message-ID: <022001c28c1c$ccef4140$180117ac@ISSQOA06688> Wouldn't the line: $r->send_http_header($r->lookup_file($filepath)->content_type); Get back the text/html content type from your handler? Since this is using a full sub-request, I assume it would trigger your handler. You may be better off using a method to determine the mime-type other than Apache's subrequest function. ----- Original Message ----- From: "Alan" To: Sent: Thursday, November 14, 2002 11:52 AM Subject: SPUG: mod_perl download handler help needed > Hi folks, been working on a little project and I've run into a bit of a > snag. What I'm doing is designing a file tracker for a client. > Basically when someone downloads a a file (/files/foo.pdf) it pops up a > window, gets a name and email, then (when that is complete) gives them > the file. > > To do this what I've done is put a handler on /files that: > - checks to make sure the file exists and is readable > - displays an html page with a form action of /files/$filename and a > hidden field of 'returnto' set to $filename > - when the submit button is pressed, it submits back to > /files/$filename, and because the handler is on /files it catches it > again > - if the name and email are not filled in, displays the form again > - if they are filled in, it sends an email to whoever gets the job of > watching for file downloads, and then uses the following code to > display the file: > > my $filepath = $r->document_root . "/files/" . > $params{returnto}; > $r->send_http_header($r->lookup_file($filepath)->content_type); > my $fh = Apache::gensym(); > open($fh, "$filepath") || return NOT_FOUND; > $r->send_fd($fh); > close($fh); > return OK; > > This all works just great..... *until the user tries to download the > file*. Because the browser doesn't grab from the cache (tried both ie6 > and mozilla) the file that is downloaded is the html form because I > assume, it's seeing the request again, and sending back the html form. > > I've tried sticking the parameters on the URL > (foo.com/files/foo.pdf?name=abc&email=bcd), but then it seems to send me > back a file with a mime type of httpd/unix-directory (sending the /files > directory I'm guessing). > > Is there a better way to do this? I'd rather not have the download link > be something like "download.cgi?file=foo.pdf", but if needed I'll revert > to that. I'd just rather have it work a little more seamlessly than > that. > > Anyway, if anyone has any ideas I'd love to hear them :) > > alan > > -- > Alan - http://arcterex.net > --------------------------------------------------------------------- > "The only thing that experience teaches us is that experience teaches > us nothing. -- Andre Maurois (Emile Herzog) > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Thu Nov 14 14:41:06 2002 From: tim at consultix-inc.com (Tim Maher) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Nov. and Dec. Meetings Message-ID: <20021114124106.A10461@timji.consultix-inc.com> SPUGsters, Just a quick note to inform you that I've just updated the web-site with details of our next two talks. On next Tuesday, 11/19, our "prodigal SPUG son" Brian Ingerson will be telling us about some of his cool modules -- about 18 of them. Then on 12/17, for a slight Christmas Diversion from our usual fare, Steve Roberts, of Nomadic Research Labs (http://www.microship.com) will talk about his latest geeky inventions, and what roles Perl and Linux play in them. More details at: www.seattleperl.org Hope to see you there! -Tim -- *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | CLASSES: UNIX Fundamentals: 12/2-12/5; Minimal Perl Programming: 12/6 | *----------------------------------------------------------------------------* ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From alan at ufies.org Thu Nov 14 14:54:52 2002 From: alan at ufies.org (Alan) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Re: mod_perl download handler help needed In-Reply-To: <022001c28c1c$ccef4140$180117ac@ISSQOA06688> References: <20021114195216.GB16945@ufies.org> <022001c28c1c$ccef4140$180117ac@ISSQOA06688> Message-ID: <20021114205452.GE16945@ufies.org> On Thu, Nov 14, 2002 at 12:31:23PM -0800, Ryan Parr wrote: > Wouldn't the line: > > $r->send_http_header($r->lookup_file($filepath)->content_type); > > Get back the text/html content type from your handler? Since this is using a > full sub-request, I assume it would trigger your handler. You may be better > off using a method to determine the mime-type other than Apache's subrequest > function. [snip] > > my $filepath = $r->document_root . "/files/" . > > $params{returnto}; > > $r->send_http_header($r->lookup_file($filepath)->content_type); Nope, $filepath is the path to the file (a combination of the docroot, /files/ and the "returnto" hidden parameter with the filename in it. Because I'm using lookup_file it's returning the right content type. Unfortunately the problem is on the save :( I've hacked around this by symlinking /files to /downloads, and then on completion of the form doing a redirect to /downloads/$params{returnto}. Not the most secure, but adequate for now I guess. Maybe I'll throw some sort of handler on /downloads and have it make sure that the referrer for /downloads/$file is /files/$file or something. alan -- Alan - http://arcterex.net --------------------------------------------------------------------- "The only thing that experience teaches us is that experience teaches us nothing. -- Andre Maurois (Emile Herzog) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From vince.skahan at Boeing.COM Thu Nov 14 16:44:49 2002 From: vince.skahan at Boeing.COM (Skahan, Vince) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: monitoring a Cold Fusion application for health Message-ID: <1C16569DFF0D3D4699EFA6C64D37DAE08CEE11@xch-nw-07.nw.nos.boeing.com> I have a Cold Fusion web server running on top of Apache (and postgres) that sometimes gets 'stupid' when it starts, the processes appear running, but attempts to get files from the web server return a '111 connection refused' message from Cold Fusion and no user web accesses are successful. The fix is to simply stop/start Cold Fusion (ugh). What I'd like to do is write a quickie monitoring routine to run that would get a known file, verify that it was received fully, and to do the stop/start of the cold fusion processes if it determines CF is brain-dead. Any thoughts on what's the easiest way to approach this one ? This is on RedHat-7.2 with the latest RedHat-supplied perl 5.6.1 installed. Also, I'd 'really' like to not have to add any perl modules to vanilla RedHat if at all possible, as that causes other adventures when we upgrade perl etc. I'm leaning pretty strongly toward a perl solution, but tcl/expect/python etc. aren't out of the question if there's something that leaps to mind. Any input's much appreciated.... -- ---------- Vince.Skahan@boeing.com --------- Connexion by Boeing - Cabin Network - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From ced at carios2.ca.boeing.com Thu Nov 14 19:23:52 2002 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: monitoring a Cold Fusion application for health Message-ID: <200211150123.RAA01647@carios2.ca.boeing.com> Hi Vince, If the CF 111 error results in some variant of HTTP "server error" when there's a fetch, could you just schedule a simple LWP (or even cook up a lynx) test ala: my $ua = LWP::UserAgent->new; my $request = HTTP::Request->new(GET => 'http://cf.../foo.htm/'); my $response = $ua->request($request); unless ( $response->is_success ) { ... do the CF reboot.. } You could possibily HEAD instead of GET here if you're just checking for stupidity. Or even poke into the type of reponse error to make sure that the error wasn't something transient. -- Charles DeRykus > I have a Cold Fusion web server running on top of Apache (and postgres) that > sometimes gets 'stupid' when it starts, the processes appear running, but > attempts to get files from the web server return a '111 connection refused' > message from Cold Fusion and no user web accesses are successful. The fix is > to simply stop/start Cold Fusion (ugh). > > What I'd like to do is write a quickie monitoring routine to run that would > get a known file, verify that it was received fully, and to do the > stop/start of the cold fusion processes if it determines CF is brain-dead. > > Any thoughts on what's the easiest way to approach this one ? This is on > RedHat-7.2 with the latest RedHat-supplied perl 5.6.1 installed. Also, I'd > 'really' like to not have to add any perl modules to vanilla RedHat if at > all possible, as that causes other adventures when we upgrade perl etc. > > I'm leaning pretty strongly toward a perl solution, but tcl/expect/python > etc. aren't out of the question if there's something that leaps to mind. > > Any input's much appreciated.... > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Mon Nov 18 11:22:14 2002 From: tim at consultix-inc.com (Tim Maher) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Nov. Mtg: Ingy's Cornucopia Message-ID: <20021118092214.A5319@timji.consultix-inc.com> November 2002 Seattle Perl Users Group Meeting ----------------------------------------------------- Speaker: Brian Ingerson ingy@cpan.com, www.ttul.org Time: Tuesday, October 19, 2002 7-9pm Location: SAFECO bldg, Brooklyn St. and NE 45th St. Cost: Admission is free and open to the general public. Info: http://seattleperl.org/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * About the Talk: "Ingy's Cornucopia" --------------- October and November have been very busy months for me. I have released 3 new Perl modules (including a my own version control system), overhauled and released Inline.pm, and even attended the Ruby conference. This talk will be a whirlwind tour of my various modules, what they do, why I wrote them, where they are headed and how they are all interrelated. I'll also talk about my overarching vision for the Perl community, and why I do what I do. Topics will include (not necessarily in this order): * Inline * YAML * Inline::YAML * Inline-0.44 * Inline-0.50 * Inline::CPR * Inline.rb * YAML.rb * Data::Denter * HashBang * HashBang-ParrotScript * YourBrainForOnceDude * HashBang-YourBrainForOnceDude * CPAN::MakeMaker * I Have A Dream * FreePAN * SWIG.pm * VCS-SaVes About the Speaker: ----------------- Brian "ingy" Ingerson has been a computer programmer for 20 years, and a Perl programmer for 5. In the past two years he has been very active in the Perl Community, speaking at most of the major Perl conferences, and several Perl Mongers meetings. He is responsible for starting the Inline series of modules which currently bind Perl seamlessly to over 15 other programming languages. Pre- and Post- Meeting Activities --------------------------------- The recommended pre-meeting diner is the Cedars restaurant, at 50th St. and Brooklyn, in the University District, near the Safeco building where the meeting will take place. The phone number is 527-5247. If you're planning to be there, please post a message to the list with your expected arrival time (5:30-5:45pm is recommended). As usual, those seeking liquid input before (and/or after) the meeting are invited to congregate at the nearby Finn MacCool's tavern, at 4217 University Ave. North, (206) 675-0885. See the web-site for more details. ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Mon Nov 18 12:22:53 2002 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Corrected date for meeting Message-ID: <20021118102253.A5543@timji.consultix-inc.com> November 2002 Seattle Perl Users Group Meeting ----------------------------------------------------- Speaker: Brian Ingerson ingy@cpan.com, www.ttul.org Time: Tuesday, November 19, 2002 7-9pm Location: SAFECO bldg, Brooklyn St. and NE 45th St. Cost: Admission is free and open to the general public. Info: http://seattleperl.org/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * About the Talk: "Ingy's Cornucopia" --------------- October and November have been very busy months for me. I have released 3 new Perl modules (including a my own version control system), overhauled and released Inline.pm, and even attended the Ruby conference. This talk will be a whirlwind tour of my various modules, what they do, why I wrote them, where they are headed and how they are all interrelated. I'll also talk about my overarching vision for the Perl community, and why I do what I do. Topics will include (not necessarily in this order): * Inline * YAML * Inline::YAML * Inline-0.44 * Inline-0.50 * Inline::CPR * Inline.rb * YAML.rb * Data::Denter * HashBang * HashBang-ParrotScript * YourBrainForOnceDude * HashBang-YourBrainForOnceDude * CPAN::MakeMaker * I Have A Dream * FreePAN * SWIG.pm * VCS-SaVes About the Speaker: ----------------- Brian "ingy" Ingerson has been a computer programmer for 20 years, and a Perl programmer for 5. In the past two years he has been very active in the Perl Community, speaking at most of the major Perl conferences, and several Perl Mongers meetings. He is responsible for starting the Inline series of modules which currently bind Perl seamlessly to over 15 other programming languages. Pre- and Post- Meeting Activities --------------------------------- The recommended pre-meeting diner is the Cedars restaurant, at 50th St. and Brooklyn, in the University District, near the Safeco building where the meeting will take place. The phone number is 527-5247. If you're planning to be there, please post a message to the list with your expected arrival time (5:30-5:45pm is recommended). As usual, those seeking liquid input before (and/or after) the meeting are invited to congregate at the nearby Finn MacCool's tavern, at 4217 University Ave. North, (206) 675-0885. See the web-site for more details. ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org ----- End forwarded message ----- -- -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | CLASSES: UNIX Fundamentals: 12/2-12/5; Minimal Perl Programming: 12/6 | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Mon Nov 18 12:55:22 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Nov. Mtg: Ingy's Cornucopia In-Reply-To: <20021118092214.A5319@timji.consultix-inc.com> References: <20021118092214.A5319@timji.consultix-inc.com> Message-ID: > Pre- and Post- Meeting Activities > --------------------------------- > The recommended pre-meeting diner is the Cedars restaurant, [...] > If you're planning to be there, please post a > message to the list with your expected arrival time (5:30-5:45pm > is recommended). I'll be at Cedars at 5:30. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From eric.brose at attws.com Mon Nov 18 20:33:31 2002 From: eric.brose at attws.com (Brose, Eric) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Apache Madness! Message-ID: <43313AE9A975AF4FBF6F74901608BA3761524C@WA-MSG04-BTH.wireless.attws.com> Hello, I'm trying to retrieve the contents of a directory and display them to a web page. I'm using windows 2000 with apache installed. The directory I'm accessing also happens to be across a mapped drive. When I run the script from the command line, all looks well, but the web server does not display my data! I've played with this quite a lot with no luck. ----------------------------------------------------------- This is a tiny script: #!c:/perl/bin/perl use strict; use CGI ':standard'; print header(); my $where; my @files; print "fick\n\n"; while ($where = ) { push @files,$where; } for (@files){ print "$_
\n"; } ----------------------------------------------------------- Here's the command line output: C:\Program Files\Apache Group\Apache\cgi-bin\req>perl distribute.pl Content-Type: text/html; charset=ISO-8859-1 fick F:/sea124/client/BIN/cesiebel.cfg
F:/sea124/client/BIN/emailresp.cfg
F:/sea124/client/BIN/iloptcfg.cfg
F:/sea124/client/BIN/iss.cfg
F:/sea124/client/BIN/market.cfg
F:/sea124/client/BIN/pimmap.cfg
F:/sea124/client/BIN/pimsync.cfg
F:/sea124/client/BIN/scomm.cfg
---------------------------------------------------------------------------- Here's the source from the web page: fick -------------------------------------------------------------- Why it no LIKE this?!! Thanks Eric Brose - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From aaron at activox.com Mon Nov 18 22:11:30 2002 From: aaron at activox.com (Aaron Salo) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Apache Madness! In-Reply-To: <43313AE9A975AF4FBF6F74901608BA3761524C@WA-MSG04-BTH.wirele ss.attws.com> Message-ID: <3.0.5.32.20021118201130.0182a8d8@mail.activox.com> from the command line, you are you. from the webserver, you are nobody. or www. or some other non-privileged user that cannot just have its way with a directory called BIN, I hope? try this, if it doesn't work it will at least tell you why. my $dir = 'F:/sea124/client/BIN/'; opendir(DIR, "$dir") or die "cannot open dir $dir - $!"; my @list = readdir(DIR) or die "cannot read dir = $!"; closedir(DIR); foreach(@list) {print qq($_
\n);} At 06:33 PM 11/18/2002 -0800, Brose, Eric wrote: >Hello, > >I'm trying to retrieve the contents of a directory and display them to a web page. > >I'm using windows 2000 with apache installed. The directory I'm accessing also happens to be across a mapped drive. When I run the script from the command line, all looks well, but the web server does not display my data! I've played with this quite a lot with no luck. >----------------------------------------------------------- >This is a tiny script: >#!c:/perl/bin/perl > >use strict; >use CGI ':standard'; >print header(); > >my $where; >my @files; > >print "fick\n\n"; >while ($where = ) { > push @files,$where; > } > >for (@files){ >print "$_
\n"; >} >----------------------------------------------------------- > > >Here's the command line output: >C:\Program Files\Apache Group\Apache\cgi-bin\req>perl distribute.pl >Content-Type: text/html; charset=ISO-8859-1 > >fick > >F:/sea124/client/BIN/cesiebel.cfg
>F:/sea124/client/BIN/emailresp.cfg
>F:/sea124/client/BIN/iloptcfg.cfg
>F:/sea124/client/BIN/iss.cfg
>F:/sea124/client/BIN/market.cfg
>F:/sea124/client/BIN/pimmap.cfg
>F:/sea124/client/BIN/pimsync.cfg
>F:/sea124/client/BIN/scomm.cfg
> >---------------------------------------------------------------------------- >Here's the source from the web page: > >fick > >-------------------------------------------------------------- >Why it no LIKE this?!! > > >Thanks > > >Eric Brose > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Mon Nov 18 22:31:38 2002 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Apache Madness! Message-ID: <20021119043138.GL25152@ifokr.org> > I'm using windows 2000 with apache installed. The > directory I'm accessing also happens to be across a > mapped drive. When I run the script from the command > line, all looks well, but the web server does not display > my data! I've played with this quite a lot with no luck. Can the webserver user access this directory? What happens if you do something like this instead: chdir "f:\seal24\client\bin"; print `dir`; (Note I've never used apache or perl on windows - don't trust this syntax.) -- Brian Hatch If thine enemy wrong thee, Systems and buy each of his children Security Engineer a drum. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20021118/fbf737b3/attachment.bin From pdarley at kinesis-cem.com Tue Nov 19 10:35:06 2002 From: pdarley at kinesis-cem.com (Peter Darley) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Simple Perl daemon Message-ID: Friends, I'm writing a simple Perl daemon to detect changes in a database and run scripts depending on what it finds. I'd like to have a second script that gets called periodically from a cron job to ensure that the daemon is still running, but I'm not able to find any examples of how to do this. Any suggestions? Thanks, Peter Darley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Tue Nov 19 11:39:53 2002 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Simple Perl daemon In-Reply-To: References: Message-ID: <20021119173953.GG20379@ifokr.org> > I'm writing a simple Perl daemon to detect changes in a database and run > scripts depending on what it finds. I'd like to have a second script that > gets called periodically from a cron job to ensure that the daemon is still > running, but I'm not able to find any examples of how to do this. Any > suggestions? Is this a unix box? If so, rather than creating the daemon watchdog, why not run the daemon from DJB's supervise (http://cr.yp.to/daemontools.html), or from init (/etc/inittab) directly? Either will be able to automatically restart it if it stops, and then you don't need to write another program and it'll check constantly, rather than when cron starts it up. -- Brian Hatch "Eyesssh" Systems and -- Reegen, requesting ice, Security Engineer after throwing a walking http://www.ifokr.org/bri/ stick at dad. Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20021119/97ab2bb6/attachment.bin From pdarley at kinesis-cem.com Tue Nov 19 12:21:21 2002 From: pdarley at kinesis-cem.com (Peter Darley) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Simple Perl daemon In-Reply-To: <20021119173953.GG20379@ifokr.org> Message-ID: Brian, That's what Cris Wilkes suggested. I didn't know that such a thing existed, but it looks like it should do the trick. :) Thanks to you both. Thanks, Peter Darley -----Original Message----- From: Brian Hatch [mailto:spug@ifokr.org] Sent: Tuesday, November 19, 2002 9:40 AM To: Peter Darley Cc: SPUG Subject: Re: SPUG: Simple Perl daemon > I'm writing a simple Perl daemon to detect changes in a database and run > scripts depending on what it finds. I'd like to have a second script that > gets called periodically from a cron job to ensure that the daemon is still > running, but I'm not able to find any examples of how to do this. Any > suggestions? Is this a unix box? If so, rather than creating the daemon watchdog, why not run the daemon from DJB's supervise (http://cr.yp.to/daemontools.html), or from init (/etc/inittab) directly? Either will be able to automatically restart it if it stops, and then you don't need to write another program and it'll check constantly, rather than when cron starts it up. -- Brian Hatch "Eyesssh" Systems and -- Reegen, requesting ice, Security Engineer after throwing a walking http://www.ifokr.org/bri/ stick at dad. Every message PGP signed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Tue Nov 19 12:24:08 2002 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Simple Perl daemon In-Reply-To: References: <20021119173953.GG20379@ifokr.org> Message-ID: <20021119182408.GJ20379@ifokr.org> > That's what Cris Wilkes suggested. I didn't know that such a thing > existed, but it looks like it should do the trick. :) Thanks to you both. Note that to run it from supervise or init you do *not* want to include traditional daemonizing code, ala fork && exit; fork && exit; Because there's no need and it can confuse the watchdog program. (Supervise can deal with this if you use the fghack or prgrphack trick, but that's silly if you're the one writing the daemon.) -- Brian Hatch "They always said I was carrying around a Systems and lot of repressed anger. Security Engineer I'm not repressed anymore." http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20021119/1f1c2836/attachment.bin From thane_w at fastmail.fm Tue Nov 19 13:29:38 2002 From: thane_w at fastmail.fm (Thane Williams) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Cedars, 5:30 Message-ID: <20021119192938.603A42FD1D@server4.fastmail.fm> Barring unusually cruel traffic conditions, I'll be there at 5:30. -- http://fastmail.fm - A no graphics, no pop-ups email service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Tue Nov 19 19:53:01 2002 From: tim at consultix-inc.com (Tim Maher) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Cheap, Rough, Training on Hashes! Message-ID: <20021119175301.A12979@timji.consultix-inc.com> SPUGsters, Here's a limited time offer some of you might find attractive! -Tim P.S. I'm feeling a bit under the weather, so you'll have to enjoy the Ingster tonight without me 8-{ *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | CLASSES: Hashes and Arrays in Perl: 12/5; Minimal Perl Programming: 12/6 | *----------------------------------------------------------------------------* Subject: NEW CLASS: Perl Hashes and Arrays ----------------------------------------- Perl's "hash" data structure is one of the most useful features of the language, but most Perl programmers don't know much beyond the basics. And that's unfortunate because learning how to effectively use hash slices, multidimensional hashes, the "exists" operator, and advanced techniques for initializing hashes can make you a more productive programmer. Similarly, learning about the special Perl operators for arrays, including push, pop, and splice, can also improve your programming. In this special one-day hands-on class, we'll talk about these language features, and see how they are typically used in real programs. Special "Prototype" Class on Dec. 5th ------------------------------------- Tim Maher will be testing out some material for a new class on December 5th, at the La Quinta Inn in Kirkland. Programmers who have already taken our 3 or 4-day Perl Programming course, or who have equivalent experience, are invited to register. The level of the course will be Intermediate. The goal is to show cool things that can be done with hashes and arrays, without getting mired in the complexities of complex data structures and dereferencing (which we'll avoid where possible). The language features that will be covered are expected to include push(), pop(), shift,() unshift(), splice(), exists(), delete(), keys(), values(), each(), tie(), slices, autovivification, data persistence, and various pertinent modules. Sample programming examples may include: finding unique elements in a list, calculating word frequencies from web pages, initializing arrays from pattern matches, picking a random element from an array, showing elements common to two arrays, splicing one list into another, imposing constraints on hash keys, using hashes for "unique-ification", handling subroutine arguments in hash-init format, etc. The special price for this Hands-On class, which includes pre-printed course notes and refreshments, is $100 (and some students in previous classes have gotten their money back in donuts!) This is a great opportunity to get gain some useful Perl knowledge at a very economical price, and seating is limited, so sign up soon. WARNING: This being a "trial run", the educational experience is not likely to be as polished or satisfying as usual! Hence the steep discount. But we'll do our best to make it worth your while. --------------------------------------------------------- SCHEDULE OF CONSULTIX PUBLIC CLASSES, in Kirkland WA --------------------------------------------------------- Courses by Dr. Tim Maher: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TITLE DATES Days Hashes & Arrays 12/05 1 Minimal Perl 12/06 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CONSULTIX ON-LINE RESOURCES General Information: http://www.consultix-inc.com On-Site Training: http://www.consultix-inc.com/on-site.html Course Listings: Perl, http://teachmeperl.com/perllist.html UNIX/Shell, http://teachmeunix.com/unixlist.html Registration and Pricing: http://www.consultix-inc.com/reg.html Instructor Evaluations: http://www.consultix-inc.com/evals.html Course Evaluations: http://www.consultix-inc.com/course_evals.html *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Thu Nov 21 15:59:23 2002 From: tim at consultix-inc.com (Tim Maher) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Dec. Array(bio) Meeting Message-ID: <20021121135923.A18989@timji.consultix-inc.com> Tim, The following announcement may be of interest to SPUG members. Colin was kind enough to post an announcement for our October meeting and several SPUG members attended. If you want to provide announcements for upcoming SPUG meetings we would be happy to pass it on to our members. Thanks, Eric Olson ***************************************************************** December Meeting for array(bio) Mission Statement array(bio) provides a forum for biologists, software developers and business people to network and exchange information about the emerging field of bioinformation. Our meetings cover topics of general interest to the creation and development of software tools for biological discovery. December 10th Meeting "XML: The Future Language of Biology" Matthew T. Zeigler, IBM Life Sciences XML (Extensible Markup Language) is the universal format for structured documents and data on the web. Several leading organizations such as European Bioinformatics Institute, LION Biosciences (NetGenics), Rosetta Biosoftware have proposed new standards for defining biological information for use with XML. Matt will help us understand the current status these standards and discuss future biological applications based on XML. Date: December 10, 2002 Time: 7:00PM to 9:00PM Location Lake Washington Rowing Club: 910 N. Northlake Way Seattle, WA 98103 Pre registration is not required, but we would like to get an idea of how many to expect. For more information or to let us know that you plan on attending please contact - Eric Olson Phone: 206.336.5607 Email: eric@vizxlabs.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From pdarley at kinesis-cem.com Thu Nov 21 17:12:49 2002 From: pdarley at kinesis-cem.com (Peter Darley) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book Message-ID: Friends, I'm wondering if anyone can point me toward a book that is just a bound copy of the Perldoc man pages? Thanks, Peter Darley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Thu Nov 21 17:44:42 2002 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book In-Reply-To: References: Message-ID: <20021121234442.GA2752@ifokr.org> > I'm wondering if anyone can point me toward a book that is just a bound > copy of the Perldoc man pages? for module in `find /usr/lib/perl5 -name \*.pm -o -name \*.pod ` do perldoc $module | lpr done And hope you have a lot of paper... -- Brian Hatch UNIX is user friendly. Systems and It's just very selective Security Engineer about who its friends are. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20021121/9c09df87/attachment.bin From cmeyer at helvella.org Thu Nov 21 17:58:47 2002 From: cmeyer at helvella.org (Colin Meyer) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book In-Reply-To: <20021121234442.GA2752@ifokr.org>; from spug@ifokr.org on Thu, Nov 21, 2002 at 03:44:42PM -0800 References: <20021121234442.GA2752@ifokr.org> Message-ID: <20021121155847.A19731@hobart.helvella.org> On Thu, Nov 21, 2002 at 03:44:42PM -0800, Brian Hatch wrote: > > > > I'm wondering if anyone can point me toward a book that is just a bound > > copy of the Perldoc man pages? > > > for module in `find /usr/lib/perl5 -name \*.pm -o -name \*.pod ` > do > perldoc $module | lpr > done > > And hope you have a lot of paper... ... and a book binder. ;-) I believe the reason that no one publishes a bound version of the pods is because of the differing copyrights/licensing for each document. A lot of authors' permissions would need to be obtained Have fun, -Colin. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tnight at pobox.com Thu Nov 21 18:08:45 2002 From: tnight at pobox.com (Terry Nightingale) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book References: Message-ID: <3DDD758D.2020403@pobox.com> It includes the obligatory "much, much, more", but here's what I'd recommend: http://www.bestwebbuys.com/books/compare/isbn/0596000278/isrc/b-home-search Peter Darley wrote: > Friends, > I'm wondering if anyone can point me toward a book that is just a bound > copy of the Perldoc man pages? > Thanks, > Peter Darley > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org > > -- Terry Nightingale Web Developer, Philosopher, Geek "In theory, there is no difference between theory and practice. But, in practice, there is." -- Jan L.A. van de Snepscheut - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From Daniel.Pommert at verizonwireless.com Thu Nov 21 18:14:35 2002 From: Daniel.Pommert at verizonwireless.com (Pommert, Daniel) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book Message-ID: <9B30436F511ED5118EDF0002A55C318005790412@cairvexmb03.uswin.ad.vzwcorp.com> If you have a2ps installed, you will get a nicer printout with the perldoc line changed to: perldoc $module | a2ps --catman --center-title="$module" -- Daniel Pommert Verizon Wireless 425-603-8612 -----Original Message----- From: Brian Hatch [mailto:spug@ifokr.org] Sent: Thursday, November 21, 2002 3:45 PM To: Peter Darley Cc: SPUG Subject: Re: SPUG: Perldoc book > I'm wondering if anyone can point me toward a book that is just a bound > copy of the Perldoc man pages? for module in `find /usr/lib/perl5 -name \*.pm -o -name \*.pod ` do perldoc $module | lpr done And hope you have a lot of paper... -- Brian Hatch UNIX is user friendly. Systems and It's just very selective Security Engineer about who its friends are. http://www.ifokr.org/bri/ Every message PGP signed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From creede at penguinsinthenight.com Thu Nov 21 18:54:38 2002 From: creede at penguinsinthenight.com (Creede Lambard) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book In-Reply-To: <9B30436F511ED5118EDF0002A55C318005790412@cairvexmb03.uswin.ad.vzwcorp.com> References: <9B30436F511ED5118EDF0002A55C318005790412@cairvexmb03.uswin.ad.vzwcorp.com> Message-ID: <1037926478.1607.35.camel@svetlana> I believe that at one time the Perl Resource Kit from O'Reilly had a bound copy of most of the manual documentation, but I haven't looked for a while. My guess is that the reason no one does this is because it would go out of date so incredibly quickly. It would also be huge, and would include a lot of unusable stuff (ever seen a module where the documentation is something like "I intend to document this some day"??). Anyway that's my guess. On Thu, 2002-11-21 at 16:14, Pommert, Daniel wrote: > If you have a2ps installed, you will get a nicer printout with the perldoc > line changed to: > perldoc $module | a2ps --catman --center-title="$module" > > -- Daniel Pommert > Verizon Wireless > 425-603-8612 > > -----Original Message----- > From: Brian Hatch [mailto:spug@ifokr.org] > Sent: Thursday, November 21, 2002 3:45 PM > To: Peter Darley > Cc: SPUG > Subject: Re: SPUG: Perldoc book > > > > > > I'm wondering if anyone can point me toward a book that is just a > bound > > copy of the Perldoc man pages? > > > for module in `find /usr/lib/perl5 -name \*.pm -o -name \*.pod ` > do > perldoc $module | lpr > done > > And hope you have a lot of paper... > > -- > Brian Hatch UNIX is user friendly. > Systems and It's just very selective > Security Engineer about who its friends are. > http://www.ifokr.org/bri/ > > Every message PGP signed > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org -- * .~. `( --------------------------------------------------------------- ` / V \ . Creede Lambard : You are an individual! You are /( )\ creede@penguinsinthenight.com : unique! Just lke everyone else! ^^-^^ --------------------------------------------------------------- Perl Programmer and Linux Sysadmin, reasonable rates. Inquire within. GPG key at http://www.penguinsinthenight.com/creede_public_key.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/archives/spug-list/attachments/20021121/84eb2a90/attachment.bin From spug at ifokr.org Thu Nov 21 19:23:16 2002 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book In-Reply-To: <1037926478.1607.35.camel@svetlana> References: <9B30436F511ED5118EDF0002A55C318005790412@cairvexmb03.uswin.ad.vzwcorp.com> <1037926478.1607.35.camel@svetlana> Message-ID: <20021122012316.GB2752@ifokr.org> > I believe that at one time the Perl Resource Kit from O'Reilly had a > bound copy of most of the manual documentation, but I haven't looked for > a while. Did it, or did it just have some of the standard books, and the perldoc stuff on CD? > My guess is that the reason no one does this is because it would go out > of date so incredibly quickly. It would also be huge, and would include > a lot of unusable stuff (ever seen a module where the documentation is > something like "I intend to document this some day"??). Agreed. As to a previous supposition that the manuals may be copyrighted, don't they fall under the license of the perl module itself, and thus are probably GPL or Artistic License/etc? Which means you should be able to print and sell them just fine. (At least any of the modules installed with Perl are certainly going to be some form of Open Source/Free licensing.) -- Brian Hatch Cat. The other white meat. Systems and Security Engineer http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20021121/8846cf97/attachment.bin From creede at penguinsinthenight.com Thu Nov 21 19:28:58 2002 From: creede at penguinsinthenight.com (Creede Lambard) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book In-Reply-To: <20021122012316.GB2752@ifokr.org> References: <9B30436F511ED5118EDF0002A55C318005790412@cairvexmb03.uswin.ad.vzwcorp.com> <1037926478.1607.35.camel@svetlana> <20021122012316.GB2752@ifokr.org> Message-ID: <1037928537.12642.41.camel@svetlana> You're thinking of the Perl Bookshelf CD, which I have around here somewhere but haven't looked at in forever and can't remember what-all is on it. The PRK came with two books, each about the thickness of "Learning Perl" or slightly thicker, collectively called "Perl Module Reference". (I dug it out and looked. :) I don't THINK the Module Reference was on the CD (in its own right and not as the perldoc included in the modules), but I could be mistaken about that. On Thu, 2002-11-21 at 17:23, Brian Hatch wrote: > Did it, or did it just have some of the standard books, and > the perldoc stuff on CD? -- * .~. `( --------------------------------------------------------- ` / V \ . Creede Lambard : Never rush a miracle man. /( )\ creede@penguinsinthenight.com : You get rotten miracles. ^^-^^ --------------------------------------------------------- Perl Programmer and Linux Sysadmin, reasonable rates. Inquire within. GPG key at http://www.penguinsinthenight.com/creede_public_key.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/archives/spug-list/attachments/20021121/f2b04cca/attachment.bin From m3047 at inwa.net Thu Nov 21 20:00:47 2002 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: less noisy spot for after-meet gathering? Message-ID: I've been to three SPUG meetings now, and two of the after-meeting gatherings at Finn MacKool's (not to be confused with the McCool of Apache fame, I'm sure). My understanding about the choice of Finn's was that it was less crowded/noisy than the Big Time. But I still found it rather hard to carry on a conversation (I skipped this last one). There's got to be some \%place that's eval join( ' && ', map $place->{$_}, ('beer','quiet','udist') ); It's been a while since I spent any time in the U District, but I seem to recall that the College Inn Pub has a back room, and we might even be able to reserve it. Bit of a walk from SafeCo though, all the way down at 40th or so; wouldn't put me off. What else is there? Anybody else got any ideas? Does that hotel on 45th and Brooklyn have a lounge? (PS to Ingy & Mike: thanks for the stimulating breakfast conversation yesterday!) -- Fred Morris m3047@inwa.net 206.297.6344 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From ryanparr at thejamescompany.com Thu Nov 21 20:51:07 2002 From: ryanparr at thejamescompany.com (Ryan Parr) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book References: <3DDD758D.2020403@pobox.com> Message-ID: <003b01c291d2$02795160$920117ac@ISSQOA06688> Check out bookpool.com. Cheapest damn (new) tech-books I've ever seen. I've been using them for about 3 years and have never had any problems. http://www.bookpool.com/.x/q8ts4iz1w6/sm/0596000278 The "Programming Perl" book is only $30, but if you get $40 or more they'll ship it free. ----- Original Message ----- From: "Terry Nightingale" To: "Peter Darley" Cc: "SPUG" Sent: Thursday, November 21, 2002 4:08 PM Subject: Re: SPUG: Perldoc book > It includes the obligatory "much, much, more", but here's what I'd > recommend: > > http://www.bestwebbuys.com/books/compare/isbn/0596000278/isrc/b-home-search > > > Peter Darley wrote: > > Friends, > > I'm wondering if anyone can point me toward a book that is just a bound > > copy of the Perldoc man pages? > > Thanks, > > Peter Darley > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org > > > > > > -- > Terry Nightingale > Web Developer, Philosopher, Geek > "In theory, there is no difference between theory and practice. But, in > practice, there is." -- Jan L.A. van de Snepscheut > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Thu Nov 21 22:44:24 2002 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: less noisy spot for after-meet gathering? In-Reply-To: References: Message-ID: <20021121204424.A20231@timji.consultix-inc.com> On Thu, Nov 21, 2002 at 06:00:47PM -0800, Fred Morris wrote: > I've been to three SPUG meetings now, and two of the after-meeting > gatherings at Finn MacKool's (not to be confused with the McCool of Apache > fame, I'm sure). > > My understanding about the choice of Finn's was that it was less > crowded/noisy than the Big Time. But I still found it rather hard to carry > on a conversation (I skipped this last one). There's got to be some \%place > that's eval join( ' && ', map $place->{$_}, ('beer','quiet','udist') ); I second that emotion. And I can assure you that the Big Time is truly much noisier than McCool's. Also, during the first gathering you attended at McCool's, halloween festivities were going on, but even with that, I thought it was reasonably quiet. But if somebody knows of an even calmer venue for our after-meeting deliberations, by all means let's check it out! -Tim > > > It's been a while since I spent any time in the U District, but I seem to > recall that the College Inn Pub has a back room, and we might even be able > to reserve it. Bit of a walk from SafeCo though, all the way down at 40th > or so; wouldn't put me off. What else is there? Anybody else got any ideas? > Does that hotel on 45th and Brooklyn have a lounge? > > > (PS to Ingy & Mike: thanks for the stimulating breakfast conversation > yesterday!) > > -- > > Fred Morris > m3047@inwa.net > 206.297.6344 > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org -- -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | CLASSES: Hashes and Arrays in Perl: 12/5; Minimal Perl Programming: 12/6 | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From m3047 at inwa.net Thu Nov 21 23:27:16 2002 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:16 2004 Subject: useless brevity Was: Re: SPUG: less noisy spot for Message-ID: >On Thu, Nov 21, 2002 at 06:00:47PM -0800, Fred Morris wrote: >>[...] >> eval join( ' && ', map $place->{$_}, ('beer','quiet','udist') ); eval join( ' && ', @{$place}{'beer','quiet','udist'} ); For some reason taking a slice of a hash reference escaped me the first time... maybe because it's harder to grok, or is that just me? :-\ -- FWM m3047@inwa.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jonathan.souza at usg.sms.siemens.com Fri Nov 22 11:56:59 2002 From: jonathan.souza at usg.sms.siemens.com (Souza Jonathan) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book Message-ID: Check out Powells done in Portland. You can buy books through their website, often getting a 'used' (looks new to me) copy for a significant discount. The one caveat is that you can order a book that is in stock, but if a walk-in customer buys the last copy before the employee can grab it off the shelf, your order will be canceled. -----Original Message----- From: Creede Lambard [mailto:creede@penguinsinthenight.com] Sent: Thursday, November 21, 2002 5:29 PM To: Brian Hatch Cc: SPUG Subject: Re: SPUG: Perldoc book You're thinking of the Perl Bookshelf CD, which I have around here somewhere but haven't looked at in forever and can't remember what-all is on it. The PRK came with two books, each about the thickness of "Learning Perl" or slightly thicker, collectively called "Perl Module Reference". (I dug it out and looked. :) I don't THINK the Module Reference was on the CD (in its own right and not as the perldoc included in the modules), but I could be mistaken about that. On Thu, 2002-11-21 at 17:23, Brian Hatch wrote: > Did it, or did it just have some of the standard books, and > the perldoc stuff on CD? -- * .~. `( --------------------------------------------------------- ` / V \ . Creede Lambard : Never rush a miracle man. /( )\ creede@penguinsinthenight.com : You get rotten miracles. ^^-^^ --------------------------------------------------------- Perl Programmer and Linux Sysadmin, reasonable rates. Inquire within. GPG key at http://www.penguinsinthenight.com/creede_public_key.asc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20021122/9659cfe8/attachment.htm From pdarley at kinesis-cem.com Fri Nov 22 13:23:24 2002 From: pdarley at kinesis-cem.com (Peter Darley) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Perldoc book Message-ID: Friends, Thanks everyone for your suggestions on books. The reason this came up is that I was wading through the peripc file and thought that it would be nice to have in a book. I guess I'm going to pick up the Perl Cookbook. Thanks again, Peter Darley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Fri Nov 22 18:15:44 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: gloves found after Ingy talk Message-ID: I have a pair of rag wool gloves that was left at McCools. If they're yours (or you know who owns 'em), please let me know how to their (Mc)cool handed owner. Thanks, Michael -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Sun Nov 24 19:05:39 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:16 2004 Subject: [Correction] SPUG: gloves found after Ingy talk In-Reply-To: References: Message-ID: "Michael R. Wolf" writes: I have a pair of rag wool gloves that was left at McCools. If they're yours (or you know who owns 'em), please let me know how to return them to their (Mc)cool handed owner. Thanks, Michael -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Mon Nov 25 03:12:02 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: apre SPUG attributes [was Re: useless brevity] In-Reply-To: References: Message-ID: m3047@inwa.net (Fred Morris) writes: > >On Thu, Nov 21, 2002 at 06:00:47PM -0800, Fred Morris wrote: > >>[...] > >> eval join( ' && ', map $place->{$_}, ('beer','quiet','udist') ); > > eval join( ' && ', @{$place}{'beer','quiet','udist'} ); > > For some reason taking a slice of a hash reference escaped me the first > time... maybe because it's harder to grok, or is that just me? :-\ As long as you're slicing, here's how I'd model it. Of course, you can see my preference for smoke-free and talkable. What values would you (we) choose for $threshhold, %importance? And who knows real keys values for %apre_attributes? #! /usr/bin/perl -w my $threshhold = 70; my %importance = (udist => 10, beer => 5, talkable => 20, breathable => 50 ); my %apre_attributes = ( McCools => [qw(udist beer)], "Hale's Brew Pub" => [qw(beer)], # In Heaven, there is no beer. # That's why we drink it here. # 'Cause when we're gone from here, # our friends will be drinkin' all the beer. Heaven => [qw(talkable breathable)], Hell => [qw(beer)], "London Underground" => [], ### Your suggestions go here..... # ... # ... ); foreach $establishment (sort keys %apre_attributes) { my $affinity = eval join "+" => (0, @importance{ @{$apre_attributes{$establishment}} } ); $OK = ($affinity >= $threshhold) ? "+" : "-"; push @proposals, [$affinity, $OK, $establishment]; } map {printf "%3d %1s %s\n" => @{$_->[1]}[0..2] } sort {$b->[0] <=> $a->[0] } map {[$_->[0], $_]} @proposals; -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Sun Nov 24 22:54:00 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: less noisy spot for after-meet gathering? In-Reply-To: References: Message-ID: m3047@inwa.net (Fred Morris) writes: > My understanding about the choice of Finn's was that it was less > crowded/noisy than the Big Time. But I still found it rather hard to > carry on a conversation (I skipped this last one). There's got to be > some \%place that's eval join( ' && ', map $place->{$_}, > ('beer','quiet','udist') ); [...] > (PS to Ingy & Mike: thanks for the stimulating breakfast > conversation yesterday!) Facilitated by being in a quiet location! :-) -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Sun Nov 24 23:01:51 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: less noisy spot for after-meet gathering? In-Reply-To: References: Message-ID: m3047@inwa.net (Fred Morris) writes: > I've been to three SPUG meetings now, and two of the after-meeting > gatherings at Finn MacKool's (not to be confused with the McCool of > Apache fame, I'm sure). > > My understanding about the choice of Finn's was that it was less > crowded/noisy than the Big Time. The first time we tried it, it was. But it was only open for a week at the time. The juke box quarters have found this acoustically live box. [...] Having only attended 2 more meetings than you, I was about ready to suggest that we drop the beer in favor of quiet. Or possibly split into two groups -- talking and drinking. Suggestions: There's a buble tea place up the street. This *is* Seattle. We should be able to find a coffee house I'd actually prefer conversation over beer. But hey, I'm a big proponent of a "both" solution. While we're looking, I'll throw in my vote for smoke-free. It was really the noise-smoke combination that was getting me ready to propose an alternative. Michael -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From m3047 at inwa.net Mon Nov 25 18:29:47 2002 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: less noisy spot for after-meet gathering? Message-ID: Michael R. Wolf writes: >my $threshhold = 70; >my %importance = (udist => 10, > beer => 5, > talkable => 20, > breathable => 50 > ); A simple constraint analysis indicates that for this customer breathable is a drop-dead requirement, not subject to cost-benefit analysis. ;-) It's less important to me, although the wife is quitting smoking, so my coming home not smelling of cigs would probably be appreciated. (Obviously I've put up with her smoking, so...) Yeah, I don't know how much the U Dist really matters to me, either. How many people walk, and how many drive? Talkable seems like the most important one to me. Talking before a meeting is also possible, but sometimes you want to talk about what the subject of the meeting was, and quantum computing aside, I don't know how that's possible before the fact. >> (PS to Ingy & Mike: thanks for the stimulating breakfast >> conversation yesterday!) > >Facilitated by being in a quiet location! :-) Yeah. ;-) Luckily I have a job where my hours are somewhat flexible. -- Fred Morris m3047@inwa.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Mon Nov 25 19:36:13 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: SOHO XP Perl projects Message-ID: I've been pondering XP. I've read a bit. Used it a bit, usually under the name of common sense, or common practice. Never jumped in whole hog. I've been pondering a funded project in which to study its application. (Some would call it on the job (or contract) training.) Lacking that specifically funded connection, but way over-endowed with pondering time, I've been pondering XP at SOHO (Small Office, Home Office) locations. Like my small home office. Perhaps like yours? I've been avoiding some personal projects that could benefit from an outsiders' perspective. So I got to thinking some more... If XP is that good that we'd talk someone else to spending their money to support a team to use it, is it good enough to use at home on our own time? On our own dime? For Open Source? So I got to playing... In my mind. Perhaps it's time to play a bigger game... In the "real" world. I propose an XP play shop (work shops are sooo serious). Do any of you over-qualified, under-employed, over-creative, under-socially-engaged, over-temporally-abundant folks have a pet project that would benefit from being connected, in a pair-wise fashion, to another such person? Or even if you're not under-employed, do you have an out-of-work project that could benefit from the same team-ness that you have at work? If so, let's get together. A big XP mosh pit, if you will, to pair off and try pairwise programming functional testing refactoring simplifying metaphors integration planning amongst our SPUGly selves. I propose a Wednesday lunch (there's a $7 Indian buffet up the street from me) where we can quickly make a pitch for what we have and what we need, then pairwise spend the remaining part of the afternoon however it works out. [I know it's short notice, but I'm out of town next week, and this just occured to me yesterday. If it's sucessful, it will be repeated at other times and locations.] Please reply to the list, or call me (206/782-8377) if you're interested. The SPUGs go marching two by two, hurah, hurah..... -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Mon Nov 25 20:09:56 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: less noisy spot for after-meet gathering? In-Reply-To: References: Message-ID: m3047@inwa.net (Fred Morris) writes: > Michael R. Wolf writes: > >my $threshhold = 70; > >my %importance = (udist => 10, > > beer => 5, > > talkable => 20, > > breathable => 50 > > ); > > A simple constraint analysis indicates that for this customer breathable is > a drop-dead requirement, not subject to cost-benefit analysis. ;-) If you can't breathe, nothing else matters. -- Quote from American Lung Association fund drive envelope. [...] > Yeah, I don't know how much the U Dist really matters to me, either. How > many people walk, and how many drive? U Dist isn't really important. What's important is that we can get there while the topic's still hot. To that end, the Safeco cafeteria, just down the hall from the auditorium is optimal -- close, non-smoking, talkable. I'm not sure about their beer policy. Of course, we haven't been invited, either...... I really like the flow of this Dinner and pre-meeting talk (@ Cedars) walk to SPUG meeting (@ Safeco) walk to post-meeting talk (@ TBD) Let's keep the "walk to" as a constraint that facilitates discussion. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From rcordek at cmp.com Tue Nov 26 03:00:36 2002 From: rcordek at cmp.com (rcordek@cmp.com) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: Ron Cordek/SMO/CMPNotes is out of the office on business Message-ID: I will be out of the office starting 11/23/2002 and will not return until 12/02/2002. PLEASE READ THIS MESSAGE: I am traveling and will have minimal access to e-mail. Please contact me through voice mail or cell mail at 714-305-7313 if your need is urgent. For on-the-spot assistance, please contact Marquita Tinio at 650-513-4596 or mtinio@cmp.com. Thanks, and kindest regards, Ron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From humbaba9 at yahoo.com Tue Nov 26 12:30:23 2002 From: humbaba9 at yahoo.com (Meryll Larkin) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: less noisy spot for after-meet gathering? In-Reply-To: Message-ID: <20021126183023.24264.qmail@web12805.mail.yahoo.com> --- "Michael R. Wolf" wrote: > m3047@inwa.net (Fred Morris) writes: > > > Michael R. Wolf writes: > > >my $threshhold = 70; > > >my %importance = (udist => 10, > > > beer => 5, > > > talkable => 20, > > > breathable => 50 > > > ); > > > > A simple constraint analysis indicates that for this customer > breathable is > > a drop-dead requirement, not subject to cost-benefit analysis. ;-) > > If you can't breathe, nothing else matters. > -- Quote from American Lung Association fund drive envelope. > > [...] > > > Yeah, I don't know how much the U Dist really matters to me, > either. How > > many people walk, and how many drive? > > U Dist isn't really important. What's important is that we can get > there while the topic's still hot. To that end, the Safeco > cafeteria, > just down the hall from the auditorium is optimal -- close, > non-smoking, talkable. I'm not sure about their beer policy. Of > course, we haven't been invited, either...... > > I really like the flow of this > > Dinner and pre-meeting talk (@ Cedars) > walk to > SPUG meeting (@ Safeco) > walk to > post-meeting talk (@ TBD) > > Let's keep the "walk to" as a constraint that facilitates discussion. > > -- > Michael R. Wolf > All mammals learn by playing! > MichaelRunningWolf@att.net > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your > Email-address > For daily traffic, use spug-list for LIST ; for weekly, > spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: > http://seattleperl.org > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From humbaba9 at yahoo.com Tue Nov 26 12:52:56 2002 From: humbaba9 at yahoo.com (Meryll Larkin) Date: Wed Aug 4 00:09:16 2004 Subject: SPUG: A less noisy spot In-Reply-To: Message-ID: <20021126185256.31643.qmail@web12806.mail.yahoo.com> 11/26/02 Hi Folks, My Venn diagram says that any place meeting all those requirements wouldn't be in business in the U-Dist for long, but if you found a lounge that was an adjunct to something else, like maybe a hotel.... The Excaliber Lounge in the University Plaza Hotel Non smoking. Normally their hours are from 4:00pm to 10:00pm, which probably isn't late enough for us, but they will stay open longer if you give them a phone call in advance (phone call can be earlier that same day, but preferably one day advance warning) Excaliber Lounge in the University Plaza Hotel 400 NE 45th St 634-0100 extension 159 Armen Yousoufian (Sorry about the previous email with no content from me - my finger slipped) Meryll Larkin __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Mon Nov 25 21:47:04 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Perldoc book In-Reply-To: <1037928537.12642.41.camel@svetlana> References: <9B30436F511ED5118EDF0002A55C318005790412@cairvexmb03.uswin.ad.vzwcorp.com> <1037926478.1607.35.camel@svetlana> <20021122012316.GB2752@ifokr.org> <1037928537.12642.41.camel@svetlana> Message-ID: Creede Lambard writes: > You're thinking of the Perl Bookshelf CD, which I have around here ^^^^^^^^^^^^^^^^^ > somewhere but haven't looked at in forever and can't remember what-all > is on it. The PRK came with two books, each about the thickness of ^^^ > "Learning Perl" or slightly thicker, collectively called "Perl Module > Reference". (I dug it out and looked. :) I don't THINK the Module > Reference was on the CD (in its own right and not as the perldoc > included in the modules), but I could be mistaken about that. It wasn't clear to me that you meant two separate items: "Perl CD Bookshelf" and, PRK, "Perl Resource Kit". I've done some cut/paste from www.orielly.com - Perl Resource Kit -- Unix Edition (http://www.oreilly.com/catalog/prkunix/) I remember waiting for its 1997 release. It never had a second edition. It had 4 books in a bookcase box: 1. Perl Utilities Guide 2. Programming with Perl Modules 3-4. Perl Module Reference (2 books) - Perl CD Bookshelf, Version 3.0 (http://www.oreilly.com/catalog/perlcdbs3/index.html) I still have Version 1.0, which was never intended to run from a hard disk, since hard disk sizes weren't big enough to suck up entire CD's at the time. O'Reilly had a hack that allowed me to install it on a laptop, once disk drives grew big enough to run them locally. It has 7 books on the CD, and one paperback version: 1. second edition of Perl in a Nutshell (paperback version included), 2-3. the third editions of Learning Perl and Programming Perl, 4. the Perl Cookbook 5. Perl & XML, 6. Perl & LWP 7. Mastering Perl/Tk. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From m3047 at inwa.net Tue Nov 26 20:18:12 2002 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Ron Cordek/SMO/CMPNotes is out of the office on business Message-ID: So.... has anyone contacted either the cell #, or else Marquita? I have $0.05 ldx, and virtually free conferencing. Does anybody want to set a date and time? HAPPY BIRTHDAY, MR. CHIPS! CMP's gotta be pretty hip, we'd probably do better just going through the switchboard. ;-) >I will be out of the office starting 11/23/2002 and will not return until >12/02/2002. > >PLEASE READ THIS MESSAGE: > >I am traveling and will have minimal access to e-mail. Please contact me >through >voice mail or cell mail at 714-305-7313 if your need is urgent. For >on-the-spot >assistance, please contact Marquita Tinio at 650-513-4596 or mtinio@cmp.com. >Thanks, >and kindest regards, > >Ron - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From m3047 at inwa.net Tue Nov 26 20:18:12 2002 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Perldoc book Message-ID: The Perl Bookshelf CD is the tang on your file; the hammer to your primer; the spliv with your shiv; the beryl to your big bang. It's the thing, it's the thang. Sounds like an advertisement, and I guess it is. I only have version 2.0.. is there a 3.0? It's 5 books, and searchable, for cryin' out load. The meat and the meeting. Michael Wolf wrote: >Creede Lambard writes: > >> You're thinking of the Perl Bookshelf CD, which I have around here > ^^^^^^^^^^^^^^^^^ >> somewhere but haven't looked at in forever and can't remember what-all >> is on it. The PRK came with two books, each about the thickness of > ^^^ >> "Learning Perl" or slightly thicker, collectively called "Perl Module >> Reference". (I dug it out and looked. :) I don't THINK the Module >> Reference was on the CD (in its own right and not as the perldoc >> included in the modules), but I could be mistaken about that. > >It wasn't clear to me that you meant two separate items: > "Perl CD Bookshelf" and, > PRK, "Perl Resource Kit". Not much gravy, but plenty of sustenance. (When Cronenberg's _Naked Lunch_ comes out on the Voyager CD-ROM series, I'm buyin' it! DVD? nah.) -- Fred Morris m3047@inwa.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Wed Nov 27 12:34:20 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: SOHO XP Perl projects In-Reply-To: References: Message-ID: "Michael R. Wolf" writes: [...] > I propose an XP play shop (work shops are sooo serious). [...] > I propose a Wednesday lunch I got a few positive responses. It's not a ground swell, but it is a start. Let's meet at 1:00 at the Indian restaurant on the corner of Ballard Ave and Market Street. I'll be wearing a maroon cap. If you show up, we'll talk shop. If not, I'll still have a great lunch. Michael P.S. To those who sent email, I apologize for misplacing your email and not responding directly. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Thu Nov 28 11:09:13 2002 From: tim at consultix-inc.com (Tim Maher) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Some changes I'd like in Perl Message-ID: <20021128090913.A6369@timji.consultix-inc.com> SPUGsters, On this Thanksgiving day, I'm giving thanks to The Larry and all his elves for the marvelous free invention that is Perl! And in gratitude, and an effort to make Perl even more wonderful than it already is, I'm recommending some changes that have occurred to me either as a result of my extensive experience in teaching this language to newbies, or my own personal expectations as a long-time user of AWK, sed, grep, and the shells. None of these changes should be hard to implement, but I believe each would provide a worthwhile improvement to the language. Before I run these changes past the "Perl Gods", I thought I'd show them to the SPUG flock first, to obtain your comments (and possibly corrections). As an added bonus, some of you, especially those that don't use the AWK-ish -n/-p options much, might learn about some of Perl's capabilities that you didn't already know by studying my suggested changes. Incidentally, if anybody has recommendations on how I should submit these changes, I'd be grateful for your advice. I submitted a serious bug report concerning "Restricted Hashes" earlier this week, using "perlbug", and it went to the perl5porters list, where it's been vigorously ignored. If that's the reception real bugs get, what chance would I have with minor recommendations there? Maybe I should just email these suggestions directly to the pumpking? Who is that these days? Etc. . . . So without further ado, here's Tim Maher's "wish list' of (minor) changes to Perl. Happy Thanksgiving, -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | CLASSES: Hashes and Arrays in Perl: 12/5; Minimal Perl Programming: 12/6 | *----------------------------------------------------------------------------* Overview: 1) There should be a way to tell the In-Place-Editing option (-i) to use a unique string in composing the file-extension on the backup filename. 2) Perl programmers should have the ability to define a continue block within -n programs, or override the default continue block within -p programs. 3) There should be a variable that allows dynamic setting of the field separator (used by -a) during execution. 4) Perl needs a warning for misplaced statements that will be run within the implicit loop of -n/-p. 5) There should be a better warning when the -e option is used without a corresponding argument on the shebang line. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1) There should be a way to tell the In-Place-Editing option (-i) to use a unique string in composing the file-extension on the backup filename. COMMON MISTAKE: perl -wni.bak 's/this/that/' X # No print means file X emptied! # Changing -n to -p is the fix, # but running it now empties X.bak too! perl -wpi.bak 's/this/that/' X # Empty input files -> backups trashed! # We need the capability of using PIDs in filenames: perl -wpi_PID.bak 's/this/that/' * # X_3672.bak, Y_3672.bak, ... # some might prefer the following filename format, # for OS's with >3 chars allowed for file-extensions: perl -wpi.PID s/this/that/' * # X.3672, Y.3672 DISCUSSION Tragically, I've seen many students make the above mistake of neglecting to print $_ after doing in-place editing on "somefile", which causes it to become empty, although "somefile.bak" would be a valid copy of the original. And amazingly, the emotional response some have to the emptying-out of their input files is to immediately re-run the command, to see if it works better the second time (well, it will definitely run FASTER, having empty input files to copy over the backup files 8-{ ). Even worse, those who are wise enough to fix the mistake by changing -n to -p and then running the corrected program (which is a generally valid strategy), will also ruin their backup files, because if they neglected to change the "i.bak" specification to something else, the empty files under the original names will clobber the original backup files, causing the *loss of all the original data*! I personally fell into this trap once while doing: cd /pub_html; perl -wni.bak 's/this/that/' *.html When I realized my mistake, I pulled that line out of the shell's history and changed the -n to -p, and then, as is my custom, I went to insert a # in front of it before hitting , to store the command in my history so I could recover and run it later after restoring the *.bak files to their original names. But somehow the # didn't get there before I hit the (yes, after 24 years together VI still surprises me sometimes), and I trashed my backups! My personal experiences aside, what all perl programmers using in-place editing need is an easy way to create a unique backup filename for each run. Implementing this recommendation would prevent disasters of the kind I experienced, which apart from the obvious inconvenience of (hopefully recoverable) data loss is exactly the kind of thing that could easily turn an MIS manager against the language forever, and even lead to sensational reporting in the media that could be detrimental to Perl's reputation. One obvious option would be to recognize $$ in -i's argument as a request to use the PID of the perl process. But that would require single-quoting $$ at the UNIX shell level in -e programs, to prevent the shell from substituting it's own PID there, which of course would be the same for all runs (which wouldn't help a bit). So using $$ would create a burden on the programmer to single-quote the perl option string, and that's bad for three reasons: 1) weak shell programmers typically have lots of trouble with proper quoting techniques, 2) strong shell programmers know that requests for variable substitution are generally *double-quoted* (which would lead to disaster in this case), and 3) Perl programmers are not in the habit of quoting Perl's invocation-options. The result would undoubtedly be that many programmers would leave $$ unquoted, or double-quoted. And all we would have accomplished by recognizing $$ as -i's argument would be to make it hard and unnatural to use the feature that could help prevent the trashing of data files. My recommendation is to use the literal string "PID" as the request for $$ to be used in the backup filename(s). It would need no special quoting at the shell level, it clearly represents what it delivers, Perl's Process-ID, and it would help perl programmers avoid data-loss when using the in-place editing option. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2) Perl programmers should have the ability to define a continue block within -n programs, or override the default continue block within -p programs. # THIS WORKS: #! /usr/bin/perl -w while (<>) { $_ ne '' or next; print ; } continue { print "Finished with line $.\n"; } # BUT EXPLICIT continue{} TRIGGERS A SYNTAX ERROR: #! /usr/bin/perl -wn # while (<>) { $_ ne '' or next; print ; # } continue { print "Finished with line $.\n"; } DISCUSSION The problem is that continue blocks cannot be defined for the implicit loop provided by the -n/-p options (although -p causes a default $_-printing one to be included). This limitation is undesirable. Perl programmers using implicit loops should be allowed to define continue blocks. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 3) There should be a variable that allows dynamic setting of the field separator (used by -a) during execution. In AWK programs, one can define the field separator through two methods; awk -F':' ' program here' OR awk 'BEGIN {FS=":"}; program here' # FS can even be reset within # the implicit loop in response # to, for example, a change in # input data In comparison to the AWK examples above, Perl allows the invocation-argument form of setting the field separator, but, lacking the required variable, can't handle the second form: perl -wnaF':' -e 'program here' perl -wnaF':' -i'.bak' -e 'program here' OR perl 'BEGIN { ?? =":" }; program here' # NO SUCH CAPABILITY! This lack of a settable variable is a big disadvantage to Perl programmers working on platforms that impose the restriction of only a single option-cluster for shebang lines, because, for example, it means they'd have to omit the -i.bak option-cluster in the first example below. That could be retained, and the -F: replaced by a variable setting in BEGIN, if such a variable existed (as in the second example below) #! /usr/bin/perl -wnaF: -i.bak # -i.bak might not get parsed on OS! #! /usr/bin/perl -wnai.bak # This okay if can set IFS variable! DISCUSSION: Perl can do almost everything else that AWK can do, so why omit an "Input Field Separator" variable? This is especially incongruous in light of the fact that we have its output counterpart, "$,". This omission in Perl perplexes and annoys AWK refugees migrating to Perl. (Another great feature that's obviously missing is the ability to set the field separator to a *regex*, but at least we have a (manual) workaround for that using split.) Some time back, I asked Larry why there was no Awkish-FS variable, and he said "because my Mom says don't buy anything until you've felt the need for it on three separate occasions, and you're the first guy to ask for this!" What a guy! 8-} Larry's Mom gives excellent advice, I agree, but I think it's time to rectify this oversight, and diminish the degree by which "AWK has to be better at something" (another of my favorite Larry-isms). Perl doesn't have to be less able than AWK! And we won't hurt AWK's feelings by more completely emulating its (excellent, and 1977 ground-breaking) feature set. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4) Perl needs a warning for misplaced statements that will be run within the implicit loop of -n/-p. A warning is needed for the common newbie mistake, where statement(s) are placed above the BEGIN block, or below the END block, in a program using the -n (or -p) option. The unintended effect is as shown below: # Run following as "echo | ./scriptname" # To see that execution order matches statement numbers #! /usr/bin/perl -wln print 's2'; # I'm too lazy or deficient with VI # to put this statement within the BEGIN, # so I'll place it here to get *even earlier # execution* (yea, right!) BEGIN { print 's1'; } print 's3'; END { print 's5'; } print 's4'; # ditto for locating this here Perl should say: "Warning: statement(s) placed before BEGIN block or after END block will be run within implicit loop of -n/-p" DISCUSSION: Sure, in advanced Perl programming, there may be multiple BEGIN/END blocks strewn throughout the program, with no misconception at all about when the other statements in the file will be executed. But those programs won't typically be using -n/-p, which cause any statements that aren't physically within a BEGIN or END block to migrate into the scope of the (invisible) implicit loop. Beginners frequently run into trouble with this, and are perplexed at the execution order that results. A warning is all it would take to help them avoid this pitfall. Although "use" statements might at first blush seem to need similar treatment, they don't, because users don't (exactly) compose statements for them to run, and are generally oblivious to the actual execution order of the statements they generate automatically. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 5) There should be a better warning when the -e option is used without a corresponding argument on the shebang line. In my beginning Perl classes, I help get students oriented to the language by showing them perl -e incantations that replicate the functionality of grep and sed. Then, when we start writing scripts, some of them will typically include a trailing -e option in their shebang lines, like so: #! /usr/bin/perl -wne print "Why doesn't this print?\n"; The current warning is: Can't emulate -e on #! line at /tmp/shebang line 1. Or even worse, if there's a space following the -e in this kind of program, here named /tmp/shebang: #! /usr/bin/perl -we die; Bareword found where operator expected at -e line 1, near "/tmp/shebang" (Missing operator before hebang?) Unquoted string "hebang" may clash with future reserved word at -e line 1. syntax error at -e line 1, next token ??? Execution of -e aborted due to compilation errors. DISCUSSION A more useful warning than any of the above would be something like: The -e option requires a following argument that contains a perl program at /tmp/shebang line 1. And it would seem to be desirable that a -e followed only by a should not be interpreted any differently than a -e lacking the following . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From sthoenna at efn.org Thu Nov 28 12:22:03 2002 From: sthoenna at efn.org (Allen Scott-Thoennes) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Some changes I'd like in Perl References: <20021128090913.A6369@timji.consultix-inc.com> Message-ID: On Thu, 28 Nov 2002 09:09:13 -0800, tim@consultix-inc.com wrote: >I submitted a serious bug report concerning "Restricted >Hashes" earlier this week, using "perlbug", and it went to >the perl5porters list, where it's been vigorously ignored. I saw it and started to take a look at it. You'll find the reception bugs get varies quite a lot based on how busy people are and whether or not it catches the eye of someone familiar with a particular piece of perl. In general, I'd recommend resending a bug report to perl5-porters@perl.org (with the assigned bug-id in the subject) if a week goes by with no response. >If that's the reception real bugs get, what chance would I >have with minor recommendations there? Maybe I should just >email these suggestions directly to the pumpking? Who is that >these days? Etc. . . . Hugo van der Sanden is the pumpking. But he would probably just bounce your mail to p5p, so you might as well start there. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From sthoenna at efn.org Fri Nov 29 11:46:08 2002 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Some changes I'd like in Perl In-Reply-To: <20021128090913.A6369@timji.consultix-inc.com> References: <20021128090913.A6369@timji.consultix-inc.com> Message-ID: On Thu, 28 Nov 2002 09:09:13 -0800, tim@consultix-inc.com wrote: >1) There should be a way to tell the In-Place-Editing option (-i) >to use a unique string in composing the file-extension on the backup >filename. Right now, you can do: perl -ni -we'BEGIN { $^I = ".$$" } ...' Or given a PidBackup.pm: # Make inplace edit backup contain our pid. If a backup extension is # set and contains '$$', the actual pid will be substituted. # Otherwise, the extension will be set to "." followed by our pid. BEGIN { if (!defined $^I) { warn "PidBackup used without -i switch" } else { $^I =~ s/\$\$/$$/ or $^I = ".$$" } } 1; perl -MPidBackup -ni -we' ... ' Given that there is a way to do this, I'd hesitate to add a special case for "PID", even at the cost of making it much harder to type. YMMV. You might also take a look at the recent "edit <> files in place is not atomic" thread on perl5-porters. >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >2) Perl programmers should have the ability to define a continue >block within -n programs, or override the default continue >block within -p programs. You can actually do this. Try: perl -wlne'$_ ne "" or next; print } continue { print "Finished with line $." ' That is, you have to say -e'foo } continue { bar' where foo is the body of the loop and bar is the contents of the continue block. >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >3) There should be a variable that allows dynamic setting of the field >separator (used by -a) during execution. This should be done. I'd suggest $^FS. >(Another great feature that's obviously missing is >the ability to set the field separator to a *regex*, but at >least we have a (manual) workaround for that using split.) I think it is a regex. >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >4) Perl needs a warning for misplaced statements that will be run >within the implicit loop of -n/-p. > >A warning is needed for the common newbie mistake, where >statement(s) are placed above the BEGIN block, or below the END >block, in a program using the -n (or -p) option. I've never seen this mistake, so have no opinion. >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >5) There should be a better warning when the -e option is used >without a corresponding argument on the shebang line. >A more useful warning than any of the above would be something like: > > The -e option requires a following argument that contains > a perl program at /tmp/shebang line 1. Sounds good. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Fri Nov 29 14:56:27 2002 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Some changes I'd like in Perl In-Reply-To: References: <20021128090913.A6369@timji.consultix-inc.com> Message-ID: <20021129125627.A11100@timji.consultix-inc.com> On Fri, Nov 29, 2002 at 09:46:08AM -0800, Yitzchak Scott-Thoennes wrote: > On Thu, 28 Nov 2002 09:09:13 -0800, tim@consultix-inc.com wrote: > >1) There should be a way to tell the In-Place-Editing option (-i) > >to use a unique string in composing the file-extension on the backup > >filename. > > Right now, you can do: > > perl -ni -we'BEGIN { $^I = ".$$" } ...' > > Or given a PidBackup.pm: > # Make inplace edit backup contain our pid. If a backup extension is > # set and contains '$$', the actual pid will be substituted. > # Otherwise, the extension will be set to "." followed by our pid. > BEGIN { > if (!defined $^I) { warn "PidBackup used without -i switch" } > else { $^I =~ s/\$\$/$$/ or $^I = ".$$" } > } > 1; > perl -MPidBackup -ni -we' ... ' > > Given that there is a way to do this, I'd hesitate to add a special > case for "PID", even at the cost of making it much harder to type. > YMMV. I disagree, because I think options that are critical to the preservation of file data should be very easy to use, especially by beginners. But in the meantime the workarounds you show above could be useful. > You might also take a look at the recent "edit <> files in place is > not atomic" thread on perl5-porters. I saw that, but it addresses a totally different (and more important) subject. > >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > >2) Perl programmers should have the ability to define a continue > >block within -n programs, or override the default continue > >block within -p programs. > > You can actually do this. Try: > perl -wlne'$_ ne "" or next; print } continue { print "Finished with line $." ' > > That is, you have to say -e'foo } continue { bar' where foo is the body of the > loop and bar is the contents of the continue block. Right, but at that point it would be simpler to dispense with the -n altogether and just write your own loop, to keep from going crazy! I admire your ingenuity for sneaking a continue block into the implicit -n loop, but I'd like a more conventional way to accomplish this goal, that would work with -p also. > >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > >3) There should be a variable that allows dynamic setting of the field > >separator (used by -a) during execution. > > This should be done. I'd suggest $^FS. ** I'm delighted to see that you didn't have another wacky workaround for this one too! 8-} > >(Another great feature that's obviously missing is > >the ability to set the field separator to a *regex*, but at > >least we have a (manual) workaround for that using split.) > > I think it is a regex. I do too, now that you've encouraged me to revisit this issue, and confirm that it is indeed a pattern now (it wasn't in Perl 4, and I guess I hadn't noticed the change in Perl5). This proves it: $ perl -wnaF'[\040\t]' -MO=Deparse -e 'print $F[0],"\n"' BEGIN { $^W = 1; } LINE: while (defined($_ = )) { our(@F) = split(/[\040\t]/, $_, 0); print $F[0], "\n"; } -e syntax OK Thanks a bunch, Yitzchak, for your helpful comments and ingenious (if slightly deranged!) solution to the -n/continue-block problem. Now you've got me curious to know more about you. I know you work(ed) on the Reefknot project, and I've seen some postings from you on p5p, but that's it. So where do you work, where do you live, when would you like to share your knowledge by making a presentation to SPUG, etc.? 9-} -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | CLASSES: Hashes and Arrays in Perl: 12/5; Minimal Perl Programming: 12/6 | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From ced at carios2.ca.boeing.com Fri Nov 29 20:55:21 2002 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Some changes I'd like in Perl Message-ID: <200211300255.SAA07614@carios2.ca.boeing.com> On Fri, Nov 29, 2002 at 09:46:08AM -0800, Yitzchak Scott-Thoennes wrote: .... > > You can actually do this. Try: > perl -wlne'$_ ne "" or next; print } continue { print "Finished with line $." ' > > That is, you have to say -e'foo } continue { bar' where foo is the body of the > loop and bar is the contents of the continue block. |Right, but at that point it would be simpler to dispense with the -n |altogether and just write your own loop, to keep from going crazy! |I admire your ingenuity for sneaking a continue block into the implicit |-n loop, but I'd like a more conventional way to accomplish this goal, Actually, I seem to recall Abigail (a wonderfully deranged hacker) came up with this first. |that would work with -p also. Just to prove you can, here's a doodle to plumb the depths of silliness :) perl -wlpe '$_ ne "" or next } continue { print;print "Finished with line $."; exit if eof}{' -- Charles DeRykus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Fri Nov 29 22:42:43 2002 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Some changes I'd like in Perl In-Reply-To: <200211300255.SAA07614@carios2.ca.boeing.com> References: <200211300255.SAA07614@carios2.ca.boeing.com> Message-ID: <20021129204156.A14861@timji.consultix-inc.com> On Fri, Nov 29, 2002 at 06:55:21PM -0800, ced@carios2.ca.boeing.com wrote: > > Actually, I seem to recall Abigail (a wonderfully deranged hacker) > came up with this first. Yes, s/he's deranged, but very interesting. A real out-of-the-box thinker! I spent some time with him at YAPC/Amsterdam last year. > |that would work with -p also. > > Just to prove you can, here's a doodle to plumb the depths of silliness :) > > perl -wlpe '$_ ne "" or next } continue { print;print "Finished with line $."; > exit if eof}{' > -- > Charles DeRykus Aw, c'mon Charles; look what your forcing the poor compiler to swallow; *two* continue blocks, and an empty ; block too! BEGIN { $^W = 1; } BEGIN { $/ = "\n"; $\ = "\n"; } LINE: while (defined($_ = )) { chomp $_; next unless $_ ne ''; } continue { print $_; print "Finished with line $."; exit if eof; } { ; } continue { die "-p destination: $!\n" unless print $_; } -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | CLASSES: Hashes and Arrays in Perl: 12/5; Minimal Perl Programming: 12/6 | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Sat Nov 30 14:25:45 2002 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:17 2004 Subject: SPUG: Re: Some changes I'd like to see in Perl In-Reply-To: <200211301901.gAUJ1EO23639@mail.pm.org> References: <200211301901.gAUJ1EO23639@mail.pm.org> Message-ID: <20021130122545.A16786@timji.consultix-inc.com> On Sat, Nov 30, 2002 at 01:01:14PM -0600, owner-spug-list@pm.org wrote: > SPUG-list-owner wrote: > > > On Fri, Nov 29, 2002 at 09:46:08AM -0800, Yitzchak Scott-Thoennes wrote: > > > On Thu, 28 Nov 2002 09:09:13 -0800, tim@consultix-inc.com wrote: > > > >1) There should be a way to tell the In-Place-Editing option (-i) > > > >to use a unique string in composing the file-extension on the backup > > > >filename. > > > > > > Right now, you can do: > > > > > > perl -ni -we'BEGIN { $^I = ".$$" } ...' > > > > > > Given that there is a way to do this, I'd hesitate to add a special > > > case for "PID", even at the cost of making it much harder to type. > > > YMMV. > > > > I disagree, because I think options that are critical to the preservation > > of file data should be very easy to use, especially by beginners. > > But in the meantime the workarounds you show above could be useful. > > But I don't think that you ever actually lose any data unless you rm all those > *.bak (or *.bak.bak or *.bak.bak.bak depending on how insistent you are at > first :)) files. You can always go back with something like this (from a sh): > Scott, You're quite mistaken about the data loss being unlikely; if you run perl -wni.bak 's/a/b/' *.html # should have used -n, not -p! twice in a row, the original abc.html.bak file gets clobbered by the (empty, after first run) abc.html file's contents, and now both abc.html* files are empty. Students routinely do this in my classes (some presumably think pressing the harder the second time might make a difference 8-}), and I accidentally do it myself periodically (for various reasons documented in the original posting) So this is a real problem! > find . -name '*.bak' -print | > while read f > do b=`echo "$f" | sed 's/\.bak$//'` > mv $f $b > done > > Or something similar to rename all the *.bak.bak files back after the 2nd run. You're assuming a filename pattern of *, in which case your point is correct. But for the more general case of any arbitrary filename, as I've indicated above, the potential of data loss remains. > Personally, I would avoid assigning special meaning to any bare sequence of > letters like that. If you want to do this, I'd go with some special character > sequence (e.g. printf style strings like > > perl -ni.%P > > for getting a PID in there or > > perl -ni%E > > to get an emacs-style backup file sequence number in there or whatever). That > way you avoid turning words into alphanumerics... > > perl -ni.INTREPID > Scott Good point! I'll take your suggestion. -- -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | CLASSES: Hashes and Arrays in Perl: 12/5; Minimal Perl Programming: 12/6 | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Sat Nov 30 20:49:26 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:18 2004 Subject: SPUG: Some changes I'd like in Perl In-Reply-To: <20021128090913.A6369@timji.consultix-inc.com> References: <20021128090913.A6369@timji.consultix-inc.com> Message-ID: Tim Maher writes: > SPUGsters, > > On this Thanksgiving day, I'm giving thanks to The Larry and > all his elves for the marvelous free invention that is Perl! Here, here! ( or is it "Hear, hear!"? I've only heard it, not seen it in print.) > As an added bonus, some of you, especially those that don't > use the AWK-ish -n/-p options much, might learn about some of To crisp it up, I'd say awk-ish -n (or sed-ish -p) The -n is very awk-ish and the -n is very sed-ish. And, I'll bet Aho, Kernighan, and Weinberger don't like AWK any more than Larry likes PERL. But I'll bet they don't have the distinction that Perl is a language, and therefore a capitalized proper noun. And it's all run through perl, a command, that is Perl's compiler/interpreter. I could be mistaken. Does the documentation refer to awk, Awk, or AWK? [...] > 1) There should be a way to tell the In-Place-Editing option > (-i) to use a unique string in composing the file-extension on > the backup filename. My first thought was to create a module. Before I could respond, Yitzchak (A.K.A. Allen?) came up with a good start, then added the sprintf(3)-like (or time(1)-like) percent arguments. I like those ideas. Let me add a few. Definately have the module prevent overwrites of good data files. Perhaps you could parameterize the module to do perform standard backup file namings. [I can't think of a 2-deep namespace without getting overwhelmed with the GetOpt::* over-over-over-loaded namespace. As an added benefit, perhaps you cold ask Ingy to use Inline::Edit. Naw, too confusing, even if it is glamourous. You'll have to get your 15 minutes elsewhere.] use InlineEdit; use InlineEdit (:numeric_version:); # use numeric increments in $^I use InlineEdit (:PID_version:); # use PID in $^I use InlineEdit (:truncatable:); # allow empty output to truncate use InlineEdit (:emacs_version:); # use emacs bacup file names use InlineEdit (:VMS_version:); # use VMS version number syntax use InlineEdit (:native_version); The biggest unknown at this point in my knowledge would be how to catch the @ARGV array shifting into $ARGV. How does this happen with respect to inline editing? Is there a way to catch this shift as the input file is being backed up and opened? If so, these "well known" renaming conventions, and over-write protections could be applied at that point. In addition, a stop_file_hook and start_file_hook function (ala emacs) could be called to do whatever "interesting" checks or transformations were necessary for the previous/next file. For instance, a "chmod -w" would be great to apply to the backup file. At the very least, it would allow the normal file system permissions to prevent the double-shot foot shooting problem. (And yes, I've done a similar double-shot problem. There *is* an _instinct_, in violation of my _training_, that has me try it a second time to see if it works. Perhaps I'm applying a hardware algorithm to software, but I grew up in a hardware body in a hardware world gaining hardware experience.) [...] > Some time back, I asked Larry why there was no Awkish-FS > variable, and he said "because my Mom says don't buy anything > until you've felt the need for it on three separate occasions, > and you're the first guy to ask for this!" What a guy! 8-} Have you run a simple awk program through a2p(1) to see what Larry would have given to his mother had she had grown up in awk-land? [...] > # Run following as "echo | ./scriptname" > # To see that execution order matches statement numbers > #! /usr/bin/perl -wln > > print 's2'; # I'm too lazy or deficient with VI > # to put this statement within the BEGIN, > # so I'll place it here to get *even earlier > # execution* (yea, right!) > > BEGIN { print 's1'; } > print 's3'; > END { print 's5'; } > > print 's4'; # ditto for locating this here > > Perl should say: "Warning: statement(s) placed before BEGIN block or > after END block will be run within implicit loop of -n/-p" > FYI -- My perl doesn't give me that warning: This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Binary build 633 provided by ActiveState Corp. http://www.ActiveState.com Built 21:33:05 Jun 17 2002 Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. [...] -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Sat Nov 30 19:49:23 2002 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:18 2004 Subject: SPUG: Perldoc book In-Reply-To: References: Message-ID: m3047@inwa.net (Fred Morris) writes: [...] > Sounds like an advertisement, and I guess it is. Just the facts, ma'am. > I only have version 2.0.. is there a 3.0? Yes. And I guess you've stirred within me that deepest of all feeling -- CD envy. Mine's only edition 1. > It's 5 books, and searchable, for cryin' out load. The meat and the meeting. It's 7 books with the editon 3. [...] -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org