plechazunga has asked for the wisdom of the Perl Monks concerning the following question:

Well, that's what the warning sez: Modification of a read-only value attempted at C:/.../OOSheets.pm line 111.

The offending line is in &handle_char: @{$res{$curr_rec->{table}}}{ map {_11_2_A1($_)} grep {exists $sonar_cells{$_}} keys %current}.=$data ;

... and the sub invoked in that line:

sub _11_2_A1 { my $addr=shift; return $enumeration_map{$addr}; }

I'm just trying to parse an .ods file, to no avail, as I get the above message whenever I invoke GetData. The OOSheets README lists Filesys::SmbClient and Text::Iconv as dependencies, but I don't have either installed (because I don't have Samba or iconv installed, to my knowledge, on my Win7 laptop) and I can still use OpenOffice::OOSheets without perl giving me the "can't locate *.pm in @INC" abort error. Do I need to try to install either of the two applications, or is there something else I'm missing?

Replies are listed 'Best First'.
Re: OOSheets modifying read-only value
by CountZero (Bishop) on Feb 13, 2011 at 09:15 UTC
    What happens if you type iconv --version in your command line?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      It's not installed:
      'iconv' is not recognized as an internal or external command, operable program or batch file.
        Then you will have to install it.

        There is a module Alien::Iconv which does just that.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James