Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I always thought of this tracking of your current directory to be shell magic just for the convenience of the user, eg an example (run on linux)

$ cd /usr/X11
$ pwd
$ /bin/pwd
$ ls -ld /usr/X11
lrwxrwxrwx   1 root     root            5 Oct 21  1999 /usr/X11 -> X11R6
But I see what you are saying in the case of the current directory being a deleted directory, eg :-
$ mkdir test
cd test
pwd ; /bin/pwd
rmdir .
$ pwd ; /bin/pwd
/bin/pwd: cannot get current directory: No such file or directory
Anyway, getcwd() was what I expected Cwd to use, and I was very suprised to see this /bin/pwd thing!

Thanks for the explanation. I think from the above experinents /bin/pwd == getcwd() under linux, so on that platform at least it should be replaced with getcwd(). According to my man pages getcwd() is POSIX so pretty much any unix should support it now-a-days.

In reply to RE: /bin/pwd (Re: Taint checking) by ncw
in thread Taint checking, File::Find and Cwd by ncw

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2022-05-28 23:51 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (101 votes). Check out past polls.