Timeline for The Squiggly Sequence
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 1, 2016 at 0:21 | comment | added | Dada |
That trick with the ; added by -p is quite awsome, well done.
|
|
Aug 31, 2016 at 15:46 | comment | added | Dom Hastings |
Also 20 bytes: $_=qw{\ /}[$_%2]x$_ but far less interesting than this one!
|
|
Aug 31, 2016 at 14:50 | comment | added | theLambGoat | I'm running on SUSE Enterprise Server 11 so it's not just a redhat thing. But I think as long as it works in some versions, it should still be a valid answer. (I also just checked in 5.08, the only other version I have access to at the moment and it doesn't work there either) | |
Aug 31, 2016 at 13:43 | comment | added | Ton Hospel | @theLambGoat Mm, I found an old redhat with perl 5.10 where indeed it does not work. Either this is a redhat patch or it indeed did not work for around 5.10 (I'm sure it worked in older perls and it also works in newer perls) | |
Aug 31, 2016 at 13:29 | comment | added | Ton Hospel |
@theLambGoat Are you sure you are using the -p option ? I use ; in the transliterate exactly because -p has an implicit ; at the end of the code so I can save 1 more byte. This has worked since at least perl 5.6 (probably as long as the -p option existed in fact)
|
|
Aug 31, 2016 at 12:51 | comment | added | theLambGoat | It might just be my version of Perl (I'm still on 5.10) but this throws an error unless I add an extra ; to the end. I think it's because it you're using the semi-colon as a separator for y and you need one more to finish the statement (and would need two if you had more lines of code after this) | |
Aug 30, 2016 at 23:30 | history | answered | Ton Hospel | CC BY-SA 3.0 |