codewalker has asked for the wisdom of the Perl Monks concerning the following question:
use Cwd 'abs_path'; $dir=abs_path($0); opendir (DIR, $dir) or die $!; my @html_files = grep(/\.html$/, readdir DIR); closedir DIR; foreach my $html_files(@html_files) { $pathName=substr($html_files,0,length($html_files)-4); open(DATA, "<${pathName}html") or die "Couldn't open file file +.txt, $!"; while(<DATA>) { $line.=$_; } . . . open(DATA, ">${pathName}html") or die "Couldn't open file file.txt, $! +"; print DATA $line; $line=""; } closedir(DIR);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Compilation Error.
by marto (Cardinal) on Dec 02, 2014 at 12:01 UTC | |
|
Re: Compilation Error.
by ww (Archbishop) on Dec 02, 2014 at 12:46 UTC |