I have to generate the output in a log file.
Expand|Select|Wrap|Line Numbers
- #!usr/local/bin/perl -w
- use Test::More tests => 5;
- use Test::Files;
- use File::Spec;
- my $logging = "file";
- if ($logging eq "file") {
- open LOG, ">output.log" or die $!;
- select LOG;
- }
- print "\nEnter the first folder name\n";
- my $dir1 = <STDIN>;
- chomp($dir1);
- print "\nEnter the second folder name\n";
- my $dir2 = <STDIN>;
- chomp($dir2);
- compare_dirs_ok($dir1,$dir2,"REPORT1");
- compare_dirs_ok($dir2,$dir1,"REPORT2");
- select STDOUT;
can any1 suggest something for generating the output in a log file instead of standard output.