Re: given-when problem

2010-11-26 Thread Rob Dixon
On 26/11/2010 19:10, Téssio Fechine wrote: I think this is a bug: tes...@krauzer:~/Perl/Ex/ch15$ cat when #!/usr/bin/perl -w use 5.010; use strict; given($ARGV[0]) { when(/fred/i) { say 'Name has fred in it'; continue } when(/^Fred/) { say 'Name starts with Fred'; continue }

Re: given-when problem

2010-11-26 Thread Chap Harrison
On Nov 26, 2010, at 1:10 PM, Téssio Fechine wrote: > > given($ARGV[0]) { > >when(/fred/i) { say 'Name has fred in it'; continue } > >when(/^Fred/) { say 'Name starts with Fred'; continue } > >when('Fred') { say 'Name is Fred' } > >default { say "I don't see a Fred"

given-when problem

2010-11-26 Thread Téssio Fechine
I think this is a bug: tes...@krauzer:~/Perl/Ex/ch15$ cat when #!/usr/bin/perl -w use 5.010; use strict; given($ARGV[0]) { when(/fred/i) { say 'Name has fred in it'; continue } when(/^Fred/) { say 'Name starts with Fred'; continue } when('Fred') { say 'Name is Fred' } de