Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: File Extension Renaming

by japhy (Canon)
on Jul 05, 2006 at 15:59 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-28 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found