[ create a new paste ] login | about

Project: bioinformatics
Link: http://bioinformatics.codepad.org/IOA3uLFH    [ raw code | output | fork ]

proch - Perl, pasted on Nov 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl

use strict;
use warnings;

use File::Basename;

my $fpath = "/home/user/hello/hey.pl";

print "Original  : " . $fpath . "\n";

my($filename, $directories) = fileparse($fpath);

print "Filename  : " . $filename    . "\n";
print "Directory : " . $directories . "\n";


Output:
1
2
3
Original  : /home/user/hello/hey.pl
Filename  : hey.pl
Directory : /home/user/hello/


Create a new paste based on this one


Comments: