Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Creating a bash script "on the fly"

by kennethk (Abbot)
on Mar 26, 2021 at 20:36 UTC ( #11130397=note: print w/replies, xml ) Need Help??


in reply to Re: Creating a bash script "on the fly"
in thread Creating a bash script "on the fly"

Glad to see someone write a bunch of the code that needed writing, but that I didn't have time to write. As a piece of feedback, you should probably use File::Spec to do some path manipulation, particularly since you need to create parent directories before their children.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

  • Comment on Re^2: Creating a bash script "on the fly"

Replies are listed 'Best First'.
Re^3: Creating a bash script "on the fly"
by Fletch (Chancellor) on Mar 26, 2021 at 21:09 UTC

    Or Path::Tiny which will let you create the directories (otherwise you'll probably File::Path for make_path which works akin to mkdir -p to call yourself).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2021-10-28 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (96 votes). Check out past polls.

    Notices?