Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: variable inside a string inside back ticks

by Discipulus (Canon)
on Jul 30, 2017 at 16:16 UTC ( [id://1196313]=note: print w/replies, xml ) Need Help??


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 <<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1196313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-18 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found