Jaimee Spencer wrote: > > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > > > > Either of these should work: > > > > (my $projectId) = $projectDocDir =~ m!.*/(\w+)/!; > > > > # or > > > > my $projectId = (split /\//, $projectDocDir)[-2]; > > I know I am missing something basic here also, but tell me in the example > (my $projectId) = $projectDocDir =~ m!.*/(\w+)/!; > why isn't the /1_0001.doc being printed as well?
Because the (\w+) has to have a slash '/' in front of and behind it. /1_0001.doc doesn't have a slash at the end. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]