in reply to Read HTM, but no output
Look at where you read the input from $FH_IN. In that loop, you never print the lines you read.
If you want to read from a file and write to a second file, you need to do that within one loop:
open my $FH_IN, ... or die; open my $FH_OUT, ... or die; while( my $line = <$FH_IN>) { ... print $FH_OUT $line; }
If you apply proper indentation to your file, you will immediately spot where each loop of your program starts and ends. You have one outer loop which iterates over the entries in a directory, but in your inner loop you have again a check for the existence of the file. Clean up the sprinkled logic and you're all set.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read HTM, but no output
by wrkrbeee (Scribe) on Apr 08, 2016 at 21:38 UTC |