katgirl has asked for the wisdom of the Perl Monks concerning the following question:
I tried to sort this by using this snippet:
But this gives me "me_swimming_jpg" and "J_R_ewing_jpg"$imagename =~ s/\W/\_/g;
What's the best way to take out the non-alphanumeric symbols from the file name, but leave the .jpg extension intact?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing file names as they are uploaded
by fireartist (Chaplain) on Sep 19, 2002 at 12:00 UTC | |
|
Re: Changing file names as they are uploaded
by Joost (Canon) on Sep 19, 2002 at 12:09 UTC | |
by blakem (Monsignor) on Sep 19, 2002 at 12:32 UTC | |
|
Re: Changing file names as they are uploaded
by BrowserUk (Patriarch) on Sep 19, 2002 at 15:38 UTC | |
|
Re: Changing file names as they are uploaded
by davorg (Chancellor) on Sep 19, 2002 at 11:38 UTC | |
by fireartist (Chaplain) on Sep 19, 2002 at 11:43 UTC | |
by katgirl (Hermit) on Sep 19, 2002 at 11:41 UTC | |
by blakem (Monsignor) on Sep 19, 2002 at 11:50 UTC | |
|
Re: Changing file names as they are uploaded
by Washizu (Scribe) on Sep 19, 2002 at 14:11 UTC | |
|
Re: Changing file names as they are uploaded
by helgi (Hermit) on Sep 19, 2002 at 14:00 UTC |