-$! This @ is why config_sh must employ DCL syntax. Note that for
-$! symbols to be returned to this procedure they must be global.
-$! Which implies that assignments must be of the :== or == variety.
-$! Note further that the [-]config.sh file written by this procedure
-$! employs shell syntax. In order to convert shell syntax to DCL
-$! you might try:
-$!
-$! perl -ni -e "s/^#/!#/;s/='/==""/;s/'$/""/;print ""\$ $_"";" config.sh
-$!
-$! However, watch out for sig_nam, sig_nam_init, sig_num, startperl
-$! and any of the lower case double quoted variables such as the *format
-$! variables in such a config."sh".
-$!
-$ @'config_sh'
+$! we do our own parsing of the shell-script stuff
+$! ...and only accept symbols if they're in the | delimited list below
+$!
+$ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|"
+$ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|"
+$ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitelib|sitelib_stem|sitelibexp|try_cxx|use64bitall|use64bitint|"
+$ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|usemultiplicity|usemymalloc|usedebugging_perl|useperlio|usesecurelog|"
+$ config_symbols4 ="|usethreads|usevmsdebug|"
+$!
+$ open/read CONFIG 'config_sh'
+$ rd_conf_loop:
+$ read/end=erd_conf_loop CONFIG line
+$ line = f$edit(line,"trim")
+$ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop
+$ sym = f$element(0,"=",line)
+$ if sym .eqs. "=" then goto rd_conf_loop
+$ dsym = "|"+sym+"|"
+$ k = 0
+$ rd_ck_loop:
+$ syms = config_symbols'k'
+$ j = f$locate(dsym, syms)
+$ if j .lt. f$length(syms) then goto erd_ck_loop
+$ k = k + 1
+$ if k .lt. 5 then goto rd_ck_loop
+$ goto rd_conf_loop
+$ erd_ck_loop:
+$ val = f$element(1,"=",line)
+$ val = f$extract(1,f$length(val)-2,val)
+$ write sys$output "''sym' = ""''val'"""
+$ 'sym' = "''val'"
+$ goto rd_conf_loop
+$ erd_conf_loop:
+$ close CONFIG
+$ delete/symbol config_symbols0
+$ delete/symbol config_symbols1
+$ delete/symbol config_symbols2
+$ delete/symbol config_symbols3
+$ delete/symbol config_symbols4
+$ delete/symbol sym
+$ delete/symbol val
+$ delete/symbol dsym
+$ if f$type(usedebugging_perl) .nes. ""
+$ then
+$ useperldebug = usedebugging_perl
+$ delete/symbol usedebugging_perl
+$ endif