From mboyko at excite.com Thu Aug 1 07:52:05 2002
From: mboyko at excite.com (Mike Boyko)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: meeting rehashed
Message-ID: <20020801125205.6D55E3DDA@xmxpita.excite.com>
So what *is* the state of employment for perl programmers in the twin cities?
I had intended to go to that meeting last night, until my car stopped running a block from my house.
That had been the very topic I wanted to bring up, as I am looking for work. =)
____
Mike
--- On Wed 07/31, Thomas Eibner wrote:
From: Thomas Eibner [mailto: thomas@stderr.net]
To: mpls@pm.org
Date: Thu, 1 Aug 2002 05:51:19 +0200
Subject: [mplspm]: meeting rehashed
> Well, a few guys showed up and we had a nice discussion covering several
> topics including state of contracting work in the Minneapolis/St. Paul
> area, employment situation, current projects, and I brought up the
> question of the perl mongers group maybe colaborating on a project or
> two if there was enough interest. In that discussion Dave brought up a
> potential project; a book review site for the Perl Community. Would
> anyone be interested in helping out?
>
> --
> Thomas Eibner DnsZone
>
> mod_pointer
>
> !(C)
>
> Putting the HEST in .COM
>
>
> --------------------------------------------------
> Minneapolis Perl Mongers mailing list
>
> To unsubscribe, send mail to majordomo@pm.org
> with "unsubscribe mpls" in the body of the message.
>
------------------------------------------------
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From craig at wavefront.net Thu Aug 1 21:58:21 2002
From: craig at wavefront.net (Craig S. Wilson)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: meeting rehashed
In-Reply-To: <20020801125205.6D55E3DDA@xmxpita.excite.com>
Message-ID: <5.1.0.14.2.20020801215246.0a6bf8d8@mail.wavefront.net>
At 08:52 AM 8/1/2002 -0400, you wrote:
>So what *is* the state of employment for perl programmers in the twin cities?
>I had intended to go to that meeting last night, until my car stopped
>running a block from my house.
>That had been the very topic I wanted to bring up, as I am looking for
>work. =)
The line forms here.
Fully 50% of the people who attended the meeting were looking for gainful
employment. Not being able to find that, they were looking for Perl or
other programming jobs.
The feeling was that the Twin Cities is NOT a hotbed of Perl programming
jobs. At least not for contractors. Half of the people at the meeting who
are currently employed are working on contracts for companies outside of
Minnesota.
Granted, given a sample size of 4 people, this is not the most accurate
survey, but it should not be completely discounted.
-------------------------------------------------------------
Craig S. Wilson craig@wavefront.com
651-638-9594 612-865-8794 (cell)
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From thomas at stderr.net Thu Aug 1 22:09:33 2002
From: thomas at stderr.net (Thomas Eibner)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: meeting rehashed
In-Reply-To: <20020801125205.6D55E3DDA@xmxpita.excite.com>; from mboyko@excite.com on Thu, Aug 01, 2002 at 08:52:05AM -0400
References: <20020801125205.6D55E3DDA@xmxpita.excite.com>
Message-ID: <20020802050933.A72266@io.stderr.net>
On Thu, Aug 01, 2002 at 08:52:05AM -0400, Mike Boyko wrote:
>
> So what *is* the state of employment for perl programmers in the twin cities?
> I had intended to go to that meeting last night, until my car stopped running a block from my house.
> That had been the very topic I wanted to bring up, as I am looking for work. =)
There's not really many jobs for perl programmers in the TC area. Dave
has been able to do telecommuting work though. I don't know if that would
be an option for everyone.
--
Thomas Eibner DnsZone
mod_pointer
!(C)
Putting the HEST in .COM
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From thomas at stderr.net Fri Aug 23 13:27:30 2002
From: thomas at stderr.net (Thomas Eibner)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: meeting wednesday
Message-ID: <20020823202729.C5048@io.stderr.net>
Where?
If noone has a better place I'd suggest going to Espresso Royale again,
it was very comfortable and the level of noise allowed us to have a
good conversation there.
Any objections to meeting the same place the same time on wednesday?
--
Thomas Eibner DnsZone
mod_pointer
!(C)
Putting the HEST in .COM
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From craig at wavefront.net Fri Aug 23 16:05:32 2002
From: craig at wavefront.net (Craig S. Wilson)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: meeting wednesday
In-Reply-To: <20020823202729.C5048@io.stderr.net>
Message-ID: <5.1.0.14.2.20020823160437.02ce4800@127.0.0.1>
At 08:27 PM 8/23/2002 +0200, you wrote:
>Where?
>
>If noone has a better place I'd suggest going to Espresso Royale again,
>it was very comfortable and the level of noise allowed us to have a
>good conversation there.
Plus, I also discovered that they honor the MPR card for two for one discounts.
>Any objections to meeting the same place the same time on wednesday?
Sounds good.
-------------------------------------------------------------
Craig S. Wilson craig@wavefront.com
651-638-9594 612-865-8794 (cell)
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From thomas at stderr.net Fri Aug 23 17:34:08 2002
From: thomas at stderr.net (Thomas Eibner)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: meeting wednesday
In-Reply-To: <5.1.0.14.2.20020823160437.02ce4800@127.0.0.1>; from craig@wavefront.net on Fri, Aug 23, 2002 at 04:05:32PM -0500
References: <20020823202729.C5048@io.stderr.net> <5.1.0.14.2.20020823160437.02ce4800@127.0.0.1>
Message-ID: <20020824003408.A11096@io.stderr.net>
On Fri, Aug 23, 2002 at 04:05:32PM -0500, Craig S. Wilson wrote:
> At 08:27 PM 8/23/2002 +0200, you wrote:
> >Where?
> >
> >If noone has a better place I'd suggest going to Espresso Royale again,
> >it was very comfortable and the level of noise allowed us to have a
> >good conversation there.
>
> Plus, I also discovered that they honor the MPR card for two for one discounts.
MPR card? Please enlighten me :)
> >Any objections to meeting the same place the same time on wednesday?
>
>
> Sounds good.
>
>
> -------------------------------------------------------------
> Craig S. Wilson craig@wavefront.com
> 651-638-9594 612-865-8794 (cell)
>
>
>
>
> --------------------------------------------------
> Minneapolis Perl Mongers mailing list
>
> To unsubscribe, send mail to majordomo@pm.org
> with "unsubscribe mpls" in the body of the message.
--
Thomas Eibner DnsZone
mod_pointer
!(C)
Putting the HEST in .COM
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From craig at wavefront.net Fri Aug 23 22:27:13 2002
From: craig at wavefront.net (Craig S. Wilson)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: meeting wednesday
In-Reply-To: <20020824003408.A11096@io.stderr.net>
References: <5.1.0.14.2.20020823160437.02ce4800@127.0.0.1>
<20020823202729.C5048@io.stderr.net>
<5.1.0.14.2.20020823160437.02ce4800@127.0.0.1>
Message-ID: <5.1.0.14.2.20020823222541.02cdd700@127.0.0.1>
At 12:34 AM 8/24/2002 +0200, you wrote:
> > Plus, I also discovered that they honor the MPR card for two for one
> discounts.
>
>MPR card? Please enlighten me :)
Minnesota Public Radio (http://www.mpr.org). When you become a 'member',
you get a card that is good for discounts and 2 for 1 deals at some
restaurants and coffee shops.
-------------------------------------------------------------
Craig S. Wilson craig@wavefront.com
651-638-9594 612-865-8794 (cell)
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From jim at acadcam.com Mon Aug 26 09:24:17 2002
From: jim at acadcam.com (Jim Anderson)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: meeting wednesday
In-Reply-To: <20020824003408.A11096@io.stderr.net>; from thomas@stderr.net on Sat, Aug 24, 2002 at 12:34:08AM +0200
References: <20020823202729.C5048@io.stderr.net> <5.1.0.14.2.20020823160437.02ce4800@127.0.0.1> <20020824003408.A11096@io.stderr.net>
Message-ID: <20020826092417.A23565@acadcam.com>
On Sat, Aug 24, 2002 at 12:34:08AM +0200, Thomas Eibner wrote:
> On Fri, Aug 23, 2002 at 04:05:32PM -0500, Craig S. Wilson wrote:
> > At 08:27 PM 8/23/2002 +0200, you wrote:
> > >Where?
> > >
> > >If noone has a better place I'd suggest going to Espresso Royale again,
> > >it was very comfortable and the level of noise allowed us to have a
> > >good conversation there.
> >
> > Plus, I also discovered that they honor the MPR card for two for one discounts.
>
> MPR card? Please enlighten me :)
I think that is Minneapolis Perl Regulars.
But probably not.
--
Jim Anderson (612) 782-0456 jim@acadcam.com
Anderson CAD/CAM, Inc Lucifer designed MS-DOS to try
3800 Apache Lane NE men's souls.
St Anthony, MN 55421 Then he had a better idea...
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From shamu112 at hotmail.com Wed Aug 28 08:17:09 2002
From: shamu112 at hotmail.com (Mark Mykkanen)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Next Meeting
Message-ID:
When and where is the next meeting?
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From thomas at stderr.net Wed Aug 28 10:31:39 2002
From: thomas at stderr.net (Thomas Eibner)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Next Meeting
In-Reply-To: ; from shamu112@hotmail.com on Wed, Aug 28, 2002 at 08:17:09AM -0500
References:
Message-ID: <20020828173138.A63481@io.stderr.net>
On Wed, Aug 28, 2002 at 08:17:09AM -0500, Mark Mykkanen wrote:
> When and where is the next meeting?
Tonight, 7pm at Espresso Royale.
(http://twincities.citysearch.com/profile/5578444/)
--
Thomas Eibner DnsZone
mod_pointer
!(C)
Putting the HEST in .COM
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From matt at omega.org Wed Aug 28 11:30:48 2002
From: matt at omega.org (Matthew Johnson)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Next Meeting
References: <20020828173138.A63481@io.stderr.net>
Message-ID: <00e001c24eb0$44727e80$6401a8c0@rip>
I will be there. It's been awhile since I've made it. -Matt
--
Coffeehouse Restaurant
Espresso Royale Caffe - Hennepin Avenue
1229 Hennepin Ave
Minneapolis, MN 55403-1707
Phone: (612) 333-8882
Hours
Mon-Fri 7am-12am
Sat-Sun 8am-12am
--
----- Original Message -----
From: "Thomas Eibner"
To:
Sent: Wednesday, August 28, 2002 10:31 AM
Subject: Re: [mplspm]: Next Meeting
> On Wed, Aug 28, 2002 at 08:17:09AM -0500, Mark Mykkanen wrote:
> > When and where is the next meeting?
>
> Tonight, 7pm at Espresso Royale.
>
> (http://twincities.citysearch.com/profile/5578444/)
>
> --
> Thomas Eibner DnsZone
> mod_pointer
> !(C)
> Putting the HEST in .COM
>
>
> --------------------------------------------------
> Minneapolis Perl Mongers mailing list
>
> To unsubscribe, send mail to majordomo@pm.org
> with "unsubscribe mpls" in the body of the message.
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From matt at omega.org Thu Aug 29 09:11:28 2002
From: matt at omega.org (Matthew Johnson)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: August Meeting
Message-ID: <5.1.0.14.2.20020829090330.02b9f3c8@pop-server.mn.rr.com>
Skipped content of type multipart/alternative-------------- next part --------------
BEGIN:VCALENDAR
VERSION:1.0
PRODID:PalmDesktop Generated
BEGIN:VEVENT
SUMMARY:Perl Mongers - Espresso Royale Caffe - Hennepin Avenue
DESCRIPTION;QUOTED-PRINTABLE:Espresso Royale Caffe - Hennepin Avenue =0D=0A1229 Hennepin Ave =0D=0AMinneapolis, MN 55403-1707 =0D=0APhone: (612) 333-8882=0D=0AHours =0D=0AMon-Fri 7am-12am =0D=0ASat-Sun 8am-12am
DTSTART:20020926T000000Z
DTEND:20020926T010000Z
DALARM:20020925T232000Z
END:VEVENT
END:VCALENDAR
From matt at omega.org Thu Aug 29 09:08:45 2002
From: matt at omega.org (Matthew Johnson)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: September Meeting
Message-ID: <5.1.0.14.2.20020829084809.02b7c260@pop-server.mn.rr.com>
Hello Everyone,
I declare the meeting last night a success! As planned we met at the
Espresso Royale Caffe on Hennepin Avenue.
We talked about perl luminaries, perl4, perl6 including the it's status and
the possible porting effort, issues facing ISPs, people without a clue,
perl6.01, the perl job market in Mnneapolis, past perl conferences, unix
mailers: sendmail-qmail-xm, software people from other countries, wireless
connections, experiences at US and Canadian customs, histories of
Minneapolis tech companies Unisys, Sperry, MRnet, and more.
The next meeting will be the same bat-time and the same bat-channel.
--
Espresso Royale Caffe - Hennepin Avenue
1229 Hennepin Ave
Minneapolis, MN 55403-1707
Phone: (612) 333-8882
Hours
Mon-Fri 7am-12am
Sat-Sun 8am-12am
Matthew Johnson
Software Consultant
Minneapolis, Minnesota, USA
phone: 612-281-3058
email: matt@omega.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/archives/mpls-pm/attachments/20020829/ebc9a3ec/attachment.htm
From matt at omega.org Thu Aug 29 11:25:50 2002
From: matt at omega.org (Matthew Johnson)
Date: Thu Aug 5 00:29:40 2004
Subject: Fw: [mplspm]: September Meeting
Message-ID: <004201c24f78$bd1b2da0$3201a8c0@rip>
Ignore this one. I sent two by my mistake.
----- Original Message -----
From: Matthew Johnson
To: mpls@pm.org
Sent: Thursday, August 29, 2002 9:08 AM
Subject: [mplspm]: September Meeting
Hello Everyone,
I declare the meeting last night a success! As planned we met at the Espresso Royale Caffe on Hennepin Avenue.
We talked about perl luminaries, perl4, perl6 including the it's status and the possible porting effort, issues facing ISPs, people without a clue, perl6.01, the perl job market in Mnneapolis, past perl conferences, unix mailers: sendmail-qmail-xm, software people from other countries, wireless connections, experiences at US and Canadian customs, histories of Minneapolis tech companies Unisys, Sperry, MRnet, and more.
The next meeting will be the same bat-time and the same bat-channel.
--
Espresso Royale Caffe - Hennepin Avenue
1229 Hennepin Ave
Minneapolis, MN 55403-1707
Phone: (612) 333-8882
Hours
Mon-Fri 7am-12am
Sat-Sun 8am-12am
Matthew Johnson
Software Consultant
Minneapolis, Minnesota, USA
phone: 612-281-3058
email: matt@omega.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/archives/mpls-pm/attachments/20020829/c57f9a35/attachment.htm
From Dan at oelke.com Thu Aug 29 14:49:29 2002
From: Dan at oelke.com (Dan Oelke)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
Message-ID: <5.0.2.1.0.20020829143827.00a90140@mail.oelke.com>
I have a perl programming question for you....
I want to create a switch type statement with fall-through like C provides.
I have a script where it does a number of things in different "phases" for
lack of a better phrase. What I figured I could do was to pass in the
phase I wanted to start in, and the script would pick up at that phase and
and proceed through the rest. Add an extra flag and I could have it do
only that phase.
Here is a code snippet illustrating what I want.
#-----------------------------------------------
use strict;
my $onlyFlag = 1;
$_ = $ARGV[0];
SWITCH: {
if (/Deliver/) {
print "Deliver\n";
if($onlyFlag) {last;}
}
if (/Baseline/) {
print "Baseline\n";
if ($onlyFlag) {last;}
}
if (/Rebase/) {
print "Rebase\n";
if ($onlyFlag) {last;}
}
if (/Build/) {
print "Build\n";
if ($onlyFlag) {last;}
}
}
#-----------------------------------------------
Except that when I execute
perl test.pl Baseline
I see only "Baseline" instead of "Baseline Rebase Build"
Any ideas on how I can structure a switch type statement to get what I
want, OR maybe just another cool way to restructure this code to get the
same effect?
Thanks,
Dan
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From jim at acadcam.com Thu Aug 29 15:08:12 2002
From: jim at acadcam.com (Jim Anderson)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
In-Reply-To: <5.0.2.1.0.20020829143827.00a90140@mail.oelke.com>; from Dan@oelke.com on Thu, Aug 29, 2002 at 02:49:29PM -0500
References: <5.0.2.1.0.20020829143827.00a90140@mail.oelke.com>
Message-ID: <20020829150811.A31550@acadcam.com>
On Thu, Aug 29, 2002 at 02:49:29PM -0500, Dan Oelke wrote:
> I have a perl programming question for you....
>
> I want to create a switch type statement with fall-through like C provides.
>
> I have a script where it does a number of things in different "phases" for
> lack of a better phrase. What I figured I could do was to pass in the
> phase I wanted to start in, and the script would pick up at that phase and
> and proceed through the rest. Add an extra flag and I could have it do
> only that phase.
>
> Here is a code snippet illustrating what I want.
> #-----------------------------------------------
> use strict;
>
> my $onlyFlag = 1;
> $_ = $ARGV[0];
>
> SWITCH: {
> if (/Deliver/) {
> print "Deliver\n";
> if($onlyFlag) {last;}
> }
> if (/Baseline/) {
> print "Baseline\n";
> if ($onlyFlag) {last;}
> }
> if (/Rebase/) {
> print "Rebase\n";
> if ($onlyFlag) {last;}
> }
> if (/Build/) {
> print "Build\n";
> if ($onlyFlag) {last;}
> }
> }
> #-----------------------------------------------
>
> Except that when I execute
> perl test.pl Baseline
> I see only "Baseline" instead of "Baseline Rebase Build"
>
> Any ideas on how I can structure a switch type statement to get what I
> want, OR maybe just another cool way to restructure this code to get the
> same effect?
I think you want $onlyFlag to start out with 0, and set it to 1 if you've
set the flag.
--
Jim Anderson (612) 782-0456 jim@acadcam.com
Anderson CAD/CAM, Inc Lucifer designed MS-DOS to try
3800 Apache Lane NE men's souls.
St Anthony, MN 55421 Then he had a better idea...
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From jay at lach.net Thu Aug 29 15:26:23 2002
From: jay at lach.net (Jay Jacobs)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
In-Reply-To: <5.0.2.1.0.20020829143827.00a90140@mail.oelke.com>
Message-ID:
I'm not sure where you get your switch info from, but I don't understand
how in the world you'd ever get
> I see only "Baseline" instead of "Baseline Rebase Build"
from the code your suppyling.
anyway, perldoc is your friend, take a look at the perldoc info on "last",
in your situation you'd have to specify the LABEL that you want to "last"
from, but it still wouldn't produce your desired result.
last SWITCH if ($onlyFlag);
my $onlyFlag = 1;
my $doAnyway = 0;
SWITCH: {
if (/ONE/) {
print "ONE\n";
if ($onlyFlag) {
last SWITCH:
} else {
$doAnyway = 1;
}
}
if ($doAnyway || /TWO/) {
print "Two\n";
if ($onlyFlag) {
last SWITCH:
} else {
$doAnyway = 1;
}
}
if ($doAnyway || /THREE/) {
.... etc
}
This is written in this email and untested, but the theory is there
On Thu, 29 Aug 2002, Dan Oelke wrote:
> I have a perl programming question for you....
>
> I want to create a switch type statement with fall-through like C provides.
>
> I have a script where it does a number of things in different "phases" for
> lack of a better phrase. What I figured I could do was to pass in the
> phase I wanted to start in, and the script would pick up at that phase and
> and proceed through the rest. Add an extra flag and I could have it do
> only that phase.
>
> Here is a code snippet illustrating what I want.
> #-----------------------------------------------
> use strict;
>
> my $onlyFlag = 1;
> $_ = $ARGV[0];
>
> SWITCH: {
> if (/Deliver/) {
> print "Deliver\n";
> if($onlyFlag) {last;}
> }
> if (/Baseline/) {
> print "Baseline\n";
> if ($onlyFlag) {last;}
> }
> if (/Rebase/) {
> print "Rebase\n";
> if ($onlyFlag) {last;}
> }
> if (/Build/) {
> print "Build\n";
> if ($onlyFlag) {last;}
> }
> }
> #-----------------------------------------------
>
> Except that when I execute
> perl test.pl Baseline
> I see only "Baseline" instead of "Baseline Rebase Build"
>
> Any ideas on how I can structure a switch type statement to get what I
> want, OR maybe just another cool way to restructure this code to get the
> same effect?
>
> Thanks,
> Dan
>
>
>
> --------------------------------------------------
> Minneapolis Perl Mongers mailing list
>
> To unsubscribe, send mail to majordomo@pm.org
> with "unsubscribe mpls" in the body of the message.
>
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From shamu112 at hotmail.com Thu Aug 29 16:12:14 2002
From: shamu112 at hotmail.com (Mark Mykkanen)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
Message-ID:
http://search.cpan.org/author/DCONWAY/Switch-2.09/Switch.pm
Regards,
Mark
>From: Dan Oelke
>Reply-To: mpls@pm.org
>To: mpls@pm.org
>Subject: [mplspm]: Howto do switch with fall-through
>Date: Thu, 29 Aug 2002 14:49:29 -0500
>
>I have a perl programming question for you....
>
>I want to create a switch type statement with fall-through like C provides.
>
>I have a script where it does a number of things in different "phases" for
>lack of a better phrase. What I figured I could do was to pass in the
>phase I wanted to start in, and the script would pick up at that phase and
>and proceed through the rest. Add an extra flag and I could have it do
>only that phase.
>
>Here is a code snippet illustrating what I want.
>#-----------------------------------------------
>use strict;
>
>my $onlyFlag = 1;
>$_ = $ARGV[0];
>
>SWITCH: {
> if (/Deliver/) {
> print "Deliver\n";
> if($onlyFlag) {last;}
> }
> if (/Baseline/) {
> print "Baseline\n";
> if ($onlyFlag) {last;}
> }
> if (/Rebase/) {
> print "Rebase\n";
> if ($onlyFlag) {last;}
> }
> if (/Build/) {
> print "Build\n";
> if ($onlyFlag) {last;}
> }
>}
>#-----------------------------------------------
>
>Except that when I execute
> perl test.pl Baseline
>I see only "Baseline" instead of "Baseline Rebase Build"
>
>Any ideas on how I can structure a switch type statement to get what I
>want, OR maybe just another cool way to restructure this code to get the
>same effect?
>
>Thanks,
>Dan
>
>
>
>--------------------------------------------------
>Minneapolis Perl Mongers mailing list
>
>To unsubscribe, send mail to majordomo@pm.org
>with "unsubscribe mpls" in the body of the message.
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From Dan at oelke.com Thu Aug 29 17:20:33 2002
From: Dan at oelke.com (Dan Oelke)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
In-Reply-To:
References: <5.0.2.1.0.20020829143827.00a90140@mail.oelke.com>
Message-ID: <5.0.2.1.0.20020829165757.00acbec0@mail.oelke.com>
Hmmmmm - I was hoping for a cleaner solution, but adding the $doAnyway
thing would get me exactly the behavior I wanted. Now why didn't I think
of that type of solution.....
I did look at Switch.pm (before I wrote my first message even) - and it
does have "fall-through" behavior, but the way it works I would have to do
a $doAnyway type of pattern to the code.
Thanks a million!
Dan
PS - I haven't been able to make any of the gatherings for quite a while
now, so maybe this has been discussed already - but has anyone else here
seen Ken William's boxers video? This is the same Ken Williams - correct???
At 03:26 PM 8/29/02 -0500, Jay Jacobs wrote:
>I'm not sure where you get your switch info from, but I don't understand
>how in the world you'd ever get
> > I see only "Baseline" instead of "Baseline Rebase Build"
>from the code your suppyling.
>
>anyway, perldoc is your friend, take a look at the perldoc info on "last",
>in your situation you'd have to specify the LABEL that you want to "last"
>from, but it still wouldn't produce your desired result.
>
>last SWITCH if ($onlyFlag);
>
>
>my $onlyFlag = 1;
>my $doAnyway = 0;
>SWITCH: {
> if (/ONE/) {
> print "ONE\n";
> if ($onlyFlag) {
> last SWITCH:
> } else {
> $doAnyway = 1;
> }
> }
> if ($doAnyway || /TWO/) {
> print "Two\n";
> if ($onlyFlag) {
> last SWITCH:
> } else {
> $doAnyway = 1;
> }
> }
> if ($doAnyway || /THREE/) {
> .... etc
>}
>
>This is written in this email and untested, but the theory is there
>
>
>
>
>On Thu, 29 Aug 2002, Dan Oelke wrote:
>
> > I have a perl programming question for you....
> >
> > I want to create a switch type statement with fall-through like C provides.
> >
> > I have a script where it does a number of things in different "phases" for
> > lack of a better phrase. What I figured I could do was to pass in the
> > phase I wanted to start in, and the script would pick up at that phase and
> > and proceed through the rest. Add an extra flag and I could have it do
> > only that phase.
> >
> > Here is a code snippet illustrating what I want.
> > #-----------------------------------------------
> > use strict;
> >
> > my $onlyFlag = 1;
> > $_ = $ARGV[0];
> >
> > SWITCH: {
> > if (/Deliver/) {
> > print "Deliver\n";
> > if($onlyFlag) {last;}
> > }
> > if (/Baseline/) {
> > print "Baseline\n";
> > if ($onlyFlag) {last;}
> > }
> > if (/Rebase/) {
> > print "Rebase\n";
> > if ($onlyFlag) {last;}
> > }
> > if (/Build/) {
> > print "Build\n";
> > if ($onlyFlag) {last;}
> > }
> > }
> > #-----------------------------------------------
> >
> > Except that when I execute
> > perl test.pl Baseline
> > I see only "Baseline" instead of "Baseline Rebase Build"
> >
> > Any ideas on how I can structure a switch type statement to get what I
> > want, OR maybe just another cool way to restructure this code to get the
> > same effect?
> >
> > Thanks,
> > Dan
> >
> >
> >
> > --------------------------------------------------
> > Minneapolis Perl Mongers mailing list
> >
> > To unsubscribe, send mail to majordomo@pm.org
> > with "unsubscribe mpls" in the body of the message.
> >
>
>
>
>
>
>--------------------------------------------------
>Minneapolis Perl Mongers mailing list
>
>To unsubscribe, send mail to majordomo@pm.org
>with "unsubscribe mpls" in the body of the message.
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From eric at urbanrage.com Thu Aug 29 19:03:18 2002
From: eric at urbanrage.com (Eric Estabrooks)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
References: <5.0.2.1.0.20020829143827.00a90140@mail.oelke.com>
Message-ID: <3D6EB646.9080108@urbanrage.com>
Dan Oelke wrote:
> I have a perl programming question for you....
>
> I want to create a switch type statement with fall-through like C
> provides.
>
> I have a script where it does a number of things in different "phases"
> for lack of a better phrase. What I figured I could do was to pass in
> the phase I wanted to start in, and the script would pick up at that
> phase and and proceed through the rest. Add an extra flag and I could
> have it do only that phase.
>
> Here is a code snippet illustrating what I want.
> #-----------------------------------------------
> use strict;
>
> my $onlyFlag = 1;
> $_ = $ARGV[0];
>
> SWITCH: {
> if (/Deliver/) {
> print "Deliver\n";
> if($onlyFlag) {last;}
> }
> if (/Baseline/) {
> print "Baseline\n";
> if ($onlyFlag) {last;}
> }
> if (/Rebase/) {
> print "Rebase\n";
> if ($onlyFlag) {last;}
> }
> if (/Build/) {
> print "Build\n";
> if ($onlyFlag) {last;}
> }
> }
> #-----------------------------------------------
>
> Except that when I execute
> perl test.pl Baseline
> I see only "Baseline" instead of "Baseline Rebase Build"
Since you have well defined phase names you could do something like this:
my %phase = ('Default',0,'Deliver',1,'Baseline',2,'Rebase',3,'Build',4);
my @funcs = (\&default,\&deliver,\&baseline,\&rebase,\&build);
my $onlyFlag = 0;
$_ = $ARGV[0];
for (my $i = $phase{$_} || $phase{'Default'}; $i < @funcs; $i++) {
$funcs[$i]();
last if $onlyFlag || !$i;
}
# subs
sub default {
print "Default\n";
}
sub deliver {
print "Deliver\n";
}
sub baseline {
print "Baseline\n";
}
sub rebase {
print "Rebase\n";
}
sub build {
print "Build\n";
}
Eric
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From ken at mathforum.org Thu Aug 29 20:03:57 2002
From: ken at mathforum.org (Ken Williams)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
In-Reply-To: <5.0.2.1.0.20020829165757.00acbec0@mail.oelke.com>
Message-ID: <5CBAC928-BBB4-11D6-82EE-0003939C4354@mathforum.org>
On Friday, August 30, 2002, at 08:20 AM, Dan Oelke wrote:
> PS - I haven't been able to make any of the gatherings for
> quite a while now, so maybe this has been discussed already -
> but has anyone else here seen Ken William's boxers video? This
> is the same Ken Williams - correct???
I deny everything. Or I was young and I needed the money.
-Ken
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From Dan at oelke.com Fri Aug 30 10:41:14 2002
From: Dan at oelke.com (Dan Oelke)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Ken's denial
In-Reply-To: <5CBAC928-BBB4-11D6-82EE-0003939C4354@mathforum.org>
References: <5.0.2.1.0.20020829165757.00acbec0@mail.oelke.com>
Message-ID: <5.0.2.1.0.20020830103638.00abdec0@mail.oelke.com>
>
>I deny everything. Or I was young and I needed the money.
>
> -Ken
I bet it paid real well too. For those who haven't seen it - go to:
http://www.oreillynet.com/pub/wlg/1758
There is a link there to why Ken made the switch.
Sorry Ken - but anyone who does something this goofy needs it spread wide
and far. ;-)
Personally I found the whole series hilarious.
Dan
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From Dan at oelke.com Fri Aug 30 11:02:28 2002
From: Dan at oelke.com (Dan Oelke)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
In-Reply-To: <3D6EB646.9080108@urbanrage.com>
References: <5.0.2.1.0.20020829143827.00a90140@mail.oelke.com>
Message-ID: <5.0.2.1.0.20020830104224.00ae9ec0@mail.oelke.com>
Ahhhhhh - that is what I love about you guys. Always another way to do
it. I really like this solution. Especially since I'm going to have from
10-20 "phases" and this scales up much easier.
Thanks a million!
Dan
>Since you have well defined phase names you could do something like this:
>
>my %phase = ('Default',0,'Deliver',1,'Baseline',2,'Rebase',3,'Build',4);
>my @funcs = (\&default,\&deliver,\&baseline,\&rebase,\&build);
>
>
>
>my $onlyFlag = 0;
>$_ = $ARGV[0];
>
>for (my $i = $phase{$_} || $phase{'Default'}; $i < @funcs; $i++) {
> $funcs[$i]();
> last if $onlyFlag || !$i;
>}
>
># subs
>sub default {
> print "Default\n";
>}
>sub deliver {
> print "Deliver\n";
>}
>sub baseline {
> print "Baseline\n";
>}
>sub rebase {
> print "Rebase\n";
>}
>sub build {
> print "Build\n";
>}
>
>
>Eric
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.
From josh at greentechnologist.org Fri Aug 30 20:42:43 2002
From: josh at greentechnologist.org (Josh Jore)
Date: Thu Aug 5 00:29:40 2004
Subject: [mplspm]: Howto do switch with fall-through
In-Reply-To: <5.0.2.1.0.20020830104224.00ae9ec0@mail.oelke.com>
Message-ID:
On Fri, 30 Aug 2002, Dan Oelke wrote:
> ... Especially since I'm going to have from 10-20 "phases" and this
> scales up much easier.
>
> >... Since you have well defined phase names you could do something like
> > this:
> >my %phase = ('Default',0,'Deliver',1,'Baseline',2,'Rebase',3,'Build',4);
> >my @funcs = (\&default,\&deliver,\&baseline,\&rebase,\&build);
> > ...
So... I don't know the backstory here but that looks really odd having
hash values be index values to a parallel array. Is there any reason that
the sub refs aren't just stored directly into the array?
Joshua b. Jore -{ weird geeky madness }-> http://www.greentechnologist.org
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo@pm.org
with "unsubscribe mpls" in the body of the message.