Try :
perldoc -f rename
HTH - Mike
>From: "Allison Ogle" <[EMAIL PROTECTED]>
>To: "a a" <[EMAIL PROTECTED]>
>Subject: Renaming a File
>Date: Wed, 10 Apr 2002 10:05:48 -0400
>
>Hi,
>
>I am trying to open a file which has no file extension. (For example ABC
>).
>What I want to do is rename the
my $new_file;
open(FILE,') {
$line=~s/WORD_TO_REPLACE/REPLACEMENT_WORD/g;
$new_file.=$line;
}
close(FILE);
open(FILE,'>new_file.txt') or die "Can't write new_file.txt: $!\n";
print FILE $new_file;
close(FILE)
I do something like this. Hope it helps
>- Original Message -
>From: "R
print DATA "your input";
>From: Matthew Harrison <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: output to a textfile
>Date: Tue, 19 Mar 2002 18:46:50 +
>
>i have opened a filehandle to a textfile with:
>
>open(DATA, ">/home/edhunter/0001.txt") or die "Could not attach filehandle
>/home
Here is a good link to get started...
http://www.spu.edu/help/tech/basic-perl/
>From: Jason Larson <[EMAIL PROTECTED]>
>To: 'Raja Gopal' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: Request from Beginner
>Date: Tue, 5 Mar 2002 07:45:14 -0600
>
> > -Original Message-
> > From: Raj
To accept stnin use something like this:
chomp ($var = );
If you want to use a resource kit command then remember that perl needs to
know how to interpret the command and not think its part of its own
function, so enclose the resource kit command in tics like so:
`reg query "HKLM\software\somew
Jeremy,
You could try something like this:
my $Attributes = 32;
$path = "L:\\Flu\\StData\\";
foreach $e ( <$path\\*.*> ) {
Win32::File::SetAttributes ($path, NORMAL);
}
>From: "Miller, Jeremy T." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: changing file attributes
>Date: Thu, 17 Jan 200
The -e isif file exist and the -d is if the directory exist. I would have to
agree with your third snip of code.
if (-d $path){&get_on_with_it}
else {&errorMsg}
>From: Bob Showalter <[EMAIL PROTECTED]>
>To: "'K.L. Hayes'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: Should I use -e -
The way I understand it
Shift removes the first element of the list and moves (or "shifts") every
remaining element of the list to the left to cover the gap. Shift then
returns the removed element.ex:)
@list = qw(1,2,3);
$fisrtval = shift(@list);
Hope this helped...Stiddy
>From: Wim De Hul
This ought to get you started.
use Win32::NetAdmin;
GroupCreate(server, group, comment);
UserCreate(server, userName, password, passwordAge, privilege, homeDir,
comment, flags, scriptPath);
GroupAddUsers(server, groupName, users);
___
Need a little help with file attributes. I am trying to query a remote file
to file out if is set with read-only attributes, if so I would like to
remove them. Any help will be appreciated. Here is the first part, but I
can't even get the value of the attributes.
!#D://perl//bin//perl -w
$serv
10 matches
Mail list logo