Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: weird GIF problem

by fullermd (Priest)
on Jan 03, 2009 at 23:01 UTC ( [id://733963]=note: print w/replies, xml ) Need Help??


in reply to weird GIF problem

Good that your problem is solved. Just a few notes on the code:

open ($myimage, "$imagelocation") or die "cannot open";

This being a web thing, it may be intentional that you limit the info exposure, but it can be easier if you include what happened in the error message:

open ($myimage, "$imagelocation") or die "cannot open: $!";

Also, you can condense the output loop down to a single print:

print <$myimage>;

<filehandle> in list context returns all the lines, and print is list context, outputting all the items in its list. And since a binary file doesn't exactly have lines anyway...

Replies are listed 'Best First'.
Re^2: weird GIF problem
by apl (Monsignor) on Jan 04, 2009 at 14:34 UTC
    One minor suggestion; I'd modify

    open ($myimage, "$imagelocation") or die "cannot open: $!";

    to

    open ($myimage, "$imagelocation") or die "cannot open $imagelocation: $!";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://733963]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-26 08:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found