You could use:

$var = 'M:\jav_test\train\final\cs1.txt';
@array = split(/\\/,$var);
$last = $array[$#array];

print "$last\n";

OR

$var =~ /^.+\\(.+)$/;

print "$1\n";

Both print cs1.txt


Rob
> -----Original Message-----
> From: Javeed SAR [mailto:[EMAIL PROTECTED]]
> Sent: 14 October 2002 04:08
> To: [EMAIL PROTECTED]
> Subject: array
> 
> 
> Hi All, 
> i want to get the last part in an array @help from the 
> following output: 
> M:\jav_test\train\final\cs1.txt 
> i.e: 
> @help must  have cs1.txt
> 
> 
> TIA 
> 
> 
> 
> 

-- 
Email Disclaimer can be viewed at: 
http://www.netscalibur.co.uk/email.html 
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to