Attach iCal event to an cgi mail

2012-06-04 Thread Marek
Hello all! I made up a script for a taxi company to order a taxi. Everything is working. I have only problems to attach an iCal event, so that you only have to click on it and it is in your iCalendar. The shortened script for mailing an attached file for the iCal event is doing nothing,

RE: Raspberry Pi for Beginners (and developers ;)

2012-06-04 Thread Bob McConnell
From: Bill Stephenson :) No, there's no sales pitch... The Raspberry Pi is a legit project, nonprofit and meant for educational purposes. But that doesn't mean we can't buy and sell them for commercial purposes. That helps them too. They need volume to keep cost down, and they need

Re: mod_perl for n00bs

2012-06-04 Thread Mark Haney
On 06/03/2012 07:30 PM, Chris Nehren wrote: Don't, unless you're writing Apache modules in Perl. There are much better choices for doing web dev in Perl, like Catalyst, Dancer, Web::Simple, etc., which all use Plack/PSGI. These can all be deployed on any web server. Well, from all I've read

Re: mod_perl for n00bs

2012-06-04 Thread Chris Nehren
On Mon, Jun 04, 2012 at 08:42:43 -0400 , Mark Haney wrote: On 06/03/2012 07:30 PM, Chris Nehren wrote: Don't, unless you're writing Apache modules in Perl. There are much better choices for doing web dev in Perl, like Catalyst, Dancer, Web::Simple, etc., which all use Plack/PSGI. These can

Re: mod_perl for n00bs

2012-06-04 Thread Mark Haney
On 06/04/2012 09:57 AM, Chris Nehren wrote: Erg. CGI.pm is a terrible idea--runtime string eval and all that silliness. Please investigate one of the lighter Plack/PSGI frameworks like Dancer and Web::Simple. Really, mod_perl is the wrong tool for the job here. It's for writing Apache modules

Re: mod_perl for n00bs

2012-06-04 Thread Chris Nehren
On Mon, Jun 04, 2012 at 11:36:21 -0400 , Mark Haney wrote: On 06/04/2012 09:57 AM, Chris Nehren wrote: Erg. CGI.pm is a terrible idea--runtime string eval and all that silliness. Please investigate one of the lighter Plack/PSGI frameworks like Dancer and Web::Simple. Really, mod_perl is

subroutine returning data

2012-06-04 Thread Chris Stinemetz
I have a subroutine that I want to return 1 only if the value of %{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences. Any suggestions is greatly appreciated. Thank you, Chris sub site_offAir { for (values %{$href-{$_[0]}}) { return 1 if $_ eq 'ND'; #need to test all values are

Re: subroutine returning data

2012-06-04 Thread Paul Johnson
On Mon, Jun 04, 2012 at 11:30:30AM -0500, Chris Stinemetz wrote: I have a subroutine that I want to return 1 only if the value of %{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences. Any suggestions is greatly appreciated. Thank you, Chris sub site_offAir { for (values

Re: mod_perl for n00bs

2012-06-04 Thread Bill Stephenson
On Jun 4, 2012, at 8:57 AM, Chris Nehren wrote: Well, from all I've read and been told is that mod_perl is a better fit than using CGI.pm like I've been doing. Erg. CGI.pm is a terrible idea--runtime string eval and all that silliness. Well, again, I disagree with that. This came up

Re: subroutine returning data

2012-06-04 Thread Bill Stephenson
On Jun 4, 2012, at 11:30 AM, Chris Stinemetz wrote: I have a subroutine that I want to return 1 only if the value of %{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences. Any suggestions is greatly appreciated. Chris, I don't know how to read your hash directly (hash of hashes?)

Re: subroutine returning data

2012-06-04 Thread Shawn H Corey
On 12-06-04 12:30 PM, Chris Stinemetz wrote: I have a subroutine that I want to return 1 only if the value of %{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences. Any suggestions is greatly appreciated. Thank you, Chris sub site_offAir { for (values %{$href-{$_[0]}}) {

Re: subroutine returning data

2012-06-04 Thread Bill Stephenson
Thanks Shawn! The values %{$href-{$_[0]}} code is pretty ugly but I get it now. And it make sense to break out of the loop as soon as you don't pass the test. Kindest Regards, Bill Stephenson On Jun 4, 2012, at 12:49 PM, Shawn H Corey wrote: On 12-06-04 12:30 PM, Chris Stinemetz wrote:

Re: subroutine returning data

2012-06-04 Thread Shawn H Corey
On 12-06-04 02:01 PM, Bill Stephenson wrote: The values %{$href-{$_[0]}} code is pretty ugly but I get it now. And it make sense to break out of the loop as soon as you don't pass the test. sub site_offAir { my $site_id = shift @_; for my $activity_code ( values %{

Re: subroutine returning data

2012-06-04 Thread Chris Stinemetz
Thank you everyone. Your help has been very helpful.. Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: subroutine returning data

2012-06-04 Thread John W. Krahn
Chris Stinemetz wrote: I have a subroutine that I want to return 1 only if the value of %{$href-{$_[0]}} is equal to 'ND' for the whole 24 occurences. One way to do it: sub site_offAir { return values %{ $href-{ $_[ 0 ] } } == grep( $_ eq 'ND', values %{ $href-{ $_[ 0 ] } } ) ? 1 : '';

Re: mod_perl for n00bs

2012-06-04 Thread pangj
I want to understand why Mark thinks he needs mod_perl. If it's just because he wants to speed up his app (soup up the engine) there might be things he can do that don't require rewriting a lot of code, or spending a lot of time learning a lot of new ways of doing things. Me second. If the