sekhar kavuru wrote:

> my $str = "/install/sql/foo.c;
>  
> from $str string I need to get *"/install/sql/ *
>  
> Any help

use File::Basename or you can use a RE:

(my $dir = $str) =~ s/[^\/]+$//;        # remove any non /s from end of string

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to