Re: Removing a space from file name
walt via beginners <[email protected]> Thu, 20 Feb 2025 08:01:07 +0800
| Newsgroups | gmane.comp.lang.perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
On 2025-02-18 04:12, Smoot Carl-Mitchell via beginners wrote:
> On Mon, 2025-02-17 at 12:38 -0500, hput wrote:
>> I have several hundred *.jpg files with this pattern
>>
>> Actual example:
>>
>> 'AtlantaVisitAndGrandmaHands 056.jpg'
>>
>> The numbers vary, of course, but the alpha part and number of digits
>> after the space is the same in all *.jpg files
>>
>> I have hundreds of these all in one directory. Not something you'd
>> want to do one at a time.
>
> Something like:
>
> while (<*>) {
> rename $_, "$1$2.jpg" if $_ =~ /(.+) (.+)\.jpg/;
> }
>
what does <*> mean here?
thanks.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/