#!/usr/bin/perl -w open my $FH, '>', "test\ \r\x1b" or die; print $FH "foo\n"; close $FH;