in reply to CGI Upload with OLD CGI.pm

It's not clear what "almost works" means. Are you expecting a filename or a filehandle from the param() call? (My guess is filename, based on fuzzy recollection). I'm also guessing that you're getting glob operation instead of a filehandle read, but that's a big shot in the dark.

If declaring @buffer as a lexical before the block fails, either your installation of Perl is completely broken, or the code inside the block is completely broken. I'd lean towards the latter.

Print the contents of $buffer before you transliterate or split, and see if it's what you expect. My guess is that it isn't.

Replies are listed 'Best First'.
Re: Re: CGI Upload with OLD CGI.pm
by amelinda (Friar) on Oct 17, 2001 at 23:19 UTC
    I should get a filehandle from the param() call. I do. I can read it all in. If I print the contents of $buffer, they are exactly as I expect. If I print elements of @buffer after the split, they are as I expect. As I mentioned, if my prints are all inside the no strict; block, they function as expected. It's just as if the data doesn't exist outside the block (which, I think, it doesn't).

    It "almost works" as in, if i stopped use strict;ing, it would probably all work.