Reputation: 12452
I ran into this subroutine:
241 sub update_file {
242 my $old = shift;
243 my $new = shift;
244
245 my @old = <$old*>; <----------
246
247 if (scalar(@old) == 0) {
...
I goolged perl <*> but I wasn't able to find it anywhere.
What does <*> do?
Upvotes: 1
Views: 92
Reputation: 385877
<$old*>
is the same as glob(qq<$old*>)
which can also be written as glob("$old*")
.
If $old
is something like
/foo/some\ dir/
it will list return the files in
/foo/some dir
except those that start with .
.
Upvotes: 7