Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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]: Also Europe and Asia are geographically one continent, the division is political
[robby_dobby]: I always thought everything on the other side of Suez to be Africa. That's an entire continent
[LanX]: Sinai_Peninsula
[robby_dobby]: choroba: If you're talking of Eurasia, it's only true of the erstwhile Constantinople/ Ottoman empire
[LanX]: yes correct, but Sinai is not on the other side
[LanX]: Organizing a YAPC in a tourist ressort is not a bad idea ...
[LanX]: ... and we could swap to our first YAPC Africa the following year when organizing in Hurghada
[robby_dobby]: LanX: Well volunteered!
[LanX]: ... just ... ppl would be to afraid of terrorist attacks
[choroba]: python guerrila?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (15)
As of 2017-04-24 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.