Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Basename Module

by karlgoethebier (Abbot)
on Feb 08, 2014 at 14:35 UTC ( [id://1074025]=note: print w/replies, xml ) Need Help??


in reply to Basename Module

Nomen est omen (AKA "the name is a sign"). Please see also File::Basename.

Update:

#!/usr/bin/env perl + use strict; use warnings; use File::Basename; my $fullpath = q(/Users/karl/monks/basename.pl); my $basename = basename($fullpath); my $dirname = dirname($fullpath); print qq(\$fullpath: $fullpath\n); print qq(\$basename: $basename\n); print qq(\$dirname: $dirname\n); __END__ karls-mac-mini:monks karl$ ./basename.pl + $fullpath: /Users/karl/monks/basename.pl $basename: basename.pl $dirname: /Users/karl/monks

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1074025]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-20 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found