do  construct

This is the most difficult of the three to understand; the others are just slightly varied forms of do . 

do will look for a file by searching the @INC path (more on that later). If the file can't be found, it'll silently move on. If it is found, it will run the file just as if it was placed in a block within our main program but with one slight difference: we won't be able to see lexical variables from the main program once we're inside the additional code. So if we have a file : 

$a = "Been there, done that, got the T-shirt";

do "";

a file : print "a=$a\n";

we'll get no output, not even a warning that $a is uninitialized within , because we didn't turn on warnings in our included file. On the other hand, we can have subroutines in our included file and call them from the main file.