I suspect that the filename ($myfile) is an empty string, undef, or a hyphen. All these circumstances will cause cat to read from STDIN, which will appear to "hang" your program.
Generally using back-ticks (or system) to call an external program that has a perl equivalent is inefficient and rather defeats the object of using Perl. Running another process is a lot of work.
cat in particular is hardly ever (close to never) justified even in a shell script. Kill the cat!