Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-27-2001, 03:49 AM   #1
LQ Newbie
Registered: May 2001
Posts: 29

Rep: Reputation: 15
Missing MIME type

I get an "uninitialized variable" msg from:

my $Mime = uploacInfo($FileName) -> {Content-type};
that should be:

my $Mime = uploadInfo($FileName) -> {Content-type};
given the above line, when I try:
print $Mime;
this variable $Mime is still undefined
This is using Netscape 4.5 and Apache 1.3.19, and Perl 5
The file prints out in the browser OK
I have no idea how to research this question, the script
is at a very basic level. I've tried on 2 machines.

Old 08-16-2001, 05:54 AM   #2
Registered: Jun 2001
Location: Los Angeles, CA USA
Distribution: RedHat
Posts: 53

Rep: Reputation: 15
Where are you doing the Print? When you use My, you are making a local variable. If you try and use that variable outside the block/function where you declared it, it will now be undefined.

I would try testing it right after the assignment, and printing out it's value then. Could be a problem with the uploadInfo call, or with $filename. Basically any params, put in debugs so you're sure what you're passing is what you thought you were.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
OOCalc Mime Type FYZ Linux - Software 0 08-25-2005 03:51 AM
Can't find Mime Type cootetom SUSE / openSUSE 20 08-16-2005 01:58 PM
change mime type dARkHunTEr Linux - Software 0 08-03-2003 12:30 PM
how do I change mime type? brian_eye Linux - Newbie 2 06-10-2002 09:14 AM
Mime type settings saravanan1979 Linux - Newbie 0 04-15-2002 05:53 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration