Check out 'perldoc perlre' and 'perldoc -f substr'.

If you are using a regular expression, you can use the '^' character to
denote the beginning of the string, and parentheses to grab what you
need.

You can also check out the substr() function.



-----Original Message-----
From: alex litvak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 12:12 PM
To: beginners@perl.org
Subject: Matching the first string

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.





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to