34.204.169.76 |    

Navigation

Google Advertisement

Die Funktion filename() ermittelt den Dateinamen aus einen Unix/Windows Pfad. Ist am Dateinamen, wie in einer Apache Logdatei ein Querystring dran, wird dieser abgeschnitten.

filename
  1. # **************************************************************
  2. # filename -- extract the filename from file path
  3. #
  4. #     string filename( string string )
  5.  
  6. sub filename {
  7.  
  8. my $str=shift;
  9. $str = $1 if ( $str =~ m!([^\\/]+)\?! || $str =~ m!([^\\/]+)$! );
  10. return $str;
  11.  
  12. }
Parsed in 0.002 seconds at 115.47 KB/s

Search
 
Full text search by name and content of a snippet.

User online
There are 1 users online.

Tags Cloud

Latest snippets
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)
STDERR
(Bash::Function)
radius
(CSS)
shadow
(CSS)
rotate
(CSS)
create_function
(JavaScript::Snippets)