New To Perl :- Help with "rename" and "File locking"

Discussion in 'Perl' started by Hugz, Feb 23, 2004.

  1. Hugz

    Hugz Guest

    Hello,
    And Thank you for taking time to help me.Myself Hugz.I am new to
    perl and want to write my own Scripts.But i can't understand how perl
    "rename" function and "file locking" works.

    Actually i am running a WinME with ActivePerl 5.8.0, what i want to
    know is

    1.What do you mean by "file creation (and deletion) is not atomic over
    NFS" ?
    2.What is NFS?
    3.How do lock a File under Windows/Unix/Linux ?
    4.How do you rename a file reliably on Windows/Unix/Linux ?
    5.Why can't i use the following code to lock files ?

    sleep(3) while -e "file.lock"; # PLEASE DO NOT USE
    open(LCK, "> file.lock"); # THIS BROKEN CODE

    Please help me in any possible way.

    Thank You.
    Hugz, Feb 23, 2004
    #1
    1. Advertising

  2. Hugz

    Harmit Jhajj Guest

    This is Hugz Again.Please someone help me with my questions above !!!!!
    Harmit Jhajj, Feb 24, 2004
    #2
    1. Advertising

  3. Harmit Jhajj wrote:
    > This is Hugz Again.


    I thought your name is Harmit?

    > Please someone help me with my questions above


    Which question? Those in the subject line? Did you try the documentation?

    perldoc -f rename
    perldoc -q lock

    jue
    Jürgen Exner, Feb 24, 2004
    #3
  4. Hugz

    Harmit Jhajj Guest

    > I thought your name is Harmit?

    Hello jue,
    Yes my name is Harmit,but Hugz is my alias.Actually the
    questions are in the the first post that i posted in this thread.


    > Which question? Those in the subject line? Did you try the documentation?
    >
    > perldoc -f rename
    > perldoc -q lock
    >


    Yes i tried the perldocs and know how to lock and rename file but i am
    a bit confused please refer to my first post and help me !!!!

    Thank you.

    Harmit.
    Harmit Jhajj, Feb 25, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Johnson
    Replies:
    0
    Views:
    1,263
    Matt Johnson
    Aug 8, 2003
  2. Andy K
    Replies:
    0
    Views:
    109
    Andy K
    May 27, 2004
  3. Brian R.
    Replies:
    0
    Views:
    117
    Brian R.
    Jun 14, 2004
  4. lucy
    Replies:
    6
    Views:
    141
    Michele Dondi
    Sep 3, 2004
  5. Replies:
    5
    Views:
    97
Loading...

Share This Page