many thanks that works... What i am getting is a Permission denied
I can't see why here.. do i have to do a chmod 666 on the file or something?? sub key_counter { my @countermyfile; my $keycounter; open(IN,"$working_folder/counter.txt"); (@countermyfile=<IN>); $keycounter=$countermyfile[0]; $keycounter++; close(IN); if ($keycounter > 99999999) {$keycounter=10000000;} open(OUT,">$working_folder/counter.txt") or die "$working_folder/counter.txt - $!"; print OUT $keycounter; close(OUT); return ($keycounter); } ----- Original Message ----- From: "Gary Turner" <[EMAIL PROTECTED]> To: "'Johnno'" <[EMAIL PROTECTED]> Sent: Wednesday, May 01, 2002 9:34 PM Subject: RE: [Perl-unix-users] open file etc.. > > Hi, > > The error can be found in $! > > open(OUT,">$working_folder/counter.txt") or die "$!"; > > Regards > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] On > > Behalf Of Johnno > > Sent: 01 May 2002 10:30 > > To: [EMAIL PROTECTED] > > Subject: [Perl-unix-users] open file etc.. > > > > > > > > open(OUT,">$working_folder/counter.txt") or die "cannot create counter > > file"; > > > > how can i make it so it will tell me what the error is and > > don't cannot > > create counter file?? > > > > Many Thanks, > > Johnno > > > > _______________________________________________ > > Perl-Unix-Users mailing list > > [EMAIL PROTECTED] > > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > > _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs