I'd start by adding:

use warnings;
use strict;

at the top just above "use Tie::File;"

That way you'll find out about any syntax errors or warnings. Not that I
can see any.

I'd then try a simple

open(my $fh, "+<", "000000-copy.htm") or die "cannot open 000000-copy.htm:
$!";

If that works then you should start looking at Tie::File for your problem,
otherwise investigate the reported problem.

Windows permissions can be tricky; check the "effective permissions" for
your user to make sure there's not something overriding the Everyone
permissions you mention (I've seen that happen sometimes when there's been
problems with the underlying directory permissions).

Another thing which might help with Windows is trying an absolute path to
avoid any path related problems.

Hope that helps.

Carl


On 5 August 2014 19:13, ESChamp <esch...@gmail.com> wrote:

> Here's a small portion of my script:
>
> #!/usr/bin/perl
>
> use Tie::File;
> use File::Copy 'copy';
> use File::Spec;
>
> my $copy="000000-copy.htm";
> my $recapfile="000000recap.txt";
> my $htmfile="000000.htm";
>
> tie my @hfile, 'Tie::File', $copy or die "cannot tie copy and hfile $!";
> tie my @bfile, 'Tie::File', $recapfile or die "cannot tie recapfile and
> bfile $!";
>
>
> When I execute it. I get
>
> cannot tie copy and hfile Permission denied at 4c1.pl line 11.
>
> This is Windows. Everyone has RW permissions on the "copy" file.
>
> What is wrong here?
>
> Thanks.
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>

Reply via email to