Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Directory Name

Expand Messages
  • chuck_boyd
    That works! Thanks HTH.
    Message 1 of 4 , Jun 29, 2006
    • 0 Attachment
      That works! Thanks HTH.



      --- In perl-beginner@yahoogroups.com, tnas <nascimentothiago@...> wrote:
      >
      > Try this:
      >
      > my ($DirName) = $dir =~ m!\\(\w*)$!;
      >
      > HTH
      >
      > chuck_boyd escreveu:
      > >
      > > Hello,
      > >
      > > Can anyone tell me an easy way to extract the directory name from a
      > > string? For example, I am trying to extract "Bar" from the following.
      > >
      > > $dir = 'L:\Foo\Bar';
      > >
      > > I have tried the following with no luck.....
      > > my ($DirName) = $dir =~ m!\\(.*?)$!;
      > >
      > > Thanks!
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.