on 07/09/2001 02:43 PM, Katherine Richmond at
[EMAIL PROTECTED] wrote:

> Hi all,
> 
> Is there a method that will return the file name from a full path? Users can
> drop multiple images on a droplet and then I need to question them about the
> file name. When I run this code, the full path is printed. Do I have to use
> split or something and get the name myself? I've been reading the MacPerl book
> and do not see an example of this.
> 
> foreach my $f ( @ARGV ) {
> 
> print "$f\n";
> 
> }


Something along the lines of

foreach my $f ( @ARGV )
{
    $f =~ m/:(.*)$/ ? print "$1\n" : print "$f\n";
}

perhaps? 

-- 
Scott R. Godin            | e-mail : [EMAIL PROTECTED]
Laughing Dragon Services  |    web : http://www.webdragon.net/


Reply via email to