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.
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 | |
by DamnDirtyApe (Curate) on Aug 06, 2002 at 21:40 UTC |