in reply to Terse Code for Odd Numbers

print grep $_%2, 1 .. 13; - you don't need the for().

  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

Replies are listed 'Best First'.
Re^2: Terse Code for Odd Numbers
by deep submerge (Scribe) on May 13, 2005 at 19:50 UTC

    Arg!! So obvious! Printing the array itself!

    Hmmf. That's great. Could it get any better? =) I guess this could be considered golfing...