Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Re: Re: how to rename all files in a dir

by oakbox (Chaplain)
on Jul 07, 2002 at 14:37 UTC ( #179970=note: print w/replies, xml ) Need Help??

in reply to Re: Re: how to rename all files in a dir
in thread how to rename all files in a dir

The real poison pill here is symlinks. Let's say you chdir to a location on your file system and read the listings there. Perl has no way of knowing if you came to that directory through 'hard' links or symlinks. And what is returned by pwd from the command line may or may not match up with what that command will return within perl.

So, the answer to your question is, you probably DO want the full path in many situations, but there is no way to automatically get there from within a script. You will usually end up putting in some code that forces Perl to use a particular directory location.


  • Comment on Re: Re: Re: how to rename all files in a dir

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2020-04-04 00:30 GMT
Find Nodes?
    Voting Booth?
    The most amusing oxymoron is:

    Results (32 votes). Check out past polls.