Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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.

Replies are listed 'Best First'.
Re^4: unlink fails to delete files with perculiar names
by Anonymous Monk on Nov 22, 2011 at 11:06 UTC
    $ perl -MCarp -e " my $f = unlink (666) || carp 1; die $f " 1 at -e line 1 1 at -e line 1.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939424]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2018-03-23 15:07 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (294 votes). Check out past polls.