Dear monks,
when I run the following code
#! perl -w use strict; use warnings; use Carp; use DBI; use DBD::Oracle qw(:ora_types); my %env_hash; my $os = 'solaris'; my $stringetje; my $temp; my @tempar; my @wkflist; my $PARAMETER; $env_hash{$os} = {parfile => '/ontw/data/powercenter8/PRJ10/BMRK.par', del => 'rm -f ', files => 'wf_BMRK*.out'}; open($PARAMETER, '<', "$env_hash{$os}{parfile}") or croak "\nCould not + open parameterfile $env_hash{$os}{parfile}"; while($temp = <$PARAMETER>){ chomp($temp); @tempar = split /=/, $temp; if($tempar[0] eq "WKFLIST"){ @wkflist = split /,/,$tempar[-1]; } else{ $env_hash{$os}{$tempar[0]} = $tempar[-1]; } } close $PARAMETER; $stringetje = $env_hash{$os}{del} . $env_hash{$os}{LOGDIR} . $env_hash +{$os}{files}; print "\n\n\n\n******************************************************\ +n"; print "\nFirst part of the concatenation: delete command : $env_hash{$ +os}{del}"; print "\nSecond part of the concatenation: path : $env_hash{$os}{LOGDI +R}"; print "\nThird part of the concatenation: file wildcard : $env_hash{$o +s}{files}"; print "\nThe resulting concatenation: $stringetje"; print "\n******************************************************\n\n\n\ +n";


and use the following parameter file BMRK.par:

TIMES=4 LOGDIR=/ontw/log/powercenter8/PRJ10/ TMPDIR=/ontw/data/powercenter8/Tmp/PRJ10 FOLDER=BMRK SERVICE=IS_PRJ10 DOMAIN=Domain_ONT USER=Administrator PASSWORD=********** WKFLIST="wf_BMRK_File2File_Fixed","wf_BMRK_File2File_Fixed_No_Target", +"wf_BMRK_File2File_Delimited","wf_BMRK_File2File_Memory","wf_BMRK_Fil +e2File_CPU" ORAUSER=jamb_007 ORAPSW=********** ORACONNECT=dow02.ont.jon.mg


this renders the following output:
****************************************************** First part of the concatenation: delete command : rm -f Second part of the concatenation: path : /ontw/log/powercenter8/PRJ10/ Third part of the concatenation: file wildcard : wf_BMRK*.out wf_BMRK*.outg concatenation: rm -f /ontw/log/powercenter8/PRJ10/ ******************************************************

However, If I hardcode the $env_hash{$os}{LOGDIR} parameter, as the other $env_hash{$os} parameters the output is the correct:
****************************************************** First part of the concatenation: delete command : rm -f Second part of the concatenation: path : /ontw/log/powercenter8/PRJ10/ Third part of the concatenation: file wildcard : wf_BMRK*.out The resulting concatenation: rm - f /ontw/log/powercenter8/PRJ10/wf_BM +RK*.out ******************************************************

I have absolutely no clue why this behaves as it does. As some parameters are shared, I'd like to keep the parameter file (so hardcoding the parameters which does work is not really an option). Any help would be greatly appreciated.

In reply to Concat strings from parameter file by jevaly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.