In my perl script, I have a string variable which has '' in it. I have to replace it with a proper date like '20150101'. I tried the below but it expects the variable as file. Can you please point out what's wrong here?
#!/usr/bin/perl
my $name="FILE_NAME_<DATE>.txt";
my $findDT="<DATE>";
my $dt="20150101";
my $realFileName=~`sed "s/$findDT/$dt/g" $name `;
print $name;
print $realFileName;
use strict; use warnings;on this Wednesday morning.