in reply to Re: appending to a file
in thread appending to a file

I checked the return values of chdir with Dumper. $in gives me
a glob memory address. I know that I am in the correct dir
because my regex matches the file names.

Replies are listed 'Best First'.
Re^3: appending to a file
by Anonymous Monk on Mar 19, 2009 at 22:22 UTC
    It will always give you a glob memory address
    #!/usr/bin/perl -- use Data::Dumper; use strict; use warnings; opendir my $dh, "doesnotexist.mustnotexist"; print Dumper( $dh); __END__ $VAR1 = \*{'::$dh'}; D:\dev\misc> D:\dev\misc>perl #!/usr/bin/perl -- use Data::Dumper; use strict; use warnings; for my $dir( "doesnotexist.mustnotexist", "."){ opendir my $dh, $dir; Parentheses missing around "my" list at - line 7. print "dir $dir ", Dumper( $dh); } __END__ dir doesnotexist.mustnotexist $VAR1 = \*{'::$dh'}; dir . $VAR1 = \*{'::$dh'};
    system calls can fail for any reason