in reply to Re^2: system() issue
in thread system() issue

To avoid potential headaches, always localize assignments to global variables like $/.

local $/ = '>';

That way, the value of $/ will be automatically restored after the sub exits. Later parts of your program might not like having a weird line terminator dropped on them.

Also good practice to localize $_ if you're using it for that type of while loop.

local $_; while (<FILE>) {

Replies are listed 'Best First'.
Re^4: system() issue
by Anonymous Monk on Dec 13, 2013 at 16:57 UTC

    Thanks, that solved my problem. I had to localize the $/ value. :)

    Also, if you have any suggestions to make my code more readable, I would appreciate it. Not being from a computer background, I don't have much experience making it readable by others. :)