in reply to Re: Using Basename
in thread Using Basename

thanks for that. I tried first option but having problems picking up correct files and printing. doesn't seem to recognise *.pl and I'm wondering whether using the current directory is causing a problem. First return off print statement looked like the opening screen of the matrix

Replies are listed 'Best First'.
Re: Re: Re: Using Basename
by Limbic~Region (Chancellor) on Nov 17, 2003 at 17:24 UTC
    blueapache,
    broquaint said HTH (had to hurry). Try this slightly modified code:
    #!/usr/bin/perl -w use strict; use File::Basename; my @result = `find '.' -type f -name '*.pl' -print` or die "No scripts + found - $! \n"; chomp @result; my @basenames = map { basename($_) } @result; print $_, $/ for @basenames;
    Cheers - L~R
      broquaint said HTH (had to hurry).

      How about "Hope This Helps" or "Hope That Helps" or "Happy To Help" maybe?

      I'd guess broquaint meant one of the first two as the last is usually offered after a "thanks".

      -sauoq
      "My two cents aren't worth a dime.";
      
      Limbic~Region:

      I read HTH, especially at the end of a message, as Hope That Helps.

      edit: oops, missed sauoq's more timely reply

      thanks this works a treat