>
>I have a string such as
>instance/bit/bitGroup/default/tz/l_cs
>where the last directory stands for os languages.
>
>I have to get the last directory and assign it to a var such as
>$mylang = l_cs, in the above example.
>How can i achieve that?
>

Hello,

Here is one way to do it:

my ($mylang) = $path =~ /.*\/(.+)$/;

--
祝所有中华Perl用户新春快乐!
Happy New Year for all Chinese Perl guys!

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


Reply via email to