79131013

Date: 2024-10-27 16:37:24
Score: 2
Natty:
Report link

I mean I don't know much about perl in windows environments, but I think it would greatly help you find the solution if you could pepper the code with prints to pin point exactly where the issue is.

is the script hanging on opening a file? is the loop just never ending?

i can't say on windows, but on linux if the file is a named pipe it will never reach EOF so you might see hanging on read

as far as your script goes i would replace else { if (...){... with elsif(...){... just because it's cleaner (but i acknowledge that is out of the scope of your question)

if you find that the file you're trying to read is just huge you might be able to speed things up by breaking out of the loop (last) once you have read the line you need.

outside of the perl script maybe the file might get to be too large if it is being appended to, instead of overwriten?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Phobomancer