Re: Shortest non-numeric Perl expression for each number
[email protected] (Ton Hospel) Sun, 14 Mar 2004 14:15:05 +0000 (UTC)
| Newsgroups | gmane.comp.lang.perl.golf |
|---|---|
| Organization | lunix confusion services |
| Message-ID | <[email protected]> |
In article <[email protected]>, Daniel Tiefnig <[email protected]> writes: > Ton Hospel wrote: >> For a good average: >> >> $X[0] = $a; > > Well, this gives $X[0] == '', at least on 5.8 here... (And I'm pretty > sure it does too on 5.6.x.. :o) Oops. Use Rick's xor there then. > >> $X[1] = //; >> $X[2] = $^F++; >> $X[3] = $^F++; > > So, why not just > > $X[0] = $a++; > $X[1] = $a++; > $X[2] = $a++; > $X[3] = $a++; > > Duh. :o) > Because that's longer. (^F is ONE character, so you loose on the $X[1])