alex litvak am Donnerstag, 12. Januar 2006 21.11: > Hello all > im new in perl and i need some help > > i`ve written a script whose purpose is to put files in different > directories by its first later, the problem is that every file begins > with different chars for example "01 - Eminem Encore.mp3" > my question is how can i get to the first latter in the name (in this > case it was E), i need just the expression that does it.
-- >> use strict; use warnings; $_='01 - Eminem Encore.mp3', /^[^a-zA-Z]*([a-zA-Z])/, print $1; << -- But first, read (at the cmdline): perldoc perlre where you can find most information on regular expressions to adjust the above one to your needs. hth, joe -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>