On 4/25/07, Nishi <[EMAIL PROTECTED]> wrote:
Hi:

What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in perl?

Would this work --
my $fileName=$path =~ /.*\/(.+)$/;

Thanks!

There are many options, but none of them are as good as using
File::Basename.  Why do you not want to use it?

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to