in reply to Re^4: Read from multiple files change the data with a script and the write the respective output files with a different extension
in thread Read from multiple files change the data with a script and the write the respective output files with a different extension

There are 2 key conceptual problems here.

Firstly you reference @files in a location where it has not been declared. You need to consider scoping with regard to subs.

Secondly, you have put your new code inside a for loop which is itself inside a while loop. Can you explain why you think this means it would only be executed once?

  • Comment on Re^5: Read from multiple files change the data with a script and the write the respective output files with a different extension
  • Download Code

Replies are listed 'Best First'.
Re^6: Read from multiple files change the data with a script and the write the respective output files with a different extension
by Akatsuki (Novice) on Oct 14, 2016 at 06:21 UTC

    Thank you for your answer. To be clear, I want this statement: print "Enter the desired number of columns: "; to be printed just once in the begining of the program for all the files inside the folder, right now it asks for every file.