in reply to Re^2: socket checker in multiple hosts for multiple destination
in thread socket checker in multiple hosts for multiple destination

> opens file for writing not reading. see open

# change > to < open( my $data_fh, ">", $file2 ) or die "Could not open [$file2] [$!]"; for (my $nice = <$data_fh>) {
poj

Replies are listed 'Best First'.
Re^4: socket checker in multiple hosts for multiple destination
by Bams (Initiate) on Feb 15, 2016 at 08:20 UTC

    Thats the code I have presently. I did not understand your comment #@poj

      You have

      open( my $data_fh, ">", $file2 ) or die "Could not open [$file2] [$!]";

      which opens the $file2 for writing

      To read from it use

      open( my $data_fh, "<", $file2 ) or die "Could not open [$file2] [$!]";
      poj