[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] How do I get filename from a URL ?




try:
$file =~ m!(:|/)(.*)$!;
$Fname = $2;

CB


> >From the FORM I could (It is user-input) get :
> 
> $File = "C:\Work\texts\document1.txt" (From PC)
> or
> $File = "Harddisk:Work:texts:document 1" (From Mac)
> .
> 	$Filename = $File;
> 
>         #Here I would like to get only the filename
> 	Fname = ???$Filename???
> 
> 	print("FILE = \"$Fname\"");


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch