in reply to Re^3: Writing to File based on condition
in thread Writing to File based on condition
https://www.perlmonks.org/?node_id=1208878if( keys %old > $oldsize ) # only write if new ips added { open my $out, '>', $awsLists or die "$! opening $awsLists"; ##print directly to the file the new keys difference print $out sort keys %old; # sort not needed, but nice touch :) close $out; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Writing to File based on condition
by shmem (Chancellor) on Feb 18, 2018 at 18:44 UTC |