Hi,

Based on a reply to my earlier question, I have an issue. I have a a variable, $FN_OUTPUT

$FN_OUTPUT = "$DST_DIR/XXX_SIPABCD_5MIN_OHR_${YYYYmmddHHMMSS} +_${INSTANCE}_$$"; # Suffixes added later: .processing .comple +ted

I need to modify the above as

$FN_OUTPUT          = "$DST_DIR/XXX_SIPABCD_5MIN_OHR_${YYYYmmddHHMMSS}ss_${INSTANCE}_$$";         # Suffixes added later: .processing .completed

where ss will be the VM instance added This is my code, thanks to previous tips on this site

my $vmstr = "zldcdyh1bdce2d14-xxx-vccpohr-correlator-0"; my ($opstr) = $vmstr =~ /-(\d\d)$/; #using the value of $vmstr of t +he VM but with an added 0 my $OPinst = “/PMOSS_SIPNBVQM_5MIN_OHDR_${YYYYmmddHHMMSS}ss”; But I am not sure how to use the $opstr in $FN_OUTPUT = "$DST_DIR/XXX_SIPABCD_5MIN_OHR_${YYYYmmddHHMMSS} +ss_${INSTANCE}_$$"; Is it as $FN_OUTPUT = "$DST_DIR/XXX_SIPABCD_5MIN_OHR_${YYYYmmddHHMMSS} +$opstr_${INSTANCE}_$$";

if it is VM=0 then FN_OUTPUT          = "$DST_DIR/XXX_SIPABCD_5MIN_OHR_${YYYYmmddHHMMSS}00_${INSTANCE}_$$"; or if VM =1, then FN_OUTPUT          = "$DST_DIR/XXX_SIPABCD_5MIN_OHR_${YYYYmmddHHMMSS}01_${INSTANCE}_$$";


In reply to appending a variable by pragovnj

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.