Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044786]
help
Chatterbox?
[LanX]: ]t
[LanX]: am I the only one who first thinks scifi when a post starts with "Solaris"?

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (15)
As of 2017-03-23 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (294 votes). Check out past polls.