File Handle Reading Blues: Rereading a File Handle for Input

From: Dietrich (dietrichm_at_mac.com)
Date: 07/20/04

  • Next message: Manfred: "Socket, cannot get clean results."
    Date: 19 Jul 2004 15:30:42 -0700
    
    

    Hi.
    I can't reread a file handle after I have copied it on another file
    handle for output. Here is the code snippet. Please let me know if
    you need more.
    Lines 26 & 27 are my attempts to get read the input file again. Line
    18, where I copy the input file handle to the output file handle works
    fine. I am using Perl 5.6.1 on HP-UX 11.00.

        18 print INVARS_NW <INVARS_READ>;
        19
        20 chomp ($DB_MAIN_NAME=`echo \$profile`);
        21 #system "echo \$profile";
        22 print "DB_MAIN_NAME = '$DB_MAIN_NAME'";
        23
        24 print "\nGeorge W.";
        25
        26 while (<INVARS_READ>)
        27 #while (print INVARS_NW <INVARS_READ>)
        28 {

    Thank you.


  • Next message: Manfred: "Socket, cannot get clean results."