Re: quotes difference in Perl5.6 vs 5.8
- From: "Petr Vileta" <stoupa@xxxxxxxxxxxxx>
- Date: Sun, 14 Oct 2007 03:32:55 +0200
Ben Morrow wrote:
Quoth "Petr Vileta" <stoupa@xxxxxxxxxxxxx>:Thank you for confirmation of my suspicion :-) I never installed Perl 5.8.0 but admin on some hosting server do it ;-( I wrote scripts for Perl 5.6.1 and these run fine on many hosting servers on different Perl's. I never see as many troubles as on this hosting.#!/usr/bin/perl
use strict;
use warnings;
my $var = "abcd'efg";
open OUT, "> log.txt" or die("You stupid!");
print OUT "$var\n";
close OUT;
This work in Perl 5.6.1 but fail in 5.8.0, but if I change this
Don't use 5.8.0. It is very buggy. You should upgrade to 5.8.1 if at
all possible.
My thinks are the same. This must be the same if Perl is not buggy, or server not fail randomly.print OUT "$var\n";
to this
print OUT $var, "\n";
then this work in both Perl versions.
I *seriously* doubt this makes any difference... I think it's more
[...]
What is STDERR open to?I don't know ;-) Maybe is redirected somewhere to user error-log file, to some parser script, really don't know.
I not redirect STDERR anywhere in my script except in SIGPIPE handler.
What happens if you set $SIG{PIPE} to 'IGNORE' and check the returnThis is impossible. I grab html code from web pages, parse it and store to database. If I ignore SIGPIPE then I can store wrong data to database. I must be sure that data are OK or exit from script.
value of all your print statements?
What happens if, instead of this, you install your SIGPIPE handlerI did not know this, I will take a look to it. I'm trying to not use POSIX, because many functions are not multiplatform and my scripts are running on Linux and Windows servers too.
with POSIX::sigaction, which will bypass safe signals; something like
Thanks for your tips.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail from another non-spammer site please.)
.
- References:
- quotes difference in Perl5.6 vs 5.8
- From: Petr Vileta
- Re: quotes difference in Perl5.6 vs 5.8
- From: Abigail
- Re: quotes difference in Perl5.6 vs 5.8
- From: Petr Vileta
- Re: quotes difference in Perl5.6 vs 5.8
- From: Ben Morrow
- quotes difference in Perl5.6 vs 5.8
- Prev by Date: FAQ 5.15 Why do I sometimes get an "Argument list too long" when I use <*>?
- Next by Date: Re: Passing Post Params & Object Reference ?
- Previous by thread: Re: quotes difference in Perl5.6 vs 5.8
- Next by thread: FAQ 5.9 How can I use a filehandle indirectly?
- Index(es):
Relevant Pages
|