CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
"Cannot create file C:\Program Files\Perl Express\Debug\Out10.txt"

 



PerlUser12
Novice

Oct 10, 2012, 1:27 AM

Post #1 of 4 (2148 views)
"Cannot create file C:\Program Files\Perl Express\Debug\Out10.txt" Can't Post

Hello Everyone!

I am new to Perl and to this forum as well. Just started learning Perl through Teach youself Perl in 21 days. I have installed Perl Express to get work with Perl.

And I am encountering an error while running a sample program on arrays that, "Cannot create file C:\Program Files\Perl Express\Debug\Out10.txt" and not able to run the program that ll take inputs from the user. Other sample programs are running fine. The code is below:

print ("Enter the start number");
$start = <STDIN>;
chop($start);

print ("Enter the end number");
$end = <STDIN>;
chop($end);

# print ("Make a list range \n");
@list = ($start..$end);

$count = 0;

print ("Here is the list: ");
while ($list[$count]!=0 || $list[$count-1]==-1 || $list[$count+1]==1) {
print ("$list[$count] \n");
$count++;
}



Kindly let me know what this error is all about and how to resolve this error.

Thanks in advance!


Laurent_R
Veteran / Moderator

Oct 10, 2012, 10:28 AM

Post #2 of 4 (2138 views)
Re: [PerlUser12] "Cannot create file C:\Program Files\Perl Express\Debug\Out10.txt" [In reply to] Can't Post

I do not understand why it is trying to create that file, but does the path C:\Program Files\Perl Express\Debug\ exist? In oher words, is there de Debug directory under C:\Program Files\Perl Express?

If not, creating it might just solve the issue.


PerlUser12
Novice

Oct 10, 2012, 10:48 PM

Post #3 of 4 (2128 views)
Re: [Laurent_R] "Cannot create file C:\Program Files\Perl Express\Debug\Out10.txt" [In reply to] Can't Post

Thanks for your response!

Yes, there exists a Debug folder in Perl Express folder and also there is a Out10.txt file inside that Debug. I am not able to open that txt file. And not able to run my program too. This error happens occasionally while running different sample programs. This seems to be a petty error; not able to figure out what/ why it occurs though.


FishMonger
Veteran / Moderator

Oct 11, 2012, 8:02 AM

Post #4 of 4 (2120 views)
Re: [PerlUser12] "Cannot create file C:\Program Files\Perl Express\Debug\Out10.txt" [In reply to] Can't Post

It's not possible to get that error from the code you posted.

Do you have any code in your script that attempts to open a file? If not, then you must have some kind of funky misconfiguration of your IDE.

Try running your scripts outside of the IDE.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives