I am confronted with an error here I am not understanding for I have done this many time and this time it does not seem to work.
I looked at earlier code I made in Perl and it is pretty much done in a similar manner.
Any clues on why I have this error: readline() on close filehandle $handle?
Thanks
sub changeData{ my ($self) = @_; `$toolPath/an2k2txt ./Templates/DFP.nst ./tmp/Data2`; open my $handle, "<", "./Data2"; my $file = new IO::File("./$self->{_nistName}.tmp","w"); my $data; while(<$handle>){ if ($_ =~ m/$self->{_field}/i){ chomp($_); $_ =~ s/=.*//; #Seems that \x1F\x0A is the delimiter at the e +nd of the lines $data = $_."=".$self->{_newValue}."\x1F\x0A"; print $file $data; } else{ print $file $_; } print "$_\n"; } close $handle; `$toolPath/txt2an2k ./$self->{_nistName}.tmp ./Nist/$self->{_n +istName}.bad`; system("rm -f ./*.tmp"); }
In reply to readline() on close filehandle $handle by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |