Hello Perl Monks,
Long time visitor of your forums, first time poster. I still consider myself semi-new to Perl, have only been at it for a few months. I am completely stumped on this error message: Can't do inplace edit: . is not a regular file at Copy (2) of Parsing.pl line 9. I know what causes the error, but for the life of me I cannot discover it in my own code. I am writing something very simple. Here is the code in question:Essentially I am looking at multiple text files, looking for one spot where the text file has "Words" and then taking an offset of 26 and saving what comes after the 26th position. The error I get does not affect the overall functionally of my script. It does however generate annoying and unprofessional errors that unfortunately take up my cmd screen. Any ideas?chdir("C:\\some_directory") or die "$!"; opendir (DIR, ".") or die "$!"; my @files = grep{"\\*?.txt"} readdir DIR; close DIR; local @ARGV = @files; while (<>) { if (/Words: /) { $somenumber = "print $_"; $substringoffset = substr($somenumber, 26); open MYFILE, ">>","C:\\some_directory\\Results.csv"; print MYFILE $substringoffset; } }
In reply to Strange Error by JimboMcDeans
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |