in reply to Tie::File is driving me crazy

You're running profileb() before you open the tie'd file. Simply move your function call to after the tie statement, or remove the need for a function completely.

-Miller

Replies are listed 'Best First'.
Re^2: Tie::File is driving me crazy
by Dandello (Monk) on Feb 01, 2011 at 18:53 UTC

    I did say it was painfully obvious - I've only been working on this project for 5 weeks trying to get it down to a dull roar. I'm at the point that my eyes are crossed and I'm dreaming code.

    The script posted here was just a test - the real script will be outputting a 140 mg file.

      This is the very problem one avoids by not using global vars to pass data to functions.