Please try to keep responses on-list; other people may have better answers than I do. ;)

--As of June 16, 2014 10:58:29 AM +1000, Tom Robinson is alleged to have said:

On 14/06/14 05:22, Christoph (Stucki) von Stuckrad wrote:
Hi! - and Sorry, all my tries to post did bounce.
Seemingly our updated mailsystem changed something.

So directly to you and may be somebody can post it,
if it's useful.

On Fri, 13 Jun 2014, Tom Robinson wrote:
...[errormessage]...

and Daniel Staal
...[tied split into four lines, which will work]...

Try changing

227             {printf "%s", ((localtime $twas) =~ s/... //r =~ s/:..
/ /r);}

to:               {printf("%s", ((localtime $twas) =~ s/... //r =~ s/:..
/ /r));}

There exist cases of ambiguity calling a function with a list of
parameters which themselves are lists and need (...).

Then you fix the interpretation of the parameter list by the extra pair
of (...) around ALL the parameters of printf.

Hope this helps, as I have not tested it, but experienced the
same problem many times in debug prints :-)
Hi Christoph,

Thanks for looking at this.

I tried your suggestion but it didn't help. :-\

I also tried Daniel's suggestion:

{
   my $temp = localtime $twas;
   $temp =~ s/:.. / /;
   $temp =~ s/... //;
   printf "%s", $temp;
}

Which does allow the script to run.

Daniel, you said that your fix *should* be equivalent. How will I know?

Does any one else use this script? Where I can log a bug report?

Well, to be absolutely certain, you'd need to run it through B::Deparse read the output, but I don't think you'll need to go quite that far...

Mostly that was me saying 'I'm coding in the email client - no suitability for anything is guaranteed'. I don't see any reason why it should be different in any cases - but I haven't researched all possible cases. The only real difference is that I am using a temporary variable - and even there I suspect Deparse would show that Perl is using one anyway.

If you do file a bug report someplace, mention that they should take a look at the POSIX module and strftime - I have the *strong* suspicion that the whole convoluted mess could be replaced with one function call.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

Reply via email to