Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Why don't you ever post the error message you get?

by wolverina (Beadle)
on Mar 18, 2004 at 09:49 UTC ( #337648=note: print w/replies, xml ) Need Help??


in reply to Why don't you ever post the error message you get?
in thread Can't rename

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: Why don't you ever post the error message you get?

Replies are listed 'Best First'.
Re: Cannot Rename
by AcidHawk (Vicar) on Mar 18, 2004 at 12:56 UTC
    Hi,

      Does the script look ok to you?

    A couple of things I would change is to add use CGI::Carp qw/fatalsToBrowser/; and then remove the chdir and put in the path $ENV{DOCUMENT_ROOT}/ into your $a and $b vars. I would also put the $a and $b between quotes.

    #!/usr/bin/perl print "Content-type: text/html\n\n"; use CGI; $q = new CGI; $a = "$ENV{DOCUMENT_ROOT}/file1.htm"; $b = "$ENV{DOCUMENT_ROOT}/file2.htm"; rename("$a", "$b") || die "Can't rename $!";
    -----
    Of all the things I've lost in my life, its my mind I miss the most.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-03-06 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (116 votes). Check out past polls.

    Notices?