Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser is not opeing my image file 1

Status
Not open for further replies.

ITadvice

IS-IT--Management
Jul 22, 2008
38
US
I am having trouble getting my code to open an image file for writing. The code works fine when I try it out in the terminal, but when I run it in a web browser, it dies when it comes to opening the file. What is the reason for this?


This the portion of my code where I am having a problem.
Code:
open(IMAGE, ">/directory/mygraph.png") or die "Not able to open image file\n"; 	
binmode IMAGE;						
print IMAGE $image->png or die "Problem writing to image file\n";
 
add $! to the die part:

Code:
open(IMAGE, ">/directory/mygraph.png") or die "Not able to open image file: $!\n";

report back if necessary.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top