W
William
Expected output:
/local/home/mk_murex/eod/fo_files/Vols/trs_vol.txt_back
Current output:
/local/home/mk_murex/eod/fo_files/Vols/
/local/home/mk_murex/eod/fo_files/Vols/trs_vol.txt_back
Code in question:
#!/usr/bin/perl -w
use strict;
my $InputFileDir = "/local/home/mk_murex/eod/fo_files/Vols/";
my $RunDir = "/mkapp/webapps/mxrt-cgi/upload_vol/";
my $filename = "trs_vol.txt";
my $scriptname = "upload_vol_main.pl";
my $checklist = "dummylist.txt";
my $cmd = $RunDir . $scriptname;
my $extension = "_back";
my $originalList = $InputFileDir . $filename;
my $originalListBack = $originalList . $extension;
my $dummy_list = $RunDir . $checklist;
#print $originalList . "\n";
print $originalListBack . "\n";
# need to rename the original trs_vol.txt
system "mv $originalList $originalListBack";
Questions:
1a) Why is the value in $originalListBack concatenated?
1b) Why is the concatenation only has the value of $InputFileDir and not
$InputFileDir . $filename?
1c) What is the proper way of concatenating a Perl string other than using
"join()"? Right now I am using a lot of variables.
P.S. I checked perldoc -f join
Thanks.
/local/home/mk_murex/eod/fo_files/Vols/trs_vol.txt_back
Current output:
/local/home/mk_murex/eod/fo_files/Vols/
/local/home/mk_murex/eod/fo_files/Vols/trs_vol.txt_back
Code in question:
#!/usr/bin/perl -w
use strict;
my $InputFileDir = "/local/home/mk_murex/eod/fo_files/Vols/";
my $RunDir = "/mkapp/webapps/mxrt-cgi/upload_vol/";
my $filename = "trs_vol.txt";
my $scriptname = "upload_vol_main.pl";
my $checklist = "dummylist.txt";
my $cmd = $RunDir . $scriptname;
my $extension = "_back";
my $originalList = $InputFileDir . $filename;
my $originalListBack = $originalList . $extension;
my $dummy_list = $RunDir . $checklist;
#print $originalList . "\n";
print $originalListBack . "\n";
# need to rename the original trs_vol.txt
system "mv $originalList $originalListBack";
Questions:
1a) Why is the value in $originalListBack concatenated?
1b) Why is the concatenation only has the value of $InputFileDir and not
$InputFileDir . $filename?
1c) What is the proper way of concatenating a Perl string other than using
"join()"? Right now I am using a lot of variables.
P.S. I checked perldoc -f join
Thanks.