Re: Renaming a File

2002-04-10 Thread Michael Stidham
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

Re: Help Required - Search and Replace

2002-03-21 Thread Michael Stidham
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

Re: output to a textfile

2002-03-19 Thread Michael Stidham
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

RE: Request from Beginner

2002-03-05 Thread Michael Stidham
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

Re: Resourch kit commands...

2002-02-13 Thread Michael Stidham
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

Re: changing file attributes

2002-01-18 Thread Michael Stidham
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

RE: Should I use -e -d or opendir ?

2002-01-10 Thread Michael Stidham
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 -

Re: Shift question...

2001-12-20 Thread Michael Stidham
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

Re: Win32: Create group, Add users

2001-12-05 Thread Michael Stidham
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); ___

Win32::File::Attributes

2001-12-05 Thread Michael Stidham
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