Click here to get back home

Re: Rename File Using Strring Found in File?

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Re: Rename File Using Strring Found in File? Tad J McClellan 03-06-2008
Posted by Tad J McClellan on March 6, 2008, 8:11 pm
Please log in for more thread options
>> On Tue, 04 Mar 2008 12:10:16 GMT, Tad J McClellan
>>

>>> foreach my $file ( glob 'E:/personalinjury/*.htm' ) { # untested

>>> rename $file, "$newfile.htm" or die "could not mv '$file' $!";

>> THere are however some problems
>> with the code you posted above here. For one, the rename() function
>> takes string values as arguments, not file handles.
>
>
> Right.


Oh. I think I see what happened there.

A filename glob (perldoc -f glob) is not the same as a "typeglob"
("Typeglobs and Filehandles" section in perldoc perldata).


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher0cmdat/"

Similar ThreadsPosted
Re: Rename File Using Strring Found in File? March 3, 2008, 11:08 pm
Re: Rename File Using Strring Found in File? March 4, 2008, 10:21 am
file not found in DBD::Oracle August 30, 2005, 9:21 am
FAQ 7.24: Why can't a method included in this same file be found? November 10, 2004, 12:03 pm
FAQ 7.24 Why can't a method included in this same file be found? March 5, 2005, 12:03 pm
FAQ 7.24 Why can't a method included in this same file be found? May 21, 2005, 11:03 pm
FAQ 7.24 Why can't a method included in this same file be found? August 6, 2005, 4:03 pm
FAQ 7.24 Why can't a method included in this same file be found? September 4, 2005, 4:03 am
FAQ 7.24 Why can't a method included in this same file be found? January 4, 2006, 5:03 am
FAQ 7.24 Why can't a method included in this same file be found? February 9, 2006, 12:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap