Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Regex To Remove File Extension

by grep (Monsignor)
on Dec 10, 2008 at 21:09 UTC ( [id://729507]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    index.html
    foo.pl
    CGI.pm
    video.mpeg
    foo.pl~
    
  2. or download this
    .foo
    .bar
    
  3. or download this
    my @names = qw/ index.html foo.pl CGI.pm video.mpeg foo.pl~ .bash_hist
    +ory .bash_rc /;
    foreach my $string ( @names ) {
    ...
        $string =~ s/(.+)\.[^.]+$/$1/;
        print "$string\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-03-19 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found