You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/perluse strict;
use warnings;
use Test::MockFile;
my$mock_obj = Test::MockFile->dir( '/path', [qw/uh like whut/] );
if ( opendir( my$dh, $mock_obj->{'file_name'} ) ) {
print"opened dir $mock_obj->{'file_name'}\n";
while ( readdir$dh ) {
print"- $_\n";
}
closedir($dh);
}
else {
print"cannah do iht capt'n\n";
}
$>perl foo.pl
opened dir /path
Use of uninitialized value $_ in concatenation (.) or string at foo.pl line 12.
-
Use of uninitialized value $_ in concatenation (.) or string at foo.pl line 12.
-
Use of uninitialized value $_ in concatenation (.) or string at foo.pl line 12.
-
Use of uninitialized value $_ in concatenation (.) or string at foo.pl line 12.
-
Use of uninitialized value $_ in concatenation (.) or string at foo.pl line 12.
-
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: