473,395 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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.
Jul 19 '05 #1
3 3744
This is Hugz Again.Please someone help me with my questions above !!!!!
Jul 19 '05 #2
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
Jul 19 '05 #3
> 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.
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: StevePBurgess | last post by:
I would like to make my downloads section unbrowsable (to users) but accessible to scripts. Can I deliver a file to a browser without linking to it's URL so that I can deliver files...
7
by: Sherry Littletree | last post by:
Hi All I am working on a site that has a large amount of common html on all its web pages. I am looking for a way to place this in a single file so, if changes are made, I can change this...
9
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
13
by: DH | last post by:
Hi, I'm trying to strip the html and other useless junk from a html page.. Id like to create something like an automated text editor, where it takes the keywords from a txt file and removes them...
6
by: shuaishuaiyes | last post by:
Hello everyone... I'm a Chinese student and my English is very poor...So excuse me if I make grammar mistake. I want to ask some questions about "rename". I'm a beginner, so my C ..... :) I...
9
by: Charles Crume | last post by:
Hello Everyone; My site was hacked the other day -- someone was able to rename my index.shtml file and put their own index.html file on my server. Not sure how it was done, but looking through...
2
luke14free
by: luke14free | last post by:
Hello guys, I've been searching for a method to hide the console (as c/c++ user would say) under windows, but i found nothing really helpful. What I found is: 1) I need to rename file as pyw. But...
4
viktorijakup
by: viktorijakup | last post by:
Hi !!! @rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S %0 %* if NOT "%COMSPEC%" ==...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.