Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl as interactive Shell?

by Anonymous Monk
on May 12, 2017 at 17:37 UTC ( [id://1190140]=note: print w/replies, xml ) Need Help??


in reply to Perl as interactive Shell?

The only reason Perl can be a replacement at all for the shell is because it can fork and exec. What it cannot replace is the shell's natural ability to communicate with itself. Rather than trying to solve all your problems with one tool, use the right tool for the task at hand.

Another way of looking at it is shell programming works on one level, and dynamic languages work on completely different level.

Replies are listed 'Best First'.
Re^2: Perl as interactive Shell?
by LanX (Saint) on May 12, 2017 at 17:41 UTC
    > What it cannot replace is the shell's natural ability to communicate with itself. 

    Please elaborate "ability to communicate with itself" (?)

    Best with examples.°

    ... the rest sounds buzzwordy (and sorry also "sundial'ish" )

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

    °) I have the impression you don't know much about Perl's possibilities to communicate.

      Means you are trying to use shell in Perl when you should be using shell to use Perl:
      curl -o - 'http://perlmonks.org/?node_id=1190142' | \ perl -Mojo -e'a("/"=>{text=>do{local$/;<STDIN>}})->start' daemon
        So using Perl in a REPL like the debugger is "VERBOTEN" ?

        I prefer facts over dogmas.

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found