I'm assuming you want the word after the last \ but before the first _.
Right? If so:

#!/usr/bin/perl
use warnings;
use strict;

my
$FILENAME='C:\Developer\view_local\local_nt\FDAFDSAFDSASDFA\ASDFDAFSASDF\New
Process_date_22-oct-2004.log';
my $file = (split /_/, (split /\\/, $FILENAME)[-1])[0];
print $file;


"Sreedhar Kalkunte-Venkatachala" <[EMAIL PROTECTED]>
wrote...
Hi

I have a problem

I have
$FILENAME=C:\Developer\view_local\local_nt\FDAFDSAFDSASDFA\ASDFDAFSASDF\NewP
rocess_date_22-oct-2004.log

How to get 'NewProcess only word

kindly let me know




-- 
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