Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Pattern replace in a file name

by hdb (Monsignor)
on Mar 28, 2019 at 09:22 UTC ( [id://1231785] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    s|(/[.0-9]+)/.*|$1| for @f;
    
    print "$_\n" for @f;