Quote something wich contains "/": qq!/usr/bin/$file Quote a quoted string: qq/"$name" is $name/ Quote a list of words: ('term1','term2','term3')or: qw/term1 term2 term3/ Perl can include other programming code with: require ![]() With a "sub" and enclosed in a block like: sub Perl knows it's a soubroutine if it the code is preceeded ![]() But soubroutinesĬan be placed anywhere and will only be evaluated when called from a normalĬommandline. Normal commands are executed in the order written in the script. So one can continue a command over several lines and terminates it only Start with the first non space charachter on a line and end with a " ". To the end of the line is comment and has no effect on the program. That unix knows that it is a perl script there must be the following headerĪt the topline of every perl script: #!/usr/bin/perlwhere the path to perl has to be correct and the line must not exeedĪfter the header line: #!/usr/bin/perlthereĪre either empty lines with no effect or commandlines or commentary lines. Perl is a script language, which is compiled each time before running. Pipe input and ouput from/to Unix Commandsīuilding a Socket Connectin to another Computer ![]() Processing files mentioned on the Commandline
0 Comments
Leave a Reply. |