Professional Documents
Culture Documents
Perl Programming: Basics
Perl Programming: Basics
Perl Programming
Basics Variables and Operators Branching Looping File Test Operators Regular Expressions Input and Output Processing files mentioned on the Commandline Get Filenames Pipe input and ouput from/to Unix Commands Execute Unix Commands The Perl builtin Functions Subroutines Some of the special Variables Forking Building Pipes for forked Children Building a Socket Connectin to another Computer Get User and Network Information Arithmetics Formatting Output with "format" Commandline Switches Full Perl 5 Documentation
Basics
Scripts
Perl is a script language, which is compiled each time before running. That unix knows that it is a perl script there must be the following header at the topline of every perl script: #!/usr/bin/perl where the path to perl has to be correct and the line must not exeed 32 charachters.
Quotations
Single quote: '' or: q// Double quote: "" or: qq// Quote for execution: `` or: qx// Quote a list of words: ('term1','term2','term3') or: qw/term1 term2 term3/ Quote a quoted string: qq/"$name" is $name/; Quote something wich contains "/": qq!/usr/bin/$file is readdy!;