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/
- [MacPerl] how to get just the file name from full path Katherine Richmond
- Re: [MacPerl] how to get just the file name from f... Morbus Iff
- Re: [MacPerl] how to get just the file name from f... Todd Richmond
- Re: [MacPerl] how to get just the file name from f... Scott R. Godin
- Re: [MacPerl] how to get just the file name from f... Morbus Iff
- Re: [MacPerl] how to get just the file name fr... Scott R. Godin
- Re: [MacPerl] how to get just the file name from f... Katherine Richmond
- Re: [MacPerl] how to get just the file name from f... John W Baxter
- Re: [MacPerl] how to get just the file name fr... Ronald J Kimball
- Re: [MacPerl] how to get just the file name from f... John W Baxter
- Re: [MacPerl] how to get just the file name from f... Bruce Van Allen
- Re: [MacPerl] how to get just the file name from f... John W Baxter
- Re: [MacPerl] how to get just the file name fr... Bruce Van Allen