http://qs321.pair.com?node_id=11117268


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,

Replies are listed 'Best First'.
Re^2: Appending /*.* to default Perl variable $_
by geertvc (Sexton) on May 26, 2020 at 16:32 UTC
    Thanks guys for the swift answer.

    Apologies too for not being punctual in my description. Will take it with me for the next question.

    Best,
    --Geert