Suddenly, without warning or error messages, the script below is
producing null for values of $hfile and $bfile!
The script begins:
#!/usr/bin/perl
use Tie::File;
use File::Copy 'copy';
use File::Spec;
and further down, it has:
# Tie it to an array
#
(my $copy = $htmfile) =~ s/(\.htm)\z/-Copy$1/i;
copy $htmfile, $copy;
tie my @hfile, 'Tie::File', $copy;
tie my @bfile, 'Tie::File', $recapfile;
## hfile is the array of the lines of htmfile
#
print "$copy \n";
print "hfile: 1--$hfile-- \n";
$copy's value is correct.
I'm on a Windows 7 machine. Should I have the Windows full pathname for
perl.exe at the top????
Happy to send the entire script to anyone who would like to see it.
Thanks.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/