From max at alleged.net Tue Aug 17 17:43:27 2010 From: max at alleged.net (Max) Date: Tue, 17 Aug 2010 20:43:27 -0400 Subject: [kw-pm] BBQ Social This Thursday! Message-ID: <4C6B2CAF.4030509@alleged.net> Hello everyone, As you may know, this Thursday is the KW-PM n-th annual barbecue. Spouses and children are welcome, as well as any geeky appliances. A barbecue and a pool will be available, so bring grillable food and/or swim suits as appropriate. I'll also have a selection of burgers and soda on hand. I expect more people will come then I have outdoor furniture, so bring lawn chairs if possible! The event will be occurring at: 519 Edenbrook Pl., Waterloo, ON Carpooling should be available: ask on the list or IRC. I'm less then a 10 minute drive from UW, close to the Northfield expressway exit, and close to a route 9 bus stop. *** RSVPs would be appreciated, so I can plan on how much supplies to prepare. Please also let me know if you have dietary restrictions you'd like me to accommodate. *** Cheers, Max From roberthpike at yahoo.com Wed Aug 25 08:21:18 2010 From: roberthpike at yahoo.com (Robert Pike) Date: Wed, 25 Aug 2010 08:21:18 -0700 (PDT) Subject: [kw-pm] File I/O Message-ID: <884831.84301.qm@web120506.mail.ne1.yahoo.com> Hey all, Wondering what people most commonly use to open, lock, read, update, and write back to a file. I've been looking at using the open function along with +> but cannot seem to read from the filehandle using the following piece of code (just simple test code) : open(FH, "+>somepath"); my @ca = ; print join("
", @ca); // prints nothing to the screen I was wondering what alternatives peopel would give to the above code but also an explanation to why the above code doesn't result in the printing of the contents of the file (to the screen)? Thanks in advance for any insight given. Rob From kw-pm at datademons.com Wed Aug 25 08:25:44 2010 From: kw-pm at datademons.com (Justin Wheeler) Date: Wed, 25 Aug 2010 11:25:44 -0400 (EDT) Subject: [kw-pm] File I/O In-Reply-To: <884831.84301.qm@web120506.mail.ne1.yahoo.com> References: <884831.84301.qm@web120506.mail.ne1.yahoo.com> Message-ID: >From perlfunc -f open: thus '+<' is almost always preferred for read/write updates--the '+>' mode would clobber the file first. Justin On Wed, 25 Aug 2010, Robert Pike wrote: > Hey all, > Wondering what people most commonly use to open, lock, read, update, and write back to a file. I've been looking at using the open function along with +> but cannot seem to read from the filehandle using the following piece of code (just simple test code) : > > open(FH, "+>somepath"); > my @ca = ; > print join("
", @ca); // prints nothing to the screen > > I was wondering what alternatives peopel would give to the above code but also an explanation to why the above code doesn't result in the printing of the contents of the file (to the screen)? Thanks in advance for any insight given. > > Rob > > > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > From matt at sergeant.org Fri Aug 27 07:04:43 2010 From: matt at sergeant.org (Matt Sergeant) Date: Fri, 27 Aug 2010 10:04:43 -0400 Subject: [kw-pm] File I/O In-Reply-To: <884831.84301.qm@web120506.mail.ne1.yahoo.com> References: <884831.84301.qm@web120506.mail.ne1.yahoo.com> Message-ID: <4C77C5FB.8030704@sergeant.org> Read perlopentut. It has a section on "hit counters" which is probably what you want. Robert Pike wrote: > Hey all, > Wondering what people most commonly use to open, lock, read, update, and write back to a file. I've been looking at using the open function along with +> but cannot seem to read from the filehandle using the following piece of code (just simple test code) : > > open(FH, "+>somepath"); > my @ca =; > print join("
", @ca); // prints nothing to the screen > > I was wondering what alternatives peopel would give to the above code but also an explanation to why the above code doesn't result in the printing of the contents of the file (to the screen)? Thanks in advance for any insight given. > > Rob > > > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > > From roberthpike at yahoo.com Mon Aug 30 12:29:24 2010 From: roberthpike at yahoo.com (Robert Pike) Date: Mon, 30 Aug 2010 12:29:24 -0700 (PDT) Subject: [kw-pm] jQuery / Perl question Message-ID: <238876.43751.qm@web120502.mail.ne1.yahoo.com> Hi all, I'm attempting to make an Ajax call to a perl application residing on my computer. One of the fields I'm adding onto the URL to send may have an ampersand in it. I want to encode any special characters to put onto the URL and then have those values be accessible within the perl application on the server. I'm using jQuery's serialize method to do the conversion and the value passed in (i.e. something&something) is being converted "properly" (i.e. something%26something). On the server, however, the value accepted looks like somethingsomething (disregarding the encoded & being passed). I'm creating a CGI object within the Perl script to handle the form data coming in. Can explain to me what needs to be done (using this technique) to accomplish the task of converting special characters at the client end to then pass successfully to the server? Or is there better way of accompishing the same task that you can suggest? Thanks in advance for any helpful advice / suggestions. Rob From broadswd at gmail.com Mon Aug 30 16:24:00 2010 From: broadswd at gmail.com (Raymond) Date: Mon, 30 Aug 2010 19:24:00 -0400 Subject: [kw-pm] jQuery / Perl question In-Reply-To: <238876.43751.qm@web120502.mail.ne1.yahoo.com> References: <238876.43751.qm@web120502.mail.ne1.yahoo.com> Message-ID: CGI.pm (or Apache request object if under mod_perl) query and form handling functions automatically handle all of that. http://perldoc.perl.org/CGI.html On 30 August 2010 15:29, Robert Pike wrote: > Hi all, > ? I'm attempting to make an Ajax call to a perl application residing on my computer. > ? One of the fields I'm adding onto the URL to send may have an ampersand in it. I want to encode any special characters to put onto the URL and then have those values be accessible within the perl application on the server. I'm using jQuery's serialize method to do the conversion and the value passed in (i.e. something&something) is being converted "properly" (i.e. something%26something). > ? On the server, however, the value accepted looks like somethingsomething (disregarding the encoded & being passed). I'm creating a CGI object within the Perl script to handle the form data coming in. > ? Can explain to me what needs to be done (using this technique) to accomplish the task of converting special characters at the client end to then pass successfully to the server? Or is there better way of accompishing the same task that you can suggest? > ? Thanks in advance for any helpful advice / suggestions. > > Rob > > > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm >