Re: Perl 5.8.6 bug in open()?



On Tuesday 30 October 2007 04:33, google@xxxxxxxxx wrote:
# --- <the program> ----
my $fname = '/volumes/hd/home/kevin/file_test '; # note file ends
with a space character
print "Exists: <$fname>\n" if (-e $fname);
print "Is a file: <$fname>\n" if (-f $fname);
open(FH, $fname) or die "Can't open '$fname': $!";
close(FH) or die "Can't close '$fname': $!";

# --- <the output> ---
Processing file: file_test
Exists: <file_test >
Is a file: <file_test >
Can't open 'file_test ': No such file or directory at testopen.pl
line 42.

# -- <the question> ---

Is this a known bug in Perl 5.8.6?

See the FAQ entry:

perldoc -q "trailing blanks"



John
--
use Perl;
program
fulfillment

.



Relevant Pages

  • Re: Perl 5.8.6 bug in open()?
    ... with a space character ... Processing file: file_test ... Is this a known bug in Perl 5.8.6? ... but I don't know that it qualifies as a bug. ...
    (perl.beginners)
  • Perl 5.8.6 bug in open()?
    ... with a space character ... Processing file: file_test ... Is this a known bug in Perl 5.8.6? ...
    (perl.beginners)