Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: unlink fails to delete files with perculiar names

by BrowserUk (Pope)
on Nov 22, 2011 at 11:02 UTC ( #939424=note: print w/ replies, xml ) Need Help??


in reply to Re^2: unlink fails to delete files with perculiar names
in thread unlink fails to delete files with perculiar names

It's merely speculation that he assigned it using a double-quoted literal

Agreed. That's why likely work.

It might just as well have come from a readdir

But don't you have to combine the values from readdir with the path in order to get a fully qualified path?

Could he be doing something like  $targ = "$path/$fname";?

why would unlink have returned 1, as the OP states?

Not sure, but that construct looks suspect to me: my($no) = unlink $targ || carp "Unable to delete file $targ\n";.

What ends up in $no if unlink returns 0; the return value from carp()?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^3: unlink fails to delete files with perculiar names
Select or Download Code
Re^4: unlink fails to delete files with perculiar names
by Anonymous Monk on Nov 22, 2011 at 11:06 UTC
    Yup
    $ perl -MCarp -e " my $f = unlink (666) || carp 1; die $f " 1 at -e line 1 1 at -e line 1.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-07-12 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (241 votes), past polls