Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
        my ( $name, $path, $suffix ) = fileparse( $pathname, qr{\.\w+$} );
        print "Name: $name\nPath: $path\n.Ext: $suffix\n";
    }
    
  2. or download this
    $ ./test.pl  'c:\foo\bar\baz.exe'  /usr/share/doc/bash/bash.pdf
    
    ...
    Path: /usr/share/doc/bash/
    .Ext: .pdf