Hi
Very silly question.... but I can't seem to get it to working. It works for other examples, but just not for the one I want.
Say, three variables:
I want to timestamp all three files, to look like:
I have a script that gives me "mmddyyyy_mmss", but I can't seem to break the file name variable at "." [period] starting from the end of the string.
I tried:
So once I break those file_name variables, I could join them back with timestamp.
any ideas....
Very silly question.... but I can't seem to get it to working. It works for other examples, but just not for the one I want.
Say, three variables:
Code:
$file_name1 = "test.txt.pgp";
$file_name2 = "test.txt";
$file_name3 = "test";
I want to timestamp all three files, to look like:
Code:
$file_name1 = "test.txt_mmddyyyy_mmss.pgp";
$file_name2 = "test_mmddyyyy_mmss.txt";
$file_name3 = "test_mmddyyyy_mmss";
I have a script that gives me "mmddyyyy_mmss", but I can't seem to break the file name variable at "." [period] starting from the end of the string.
I tried:
Code:
@fileXt1 = split /\.$/, $file_name1, 2;
@fileXt2 = split /\.$/, $file_name2, 2;
@fileXt3 = split /\.$/, $file_name3, 2;
So once I break those file_name variables, I could join them back with timestamp.
any ideas....