in reply to variable inside a string inside back ticks

Hello phamalda,

there are better ways to grab dates and filenames (PS infact haukex was faster than me and shown you better ways), whithout shelling out..

Anyway i cannot confirm your issue: it works as expected; you must have some other errors

echo blur > 20170730_195758.dat # warning windows double quotes! perl -e "my $today = '20170730'; print `ls 20170730*.dat`" 20170730_195758.dat

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: variable inside a string inside back ticks
by Anonymous Monk on Jul 30, 2017 at 16:48 UTC
    i cannot confirm your issue

    same mistake as OP

    perl -e 'print ">>".`ls 20170730*.dat`."<<"' >>20170730_195758.dat <<