study note for my first Perl program

Because of project maintenance requirement, it's better exist some scripts to deploy project form git-server and automate regular regression test. Our project source tree isn't too simple and there is too much branch on works concurrent. Thus meaning I can't use a simple bash script to deploy the project environment.

Consider all the requirement,I decide write those scripts in Perl. It's my first time Perl Programming, this article collects some little tips or code for reference.

basic tips & sample code

Reading Keyboard input
Remember using chomp() to cleanup "CR"
$line = <>;  
if($line eq "\n") {  
        print "Only empty line!\n";  
} else {  
        print "Input: " . $line . "\n";  

Perl tutorial : usage() and here dcuments | Random Thoughts
sub usage
    print <<endodcs
fobar() -dir DIR
-dir DIR is the directory to …
; #end of print statement