Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Removing unwanted chars from filename.

by AnomalousMonk (Archbishop)
on Oct 06, 2022 at 23:13 UTC ( #11147279=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub filter {
        my $str = shift or return '';
        return $str =~ tr/A-Za-z0-9.-//cdr;
    }
    
  2. or download this
    Win8 Strawberry 5.30.3.1 (64)  Thu 10/06/2022 19:03:53
    C:\@Work\Perl\monks
    ...
    ok 5 - '%^&*'{[(]})'.!@$' -> '.'
    ok 6 - '%^&*'{[(]})'!@$' -> ''
    ok 7 - no warnings
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11147279]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2023-05-29 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?