I copied some Perl code about a year ago to do a file upload to an
apache server file system. In 5.6, the system worked fine. Now in 5.8,
I'm getting a failed filehandle read with the CGI-upload function.
Here is the code:
use CGI;
use Fcntl qw(:DEFAULT :flock);
[EMAIL PROTECTED] (Wren Argetlahm) writes:
I've recently discovered the joys of return undef; for
error catching, but I'm having problems when the
subroutine returns a hash (unless there's an error).
Something like the following:
%hash = subroutine($input) or error($error);
returns the
Now and then I copy data from the web and paste it into a perl script
after __END__ or __DATA__. I plan to take the data apart with perl.
The file is generally a BBEdit text file with unix line feeds.
Sometimes there are bullets in the data. According to HexEdit these
bullets are \xca characters,
At 11:22 am -0500 10/1/04, Vic Norton wrote:
What is going on here? HexEdit sees one byte for each bullet and perl
sees two. I thought hex stuff was unambiguous, but, as a mathematician,
I am pretty certain that 1 is not equal to 2.
Perl talks UTF-8. The bullet in utf-8 is chr (8226) \x{2022}
--- Piers Cawley [EMAIL PROTECTED] wrote:
This is because 'return undef;' is good, but
'return;' is better. It
returns the correct, context dependent
representation of false.
That seems to have fixed my problem, but I'm not sure
why it works. My error($error) is now something to
the effect
On 1/10/04 wren argetlahm wrote:
--- Piers Cawley [EMAIL PROTECTED] wrote:
This is because 'return undef;' is good, but 'return;' is better. It
returns the correct, context dependent representation of false.
That seems to have fixed my problem, but I'm not sure why it works. My
error($error) is
I'm sorry, John. I was talking figuratively. I didn't mean real bullets.
How come Perl sees C2 A0 whenever HexEdit sees CA and visa versa?
I don't care what kind of characters we are talking here. To
paraphrase Gertrude Stein, a byte is a byte is a byte. At least
that's what I thought until
On Jan 10, 2004, at 9:26 PM, Vic Norton wrote:
How come Perl sees C2 A0 whenever HexEdit sees CA and visa versa?
I don't care what kind of characters we are talking here. To
paraphrase Gertrude Stein, a byte is a byte is a byte. At least
that's what I thought until now.
Like John said - text