Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Appending /*.* to default Perl variable $_

by Athanasius (Bishop)
on May 26, 2020 at 07:47 UTC ( #11117268=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11117268]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2020-11-27 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?