I am using the -w option and yes, I do make checks for 
        open and close.  The input file is only 6 lines long.
        The only thing not included in the code I gave was the 
        open/close file checks.

        Is this Solaris specific problem? 

        Thanks to all for the help....


Michael Silver

-----Original Message-----
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 3:38 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: <HANDLE> Construct Question


On Wed, 6 Feb 2002 [EMAIL PROTECTED] wrote:

>       Sorry about not including code. Basically, it is:
>
>
>
>       open(REGION_NAME, "<region_file");

You should test to see if the open failed:

open(REGION_NAME, '<region_file')
        or die "Could not open region_file: $!\n";

>       while($region = <REGION_NAME>) {
>         print "$region";
>       }

You can use the default variable here ($_):

        while(<REGION_NAME>) {
                print;
        }

>
>       close(REGION_NAME);

You should also test to make sure the close worked, like you do for the
opening.

Is that the entire script?

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
To think contrary to one's era is heroism.  But to speak against it is
madness.
                -- Eugene Ionesco

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to