in reply to Re^4: Using grep and glob to find directories containing file
in thread Using grep and glob to find directories containing file
Then I don't understand. If there's no anonymous array somewhere, then there's no counting going:
Lists don't return their length in scalar context--only arrays return their length in scalar context. Although, now I see it has the same effect in your example--because in list context glob() returns an empty list when there are no matches, and trying to retrieve the last element of an empty list is undef or some other false value.use 5.012; my $x = ('a', 'b', 'c'); say $x; --output:-- 'c'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Using grep and glob to find directories containing file
by muba (Priest) on Feb 04, 2013 at 02:52 UTC | |
|
Re^6: Using grep and glob to find directories containing file (list assignment)
by LanX (Saint) on Feb 04, 2013 at 09:41 UTC | |
|
Re^6: Using grep and glob to find directories containing file
by 7stud (Deacon) on Feb 04, 2013 at 04:03 UTC | |
by Anonymous Monk on Feb 04, 2013 at 04:06 UTC |