Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: What's the best way to convert a non interpolated single-quoted string into an interpolated double-quoted string?

by jeffa (Bishop)
on Mar 15, 2012 at 19:58 UTC ( #959847=note: print w/ replies, xml ) Need Help??


in reply to What's the best way to convert a non interpolated single-quoted string into an interpolated double-quoted string?

I would simply store the relative "path" part and leave the $ENV{HOME}/ out completely. Then, after you parse the XML file you can prepend the value of $ENV{HOME}, perhaps with a rule that only if the value is relative and not absolute.


jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)


Comment on Re: What's the best way to convert a non interpolated single-quoted string into an interpolated double-quoted string?
Select or Download Code
Replies are listed 'Best First'.
Re^2: What's the best way to convert a non interpolated single-quoted string into an interpolated double-quoted string?
by emilbarton (Scribe) on Mar 15, 2012 at 20:28 UTC
    Yes I wanted the user to be able to change the path afterwards through some specific pref pane without being enclosed at $HOME, your solution might do it well.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2015-07-07 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls