in reply to Appending /*.* to default Perl variable $_
Hello geertvc, and welcome to the Monastery!
The glob function expects an expression which evaluates to a string, so use either unlink glob "$_/*.*"; or unlink glob $_ . '/*.*';. (The latter form uses . as the concatenation operator.)
BTW, “has issues” isn’t very informative! In future, please detail the warning or error message(s) you are getting.
Hope that helps,
Update: Added forward slash to the concatenation example. Thanks, AnomalousMonk!
Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In Section
Seekers of Perl Wisdom