Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: pass a variable or string to shell command from perl script

by karlgoethebier (Abbot)
on Dec 28, 2017 at 18:24 UTC ( [id://1206345]=note: print w/replies, xml ) Need Help??


in reply to pass a variable or string to shell command from perl script

"...the shell command..."

TMTOWTDI without shell out:

karls-mac-mini:playground karl$ mkdir 1206287 karls-mac-mini:playground karl$ cd 1206287/ perl -MPath::Tiny -E 'path(q(folderA/folderB/folderC))->mkpath;' karls-mac-mini:1206287 karl$ find . -type d . ./folderA ./folderA/folderB ./folderA/folderB/folderC

If this is what you want.

See also Path::Tiny.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-23 14:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found