http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5288
[EMAIL PROTECTED] changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Undefined |3.2.0
------- Additional Comments From [EMAIL PROTECTED] 2007-01-09 21:40 -------
Hrm, interesting! I didn't know about this "special" behavior of open()...
Unfortunately, both leading and trailing whitespace is removed, and redirection
characters are honored, which is bad. So we'll have to deal with this a little
more directly.
If anyone's interested, here's a snippet from "perldoc -f open":
The filename passed to 2-argument (or 1-argument) form of
open() will have leading and trailing whitespace deleted, and
the normal redirection characters honored. This property,
known as "magic open", can often be used to good effect. A
user could specify a filename of "rsh cat file |", or you could
change certain filenames as needed:
$filename =~ s/(.*\.gz)\s*$/gzip -dc < $1|/;
open(FH, $filename) or die "Can't open $filename: $!";
Use 3-argument form to open a file with arbitrary weird charac-
ters in it,
open(FOO, '<', $file);
otherwise it's necessary to protect any leading and trailing
whitespace:
$file =~ s#^(\s)#./$1#;
open(FOO, "< $file\0");
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.