Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: File Extension Renaming

by japhy (Canon)
on Jul 05, 2006 at 15:59 UTC ( #559379=note: print w/replies, xml ) Need Help??

in reply to Re: File Extension Renaming
in thread File Extension Renaming

In your rename ... || die, the || binds too tightly: it binds to the "$dir/$new_name" string, not to the return value of rename(). Either use rename(...) || die or rename ... or die.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Replies are listed 'Best First'.
Re^3: File Extension Renaming
by ciderpunx (Vicar) on Jul 05, 2006 at 16:02 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2022-05-18 14:18 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (71 votes). Check out past polls.