You might want to modify the respective test to figure out what ls and Perl disagree on, e.g.
my $try = sub { # line 287
my @c1 = eval qq[\$DEV =~ /^$_[0].*/mg];
my @c2 = eval qq[grep { $_[1] "/dev/\$_" } \@DEV];
### add this
if ($_[1] eq "-c") {
my @c = map { /(\S+)$/; $1 } @c1;
my %diff;
@diff{@c} = ();
delete @diff{@c2};
print "!!: $_\n" for keys %diff;
exit;
}
###
my $c1 = scalar @c1;
my $c2 = scalar @c2;
is($c1, $c2, "ls and $_[1] agreeing on /dev ($c1 $c2)");
};
and then contemplate on who is right with respect to whether the reported entry is a "character special" file.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|