in reply to flip-flop flop
sub after{ my $target=shift; shift @_ until $_[0] eq $target; return @ +_ };; @a = 'a'..'z';; print after( 'm', @a );; m n o p q r s t u v w x y z print after( 'e', @a );; e f g h i j k l m n o p q r s t u v w x y z print after( 'y', @a );; y z
Add another shift if you don't want the element you looked for.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: flip-flop flop
by morgon (Priest) on Mar 30, 2012 at 11:56 UTC | |
by BrowserUk (Patriarch) on Mar 30, 2012 at 12:10 UTC | |
by morgon (Priest) on Mar 30, 2012 at 13:07 UTC | |
by moritz (Cardinal) on Mar 30, 2012 at 13:31 UTC | |
by morgon (Priest) on Mar 30, 2012 at 13:41 UTC | |
| |
by BillKSmith (Monsignor) on Apr 01, 2012 at 13:47 UTC |