# Determine and set the file system parsing routines # based upon HTTP client header information. # fileparse_set_fstype( sub { my $browser = HTTP::BrowserDetect->new; return 'MSWin32' if $browser->windows; return 'MacOS' if $browser->mac; $^O; } ); my @file = fileparse($cgi->param($param), '\.[^\.]*'); # Return undef if file name cannot be parsed from file # field parameter # return undef unless $file[0];