in reply to file name parsing to get the original file name
As Abigail-II suggested, use File::BaseName. However, if you are parsing HTML form input, beware: the module is not going to work regardless of the operating system of the client. Windows machines put backslashes (\) instead of slashes (/) for instance, so if you need to receive file uploaded by a Windows client and your program is on an Unix server, you'll need to do:
fileparse_set_fstype("MSWin32");
before calling the parsing function. The default FS type of the module depends on the operaing system where the script runs (it's decided upon examining the $^O variabile).
Michele.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: file name parsing to get the original file name
by halley (Prior) on Aug 19, 2003 at 13:46 UTC | |
by nevyn (Monk) on Aug 20, 2003 at 15:08 UTC | |
Re: Re: file name parsing to get the original file name
by tja_ariani (Acolyte) on Aug 20, 2003 at 07:10 UTC | |
by tja_ariani (Acolyte) on Aug 20, 2003 at 07:24 UTC |
In Section
Seekers of Perl Wisdom