Just another Perl shrine | |
PerlMonks |
Re: Appending /*.* to default Perl variable $_by Athanasius (Archbishop) |
on May 26, 2020 at 07:47 UTC ( [id://11117268]=note: print w/replies, xml ) | Need Help?? |
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!
In Section
Seekers of Perl Wisdom
|
|