Linux tricks :
multiple commands can be given together using &&
eg - if u want to go 3 directory back use
>> ... && ..
Important points :
1. All the content in () is read in $1 .
2. If you are reading a value in $1 consecutively one after the other , but the 2nd one is based on some condition ; in that case even if the condition is not met it will take value for $1 from the 1st =~ .
To clear $1 we can do something like this :
my $tmp = "";
$tmp =~ /(.*)/;
3. for creating as well as copying sub folders use -r with cp cmd , only cp folder_name/* wont work .
3. Creating hash of hash automatically on reading data from a file :
In hash of hash we have key1 > key2 > value
that is why we cannot access key2 as <hash name>{key1}
4. $hash{$1} : this doesn't work , take the $1 in some var and then use as key of hash .