in reply to extension check on upload script doesn't do anything

I realize this still does not answer your main question, but your updated code probably does not do what you want:
unless(@allowedext = $extension)
That is an assignment, whereas you probably wanted some kind of comparison. You clobber all elements of the array, then set the array to a single value. Since the assignment is (probably) always successful, you never enter the unless clause. I think you really want a hash like GrandFather suggested.
  • Comment on Re: extension check on upload script doesn't do anything

Replies are listed 'Best First'.
Re^2: extension check on upload script doesn't do anything
by edwardra3 (Initiate) on Feb 23, 2011 at 18:15 UTC
    toolic, Thanks for the explanation. I'm still very to to Perl (obviously), coming from a background in VB. Your explanation tells me why the script doesn't complain about an improper filetype.

    As I mentioned to GrandFather, when I substituted his code into my script, it just creates a 500 error. I've been reading the perldoc for map, plus tutorials on PM and elsewhere. I'm at a loss. It works at the command line, but when I upload it to my host, it 500's.