in reply to Perl to executable conversion error

$filename is a scalar, but you're using it like an array in line 6. Just say:

 open (FH,$filename) or die "Can't open $filename: $!";

(I added error checking for you)

TheEnigma

Replies are listed 'Best First'.
Re^2: Perl to executable conversion error
by herveus (Prior) on Oct 07, 2004 at 13:09 UTC
    Howdy!

    That's just not correct. There is nothing wrong with the syntax of the code as presented.

    What do you mean when you say "you're using it like an array"?

    Update: Ah...that makes sense. Bad OP. No biscuit. By silently changing your node, you make other people look foolish, and you make yourself look not so good either. At least add a postscript that explains your change, since it was significant.

    yours,
    Michael
      He's corrected it since he first posted. It used to say:

      line 6: open (FH,$filename[0]);

      as gothic_mallard also pointed out.

      TheEnigma