Re: Suppressing occasional failures in copy2 regression test - Mailing list pgsql-hackers

From tomas@tuxteam.de
Subject Re: Suppressing occasional failures in copy2 regression test
Date
Msg-id 20090622050954.GA28762@tomas
Whole thread Raw
In response to Re: Suppressing occasional failures in copy2 regression test  (Gurjeet Singh <singh.gurjeet@gmail.com>)
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Jun 22, 2009 at 03:16:05AM +0530, Gurjeet Singh wrote:

[...]

> [...] But it sure cost me a few cycles to
> realize that the files I copied from my Windows host to my Fedora VM were
> just not the thing perl would like.

Had it been a Windows-ish perl, it would have worked. Chomp uses
whatever the current value of "line separator" (or "input record separator", to be
more precise) is (that's $/). Under Unix it's just "\n".

Alas, $/ can't be a regular expression. The canonical way to deal with
that can be seen e.g. here[1].

[1] <http://perldoc.perl.org/perlport.html#Newlines>

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKPxIiBcgs9XrR2kYRAqCzAJ9uVOoVGrGKMygL6W1xPVC0X629UQCfdwFc
i7tYm+afcuu8DVo4c+mdYIM=
=0rp6
-----END PGP SIGNATURE-----


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: security checks for largeobjects?
Next
From: Peter Eisentraut
Date:
Subject: Re: rc tarball built with older flex version?