in reply to Re: generate a new toc
in thread generate a new toc

OK I tried to do open (INP, "+>" $file)or die "Could not open file $file : $!\n"; now I get a scalar found where operator expected error..

Replies are listed 'Best First'.
Re^3: generate a new toc
by shmem (Chancellor) on Feb 20, 2008 at 22:22 UTC
    OK I tried to do open (INP, "+>" $file)or die

    The arguments of open() are separated with commas. You mean

    open (INP, "+>", $file) or die;

    Don't put single variables into double quotes, it is a useless interpolation (except when you use a reference of a package which overloads stringification, and know what you're doing).

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      even with single quotes I get the same error, I really need to get this working, I was thinking maybe html link extor would help, I am really puzzled why my new file doesn't work, could the # signs in the urls be the problem? id:669050 is my original post.
        even with single quotes I get the same error

        It's the missing comma, not the quotes... — look more closely what shmem wrote.

        (The quotes thing was about "$file" vs. $file, and that the double quotes are useless there, usually.)