i fixed it now...I didn't know about the /code tags..heres the error message..
Name "main::filename" used only once: possible typo at C:\users\xxx\desktop\perl\script.pl line 7
use of uninitalized value in concatenation <.> or string at C:\users\xxx\desktop\perl\script.pl
can't open : no such file or directory at c:\users\xxx\desktop\perl\script.pl