I have a filename that is formatted as electric_inventory_WE_20170730_195758.dat. There is a similar file created each day. The time created may vary. I need to capture the filename with today's date and not worry about the time and end with a .dat extension.
I have created a variable for today's date. I need to use this variable inside a string inside back ticks. Something like this:
my $today = `date "+%Y%m%d"`;
my $filename = `ls electric_inventory_WE_$today*.dat`;
I did review #828922 but it didn't quite get me what I needed. I cannot find a way to get this variable to work inside a string inside the back ticks. Any help would be greatly appreciated.
In reply to variable inside a string inside back ticks by phamalda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |