in reply to Is this a correct way of obtaining input from a file?

As for getting input from the file, I'd say what you're doing is fine, though you could reduce it to:

open FH, 'CheckUPS.in' or die "Couldn't open file: $!" ; chomp( my ( $TRACK, $pager, $service ) = <FH> ) ; close FH ;

As for what you should check, I'd say make sure you're running under use strict, then trace those variables back to where they're assigned, as that's not shown in your code.


_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Replies are listed 'Best First'.
Re: Re: Is this a correct way of obtaining input from a file?
by cecil36 (Pilgrim) on Aug 06, 2002 at 21:00 UTC
    I tried a
    use strict
    a while back and the program puked at it. It works fine with out it. That could be a future revision is to rewrite this thing with
    use strict
    .

      How large is your program? If it's not too big, it's entirely possible that updating your script to use strict could be done with minimal effort, and would give you an added level of built-in error checking that can prevent things like mislabeled variables, etc.


      _______________
      DamnDirtyApe
      Those who know that they are profound strive for clarity. Those who
      would like to seem profound to the crowd strive for obscurity.
                  --Friedrich Nietzsche