given that you are passing a file path you could use File::Basename eg.
<snip> use strict; use File::Basename; my $file = 'M:\jav_test\Technical_Docs\.@@\main\int_1_2b\techdoc_1_2b\2\Common_Controls \main\int_1_2b\techdoc_1_2b\1\Code_Examples\main\int_1_2b\techdoc_1_2b\2\Ext ernalID\main\int_1_2b\techdoc_1_2b\1\GetDateofBirth\main\int_1_2b\techdoc_1_ 2b\1\EnternalID_GetDateofBirth.vbp@@'; my $name = basename($file); $name =~ s/@+$//g; print $name; </snip> this seems a bit bodgy but i thought i'd offer it anyway. someone will probably knock up a regex that is better. cheers toby > -----Original Message----- > From: Javeed SAR [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 10, 2002 5:07 PM > To: [EMAIL PROTECTED] > Subject: excluding @@ > > > Hi all, > > > I want get the last part of this sentence excluding @@ > i.e i should get my output in a variable($put) like this for > the following > sentence: > > EnternalID_GetDateofBirth.vbp > > > M:\jav_test\Technical_Docs\.@@\main\int_1_2b\techdoc_1_2b\2\Co > mmon_Controls\ > main\int_1_2b\techdoc_1_2b\1\Code_Examples\main\int_1_2b\techd > oc_1_2b\2\Exte > rnalID\main\int_1_2b\techdoc_1_2b\1\GetDateofBirth\main\int_1_ > 2b\techdoc_1_2 > b\1\EnternalID_GetDateofBirth.vbp@@ > > > Regards > j > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]