Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: appending file name

by Skeeve (Vicar)
on Jul 17, 2013 at 10:46 UTC ( #1044786=note: print w/ replies, xml ) Need Help??


in reply to appending file name

For filenames I'd use File::Basename like so:

use File::Basename; my $filename = <>; chomp $filename; my ($name,$path,$suffix) = fileparse($filename, qr/\.[^.]+$/); print "Path: $path\n"; print "Name: $name\n"; print "Ext : $suffix\n"; my $fff= $path . $name . '_header.txt';

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e


Comment on Re: appending file name
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2014-10-02 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls