in reply to Cant use array with numbers??
What does "powerful" mean in this context? In Perl I'd be tempted to:
$_ ne "DontPrintMe" and print for @Array;
but that may be too much power for the masses who may be happier with:
for (@Array) { next if $_ eq "DontPrintMe"; print; }
although for someone from a C/C++ background that may still be a little blinding and would expect to see the rather more Cish:
for (my $i = 0; $i < @Array; ++$i) { print $Array[$i] unless $Array[$i] eq "DontPrintMe"; }
which of course is still not toned down to a C/C++ level of power, but possibly looks familiar enough not to cause offense.
|
|---|