in reply to Re: Re: Use an array slices
in thread Use an array slices
Can you guess what the output is? Run it and find out.#!/usr/bin/perl -wT use strict; my $value = 10; SWITCH: for ($value) { /0/ && do {print "ZERO\n"; last; }; /1/ && do {print "ONE\n"; last; }; /10/ && do {print "TEN\n"; last; }; print "NONE OF THE ABOVE\n"; }
-Blake
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re3: Use an array slices
by hypochrismutreefuzz (Scribe) on Mar 17, 2003 at 15:04 UTC | |
Re: Re3: Use an array slices
by TVSET (Chaplain) on Apr 28, 2003 at 07:14 UTC |