fork download
  1. #!/usr/bin/perl
  2. # your code goes here
  3. $fixedlines[0]=<>;
  4.  
  5. while($line = <>){
  6. if($line ne "\n" && $line !~ /later…\n$/){
  7.  
  8. $tabs=0;
  9. while($line =~ /^\(tab\)/){
  10. $line =~ s/^\(tab\)//g;
  11. $tabs++;
  12. }
  13.  
  14. $line = "\t" x $tabs . $line;
  15.  
  16. $fixedlines[~~@fixedlines] = $line;
  17.  
  18. if($line ne " \n" && $line ne ""){
  19. $fixedlines[$#fixedlines-1] = "";
  20. }
  21. if($line eq " \n" && $fixedlines[$#fixedlines-1] eq " \n"){
  22. $fixedlines[$#fixedlines-1] = "";
  23. }
  24.  
  25. }
  26. }
  27.  
  28. print @fixedlines,"\n"
Success #stdin #stdout 0s 3564KB
stdin

#This room is for code only. Please do not enter any other comments#

 



Stack Exchange



Stack Exchange























 

24 hours later…

 





user2509848



user2509848

user2509848

585


11:53


Rules: meta.codegolf.stackexchange.c…


(removed)


(removed)


import random

 





PhiNotPi

PhiNotPi

PhiNotPi






12:25


words = dict()

 





user2509848

user2509848

user2509848






 
words[0] = 'Cabbage'

 





PhiNotPi

PhiNotPi

PhiNotPi






12:48


words.update({1:'potato',2:'vegetable',3:'fruit',4:'avocado',5:'strawberry',6:'‌​apple'})

 





user2509848

user2509848

user2509848






 
words.update({7:'pear',8:'corn',9:'tomato',10:'kiwi',11:'peach',12:'‌​eggplant',‌​13:'pineapple'})

 


 

1 hour later…

 





PhiNotPi

PhiNotPi

PhiNotPi






14:14


words.update({14:'mango',15:'pumpkin',16:'squash',17:'cucumber',18:'banana',19:'‌​raspberry',20:'blackberry',21:'lettuce',22:'carrot',23:'onion'})

 





user2509848

user2509848

user2509848






14:31


words.update({24:'artichoke',25:'beet',26:'pepper',27:'asparagus',28:'melon',29:‌​'cherry',30:'radicchio'})
stdout
#This room is for code only. Please do not enter any other comments#
Stack Exchange
import random
words = dict()
user2509848
words[0] = 'Cabbage'
words.update({1:'potato',2:'vegetable',3:'fruit',4:'avocado',5:'strawberry',6:'‌​apple'})
user2509848
words.update({7:'pear',8:'corn',9:'tomato',10:'kiwi',11:'peach',12:'‌​eggplant',‌​13:'pineapple'})
words.update({14:'mango',15:'pumpkin',16:'squash',17:'cucumber',18:'banana',19:'‌​raspberry',20:'blackberry',21:'lettuce',22:'carrot',23:'onion'})
words.update({24:'artichoke',25:'beet',26:'pepper',27:'asparagus',28:'melon',29:‌​'cherry',30:'radicchio'})