|
Perl 6
Perl 6 IO Tablet: Revision 31
Overview - Chapter: 0:History, 1:Design, 2:Basics, 3:Var, 4:Op, 5:IO, 6:{}, 7:Sub, 8:OOP, 9:Rx, 10:Meta Me: Inside a shell might be a Perl. This tablet is about the old core business of Perl. Command LineThe shell, command line (or STDOUT to Perl 5 programmer) is the first and most fundamental communication device for a script with it's user. And most tutorials begin just with dopping a line to it. saysay "deer earthlings"; printfIt's a print that understands also the syntax of sprintf. notewarnpromtreadFilesslurplinesopenreadlinegetgetcread for filesprint for filessay for filesopenSynopsis: open('new', :w).close given open('foo', :w) { # "Anonymous" filehandle.say('Hello, world!');} Valid modes are: r : read w : write a : append (Note: you must specify "wa", not just "a") p : pipe closerename for filesDirectoriesdirmkdirchdirchrootrmdirrenameSocketsProcessesrunruninsteadforkwaitkill
Overview - Chapter: 0:History, 1:Design, 2:Basics, 3:Var, 4:Op, 5:IO, 6:{}, 7:Sub, 8:OOP, 9:Rx, 10:Meta |