in reply to Hacking Perl Code

The my $content = do { ... }; bit is an idiom that reads the entire contents of the file named by $file and stores it in $content.

<< introduces a here doc. Everything between that line and the end marker THEEND is a string that gets stored in $begin.

$begin.$content concatenates the two strings, and eval executes that code.

Replies are listed 'Best First'.
Re^2: Hacking Perl Code
by carlriz (Beadle) on Apr 09, 2014 at 13:50 UTC

    Very interesting idiom...I enjoyed the read.