CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
substitution with hash elements


New User

Dec 6, 2010, 6:40 AM

Post #1 of 2 (627 views)
substitution with hash elements Can't Post


I am working on a small script to automate my day to day work. The script was working fine until today when I started discovering problems. After debugging a bit, I have narrowed down the problem to a single line:


Please let me know if there is something wrong with it? I intend to replace the first occurrence of $tmp in $tmp1[1] with $jd_defines{$tmp}. Is there a better/safer way to do it? Note: all variables are absolute paths and hence contain the character '/' multiple times.

Thanks in advance.


Dec 6, 2010, 12:48 PM

Post #2 of 2 (613 views)
Re: [Jishnu] substitution with hash elements [In reply to] Can't Post



See `perldoc perlre` and search for /\\Q/ ans /\\E/
Also see `perldoc -f quotemeta`


I love Perl; it's the only language where you can bless your thingy.

Perl documentation is available at The list of standard modules and pragmatics is available in perlmodlib.

Get Markup Help. Please note the markup tag of "code".


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives