Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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?
[choroba]: Discipulus Writing one-liners in XS?
[Discipulus]: eh eh.. almost.. Discipulus's scratchpad

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-02-21 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (280 votes). Check out past polls.

    Notices?