in reply to Re^3: Creating a new file in a directory
in thread Creating a new file in a directory

Getting this error, when running the script --
Please enter your selection : 1
Please enter the CR# :117365
CR num is 117365

File type confirmation for CR 117365..........

Cannot open D:\SiebelAdmin\CR_Files\CR117365_20150821_0045
/file_detail.txt: Invalid argument

D:\SiebelAdmin\Operations>pause
Press any key to continue . . .
  • Comment on Re^4: Creating a new file in a directory

Replies are listed 'Best First'.
Re^5: Creating a new file in a directory
by Corion (Patriarch) on Aug 21, 2015 at 07:49 UTC

    Yes, that means you have a newline in $mycrdir. This is because you read $mycrdir from the user and that readline includes the final newline as entered by the user. You could have shown this part of your code as well to make it more obvious that $mycrdir is read from the outside.