>>         grep ITEM: { /^[1-9]/ || next ITEM } @list;

>Not much that I can see, but your next does not include any return value,
>so what should it be?  Of course, if it's false, you didn't need a next in
>the first place and if it's true you didn't need a grep in the first place :-)

Doh! perhaps then more like:

        #grep for str's beginning and ending in a digit
        grep ITEM: { /^[1-9]/; next ITEM unless /[1-9]$/ } @list;

Of course there are other ways of writing this...
Are there any cases people want this for that CANNOT be rewritten?
Or is it purely syntactic sugar? Not that that is a bad thing,
as I've mentioned I think a way to short-circuit/bypass/"return" from
an otherwise undistinguished block would be nice. There have been
many times I've wanted to do same.
--
#!/usr/bin/perl -nl
BEGIN{($,,$0)=("\040",21);@F=(sub{tr[a-zA-Z][n-za-mN-ZA-M];print;});
$_="Gnxr 1-3 ng n gvzr, gur ynfg bar vf cbvfba.";&{$F[0]};sub t{*t=sub{};
return if rand()<.5;$_="Vg'f abg lbhe ghea lrg, abj tb.";&{$F[0]};$_=0;}
sub v{print map sprintf('%c', 2**7-2**2),(1 .. $0);}&v;}{$_++;$_--;$_||=4;
if($_>>2||($_<<2>12)){$_="Vainyvq ragel";&{$F[0]};last;}&t;$0-=$_;$_="Lbh jva";
die(&{$F[0]}) if !($0-1);$0-=$0%2?$0>2?2:1:$0<=5?$0>2?3:1:rand>.5?1:3;
$_="V jva";die(&{$F[0]}) if !($0-1>1);}&v __END__ http://pthbb.org/
MOTD on Setting Orange, the 36th of Bureaucracy, in the YOLD 3166:

Science is a two headed beast, arthur. One head is good. It brings us advances like 
aspirin. But the other head-Oh, beware the other head of science, arthur! It bites!

Reply via email to