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 .completedwhere 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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |